X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Frtp%2FgstrtpL16pay.c;h=7e358d3d0fd27d5a9ac07accede38fee4f0510c0;hb=775ccdf9775bd7051929b257444b3be915e88ec6;hp=a8ed36fd2e9c9c8698800b531ab13f2f0c124ca3;hpb=2e412a447a66c3a44aa660c122657db5056c623c;p=platform%2Fupstream%2Fgst-plugins-good.git diff --git a/gst/rtp/gstrtpL16pay.c b/gst/rtp/gstrtpL16pay.c index a8ed36f..7e358d3 100644 --- a/gst/rtp/gstrtpL16pay.c +++ b/gst/rtp/gstrtpL16pay.c @@ -19,18 +19,18 @@ /** * SECTION:element-rtpL16pay + * @title: rtpL16pay * @see_also: rtpL16depay * * Payload raw audio into RTP packets according to RFC 3551. * For detailed information see: http://www.rfc-editor.org/rfc/rfc3551.txt * - * - * Example pipeline + * ## Example pipeline * |[ * gst-launch-1.0 -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink * ]| This example pipeline will payload raw audio. Refer to * the rtpL16depay example to depayload and play the RTP stream. - * + * */ #ifdef HAVE_CONFIG_H @@ -104,10 +104,10 @@ gst_rtp_L16_pay_class_init (GstRtpL16PayClass * klass) gstrtpbasepayload_class->get_caps = gst_rtp_L16_pay_getcaps; gstrtpbasepayload_class->handle_buffer = gst_rtp_L16_pay_handle_buffer; - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_rtp_L16_pay_src_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_rtp_L16_pay_sink_template)); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_rtp_L16_pay_src_template); + gst_element_class_add_static_pad_template (gstelement_class, + &gst_rtp_L16_pay_sink_template); gst_element_class_set_static_metadata (gstelement_class, "RTP audio payloader", "Codec/Payloader/Network/RTP", @@ -208,16 +208,16 @@ gst_rtp_L16_pay_getcaps (GstRTPBasePayload * rtppayload, GstPad * pad, if (gst_structure_get_int (structure, "channels", &channels)) { gst_caps_set_simple (caps, "channels", G_TYPE_INT, channels, NULL); } else if (gst_structure_get_int (structure, "payload", &pt)) { - if (pt == 10) + if (pt == GST_RTP_PAYLOAD_L16_STEREO) gst_caps_set_simple (caps, "channels", G_TYPE_INT, 2, NULL); - else if (pt == 11) + else if (pt == GST_RTP_PAYLOAD_L16_MONO) gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL); } if (gst_structure_get_int (structure, "clock-rate", &rate)) { gst_caps_set_simple (caps, "rate", G_TYPE_INT, rate, NULL); } else if (gst_structure_get_int (structure, "payload", &pt)) { - if (pt == 10 || pt == 11) + if (pt == GST_RTP_PAYLOAD_L16_STEREO || pt == GST_RTP_PAYLOAD_L16_MONO) gst_caps_set_simple (caps, "rate", G_TYPE_INT, 44100, NULL); }