rtp: Update codes based on 1.18.4
[platform/upstream/gst-plugins-good.git] / gst / rtp / gstrtpac3pay.c
index 021016d..1fecced 100644 (file)
 
 /**
  * SECTION:element-rtpac3pay
+ * @title: rtpac3pay
  * @see_also: rtpac3depay
  *
  * Payload AC3 audio into RTP packets according to RFC 4184.
  * For detailed information see: http://www.rfc-editor.org/rfc/rfc4184.txt
  *
- * <refsect2>
- * <title>Example pipeline</title>
+ * ## Example pipeline
  * |[
  * gst-launch-1.0 -v audiotestsrc ! avenc_ac3 ! rtpac3pay ! udpsink
  * ]| This example pipeline will encode and payload AC3 stream. Refer to
  * the rtpac3depay example to depayload and decode the RTP stream.
- * </refsect2>
+ *
  */
 
 #ifdef HAVE_CONFIG_H
@@ -274,7 +274,9 @@ gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay)
     payload_len = gst_rtp_buffer_calc_payload_len (towrite, 0, 0);
 
     /* create buffer to hold the payload */
-    outbuf = gst_rtp_buffer_new_allocate (2, 0, 0);
+    outbuf =
+        gst_rtp_base_payload_allocate_output_buffer (GST_RTP_BASE_PAYLOAD
+        (rtpac3pay), 2, 0, 0);
 
     if (FT == 0) {
       /* check if it all fits */
@@ -323,8 +325,8 @@ gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay)
 
     payload_buffer =
         gst_adapter_take_buffer_fast (rtpac3pay->adapter, payload_len);
-    gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpac3pay), outbuf, payload_buffer,
-        g_quark_from_static_string (GST_META_TAG_AUDIO_STR));
+
+    gst_rtp_copy_audio_meta (rtpac3pay, outbuf, payload_buffer);
 
     outbuf = gst_buffer_append (outbuf, payload_buffer);
 
@@ -362,7 +364,7 @@ gst_rtp_ac3_pay_handle_buffer (GstRTPBasePayload * basepayload,
     gst_rtp_ac3_pay_reset (rtpac3pay);
   }
 
-  /* count the amount of incomming packets */
+  /* count the amount of incoming packets */
   NF = 0;
   left = map.size;
   p = map.data;