rtp: Update codes based on 1.18.4
[platform/upstream/gst-plugins-good.git] / gst / rtp / gstrtpL24depay.c
index dc7a338..448dac0 100644 (file)
 
 /**
  * SECTION:element-rtpL24depay
+ * @title: rtpL24depay
  * @see_also: rtpL24pay
  *
  * Extract raw audio from RTP packets according to RFC 3190, section 4.
  * For detailed information see: http://www.rfc-editor.org/rfc/rfc3190.txt
  *
- * <refsect2>
- * <title>Example pipeline</title>
+ * ## Example pipeline
  * |[
  * gst-launch-1.0 udpsrc caps='application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L24, encoding-params=(string)1, channels=(int)1, payload=(int)96' ! rtpL24depay ! pulsesink
  * ]| This example pipeline will depayload an RTP raw audio stream. Refer to
  * the rtpL24pay example to create the RTP stream.
- * </refsect2>
+ *
  */
 
 #ifdef HAVE_CONFIG_H
@@ -88,10 +88,10 @@ gst_rtp_L24_depay_class_init (GstRtpL24DepayClass * klass)
   gstrtpbasedepayload_class->set_caps = gst_rtp_L24_depay_setcaps;
   gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_L24_depay_process;
 
-  gst_element_class_add_pad_template (gstelement_class,
-      gst_static_pad_template_get (&gst_rtp_L24_depay_src_template));
-  gst_element_class_add_pad_template (gstelement_class,
-      gst_static_pad_template_get (&gst_rtp_L24_depay_sink_template));
+  gst_element_class_add_static_pad_template (gstelement_class,
+      &gst_rtp_L24_depay_src_template);
+  gst_element_class_add_static_pad_template (gstelement_class,
+      &gst_rtp_L24_depay_sink_template);
 
   gst_element_class_set_static_metadata (gstelement_class,
       "RTP audio depayloader", "Codec/Depayloader/Network/RTP",
@@ -187,6 +187,7 @@ gst_rtp_L24_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
             GST_STR_NULL (channel_order), channels));
     /* create default NONE layout */
     gst_rtp_channels_create_default (channels, info->position);
+    info->flags |= GST_AUDIO_FLAG_UNPOSITIONED;
   }
 
   srccaps = gst_audio_info_to_caps (info);
@@ -230,8 +231,7 @@ gst_rtp_L24_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
 
   outbuf = gst_buffer_make_writable (outbuf);
   if (outbuf) {
-    gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpL24depay), outbuf,
-        g_quark_from_static_string (GST_META_TAG_AUDIO_STR));
+    gst_rtp_drop_non_audio_meta (rtpL24depay, outbuf);
   }
   if (rtpL24depay->order &&
       !gst_audio_buffer_reorder_channels (outbuf,