/**
* 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
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 */
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);
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;