2 * Copyright (C) <2006> Wim Taymans <wim.taymans@gmail.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
26 #include <gst/rtp/gstrtpbuffer.h>
29 #include "gstrtpvorbispay.h"
31 GST_DEBUG_CATEGORY_STATIC (rtpvorbispay_debug);
32 #define GST_CAT_DEFAULT (rtpvorbispay_debug)
35 * http://www.rfc-editor.org/rfc/rfc5215.txt
38 static GstStaticPadTemplate gst_rtp_vorbis_pay_src_template =
39 GST_STATIC_PAD_TEMPLATE ("src",
42 GST_STATIC_CAPS ("application/x-rtp, "
43 "media = (string) \"audio\", "
44 "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
45 "clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"VORBIS\""
46 /* All required parameters
48 * "encoding-params = (string) <num channels>"
49 * "configuration = (string) ANY"
54 static GstStaticPadTemplate gst_rtp_vorbis_pay_sink_template =
55 GST_STATIC_PAD_TEMPLATE ("sink",
58 GST_STATIC_CAPS ("audio/x-vorbis")
61 #define gst_rtp_vorbis_pay_parent_class parent_class
62 G_DEFINE_TYPE (GstRtpVorbisPay, gst_rtp_vorbis_pay, GST_TYPE_RTP_BASE_PAYLOAD);
64 static gboolean gst_rtp_vorbis_pay_setcaps (GstRTPBasePayload * basepayload,
66 static GstStateChangeReturn gst_rtp_vorbis_pay_change_state (GstElement *
67 element, GstStateChange transition);
68 static GstFlowReturn gst_rtp_vorbis_pay_handle_buffer (GstRTPBasePayload * pad,
70 static gboolean gst_rtp_vorbis_pay_sink_event (GstRTPBasePayload * payload,
74 gst_rtp_vorbis_pay_class_init (GstRtpVorbisPayClass * klass)
76 GstElementClass *gstelement_class;
77 GstRTPBasePayloadClass *gstrtpbasepayload_class;
79 gstelement_class = (GstElementClass *) klass;
80 gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
82 gstelement_class->change_state = gst_rtp_vorbis_pay_change_state;
84 gstrtpbasepayload_class->set_caps = gst_rtp_vorbis_pay_setcaps;
85 gstrtpbasepayload_class->handle_buffer = gst_rtp_vorbis_pay_handle_buffer;
86 gstrtpbasepayload_class->sink_event = gst_rtp_vorbis_pay_sink_event;
88 gst_element_class_add_pad_template (gstelement_class,
89 gst_static_pad_template_get (&gst_rtp_vorbis_pay_src_template));
90 gst_element_class_add_pad_template (gstelement_class,
91 gst_static_pad_template_get (&gst_rtp_vorbis_pay_sink_template));
93 gst_element_class_set_static_metadata (gstelement_class,
94 "RTP Vorbis depayloader",
95 "Codec/Payloader/Network/RTP",
96 "Payload-encode Vorbis audio into RTP packets (RFC 5215)",
97 "Wim Taymans <wimi.taymans@gmail.com>");
99 GST_DEBUG_CATEGORY_INIT (rtpvorbispay_debug, "rtpvorbispay", 0,
100 "Vorbis RTP Payloader");
104 gst_rtp_vorbis_pay_init (GstRtpVorbisPay * rtpvorbispay)
109 gst_rtp_vorbis_pay_clear_packet (GstRtpVorbisPay * rtpvorbispay)
111 if (rtpvorbispay->packet)
112 gst_buffer_unref (rtpvorbispay->packet);
113 rtpvorbispay->packet = NULL;
117 gst_rtp_vorbis_pay_cleanup (GstRtpVorbisPay * rtpvorbispay)
119 g_list_foreach (rtpvorbispay->headers, (GFunc) gst_mini_object_unref, NULL);
120 g_list_free (rtpvorbispay->headers);
121 rtpvorbispay->headers = NULL;
123 gst_rtp_vorbis_pay_clear_packet (rtpvorbispay);
127 gst_rtp_vorbis_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
129 GstRtpVorbisPay *rtpvorbispay;
131 rtpvorbispay = GST_RTP_VORBIS_PAY (basepayload);
133 rtpvorbispay->need_headers = TRUE;
139 gst_rtp_vorbis_pay_reset_packet (GstRtpVorbisPay * rtpvorbispay, guint8 VDT)
142 GstRTPBuffer rtp = { NULL };
144 GST_LOG_OBJECT (rtpvorbispay, "reset packet");
146 rtpvorbispay->payload_pos = 4;
147 gst_rtp_buffer_map (rtpvorbispay->packet, GST_MAP_READ, &rtp);
148 payload_len = gst_rtp_buffer_get_payload_len (&rtp);
149 gst_rtp_buffer_unmap (&rtp);
150 rtpvorbispay->payload_left = payload_len - 4;
151 rtpvorbispay->payload_duration = 0;
152 rtpvorbispay->payload_F = 0;
153 rtpvorbispay->payload_VDT = VDT;
154 rtpvorbispay->payload_pkts = 0;
158 gst_rtp_vorbis_pay_init_packet (GstRtpVorbisPay * rtpvorbispay, guint8 VDT,
159 GstClockTime timestamp)
161 GST_LOG_OBJECT (rtpvorbispay, "starting new packet, VDT: %d", VDT);
163 if (rtpvorbispay->packet)
164 gst_buffer_unref (rtpvorbispay->packet);
166 /* new packet allocate max packet size */
167 rtpvorbispay->packet =
168 gst_rtp_buffer_new_allocate_len (GST_RTP_BASE_PAYLOAD_MTU
169 (rtpvorbispay), 0, 0);
170 gst_rtp_vorbis_pay_reset_packet (rtpvorbispay, VDT);
171 GST_BUFFER_TIMESTAMP (rtpvorbispay->packet) = timestamp;
175 gst_rtp_vorbis_pay_flush_packet (GstRtpVorbisPay * rtpvorbispay)
180 GstRTPBuffer rtp = { NULL };
182 /* check for empty packet */
183 if (!rtpvorbispay->packet || rtpvorbispay->payload_pos <= 4)
186 GST_LOG_OBJECT (rtpvorbispay, "flushing packet");
188 gst_rtp_buffer_map (rtpvorbispay->packet, GST_MAP_WRITE, &rtp);
191 payload = gst_rtp_buffer_get_payload (&rtp);
194 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
195 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
196 * | Ident | F |VDT|# pkts.|
197 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
199 * F: Fragment type (0=none, 1=start, 2=cont, 3=end)
200 * VDT: Vorbis data type (0=vorbis, 1=config, 2=comment, 3=reserved)
201 * pkts: number of packets.
203 payload[0] = (rtpvorbispay->payload_ident >> 16) & 0xff;
204 payload[1] = (rtpvorbispay->payload_ident >> 8) & 0xff;
205 payload[2] = (rtpvorbispay->payload_ident) & 0xff;
206 payload[3] = (rtpvorbispay->payload_F & 0x3) << 6 |
207 (rtpvorbispay->payload_VDT & 0x3) << 4 |
208 (rtpvorbispay->payload_pkts & 0xf);
210 gst_rtp_buffer_unmap (&rtp);
212 /* shrink the buffer size to the last written byte */
213 hlen = gst_rtp_buffer_calc_header_len (0);
214 gst_buffer_resize (rtpvorbispay->packet, 0, hlen + rtpvorbispay->payload_pos);
216 GST_BUFFER_DURATION (rtpvorbispay->packet) = rtpvorbispay->payload_duration;
218 /* push, this gives away our ref to the packet, so clear it. */
220 gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpvorbispay),
221 rtpvorbispay->packet);
222 rtpvorbispay->packet = NULL;
228 gst_rtp_vorbis_pay_finish_headers (GstRTPBasePayload * basepayload)
230 GstRtpVorbisPay *rtpvorbispay = GST_RTP_VORBIS_PAY (basepayload);
232 guint length, size, n_headers, configlen;
233 gchar *cstr, *configuration;
234 guint8 *data, *config;
238 GST_DEBUG_OBJECT (rtpvorbispay, "finish headers");
240 if (!rtpvorbispay->headers)
243 /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
244 * | Number of packed headers |
245 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
246 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
248 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
249 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
251 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
252 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
254 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
256 * We only construct a config containing 1 packed header like this:
259 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
260 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
261 * | Ident | length ..
262 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
263 * .. | n. of headers | length1 | length2 ..
264 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
265 * .. | Identification Header ..
266 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
267 * .................................................................
268 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
269 * .. | Comment Header ..
270 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
271 * .................................................................
272 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
273 * .. Comment Header |
274 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
276 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
277 * .................................................................
278 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
280 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
283 /* we need 4 bytes for the number of headers (which is always 1), 3 bytes for
284 * the ident, 2 bytes for length, 1 byte for n. of headers. */
285 size = 4 + 3 + 2 + 1;
287 /* count the size of the headers first and update the hash */
290 ident = fnv1_hash_32_new ();
291 for (walk = rtpvorbispay->headers; walk; walk = g_list_next (walk)) {
292 GstBuffer *buf = GST_BUFFER_CAST (walk->data);
296 bsize = gst_buffer_get_size (buf);
300 /* count number of bytes needed for length fields, we don't need this for
301 * the last header. */
302 if (g_list_next (walk)) {
309 gst_buffer_map (buf, &map, GST_MAP_READ);
310 ident = fnv1_hash_32_update (ident, map.data, map.size);
311 gst_buffer_unmap (buf, &map);
314 /* packet length is header size + packet length */
315 configlen = size + length;
316 config = data = g_malloc (configlen);
318 /* number of packed headers, we only pack 1 header */
324 ident = fnv1_hash_32_to_24 (ident);
325 rtpvorbispay->payload_ident = ident;
326 GST_DEBUG_OBJECT (rtpvorbispay, "ident 0x%08x", ident);
328 /* take lower 3 bytes */
329 data[4] = (ident >> 16) & 0xff;
330 data[5] = (ident >> 8) & 0xff;
331 data[6] = ident & 0xff;
333 /* store length of all vorbis headers */
334 data[7] = ((length) >> 8) & 0xff;
335 data[8] = (length) & 0xff;
337 /* store number of headers minus one. */
338 data[9] = n_headers - 1;
341 /* store length for each header */
342 for (walk = rtpvorbispay->headers; walk; walk = g_list_next (walk)) {
343 GstBuffer *buf = GST_BUFFER_CAST (walk->data);
344 guint bsize, size, temp;
347 /* only need to store the length when it's not the last header */
348 if (!g_list_next (walk))
351 bsize = gst_buffer_get_size (buf);
361 bsize = gst_buffer_get_size (buf);
362 /* write the size backwards */
366 data[size] = (bsize & 0x7f) | flag;
368 flag = 0x80; /* Flag bit on all bytes of the length except the last */
373 /* copy header data */
374 for (walk = rtpvorbispay->headers; walk; walk = g_list_next (walk)) {
375 GstBuffer *buf = GST_BUFFER_CAST (walk->data);
377 gst_buffer_extract (buf, 0, data, gst_buffer_get_size (buf));
378 data += gst_buffer_get_size (buf);
381 /* serialize to base64 */
382 configuration = g_base64_encode (config, configlen);
385 /* configure payloader settings */
386 cstr = g_strdup_printf ("%d", rtpvorbispay->channels);
387 gst_rtp_base_payload_set_options (basepayload, "audio", TRUE, "VORBIS",
390 gst_rtp_base_payload_set_outcaps (basepayload, "encoding-params",
391 G_TYPE_STRING, cstr, "configuration", G_TYPE_STRING, configuration, NULL);
393 g_free (configuration);
400 GST_DEBUG_OBJECT (rtpvorbispay, "finish headers");
406 gst_rtp_vorbis_pay_parse_id (GstRTPBasePayload * basepayload, guint8 * data,
409 GstRtpVorbisPay *rtpvorbispay = GST_RTP_VORBIS_PAY (basepayload);
411 gint32 rate, version;
413 if (G_UNLIKELY (size < 16))
416 if (G_UNLIKELY (memcmp (data, "\001vorbis", 7)))
420 if (G_UNLIKELY ((version = GST_READ_UINT32_LE (data)) != 0))
421 goto invalid_version;
424 if (G_UNLIKELY ((channels = *data++) < 1))
425 goto invalid_channels;
427 if (G_UNLIKELY ((rate = GST_READ_UINT32_LE (data)) < 1))
430 /* all fine, store the values */
431 rtpvorbispay->channels = channels;
432 rtpvorbispay->rate = rate;
439 GST_ELEMENT_ERROR (basepayload, STREAM, DECODE,
440 ("Identification packet is too short, need at least 16, got %d", size),
446 GST_ELEMENT_ERROR (basepayload, STREAM, DECODE,
447 ("Invalid header start in identification packet"), (NULL));
452 GST_ELEMENT_ERROR (basepayload, STREAM, DECODE,
453 ("Invalid version, expected 0, got %d", version), (NULL));
458 GST_ELEMENT_ERROR (basepayload, STREAM, DECODE,
459 ("Invalid rate %d", rate), (NULL));
464 GST_ELEMENT_ERROR (basepayload, STREAM, DECODE,
465 ("Invalid channels %d", channels), (NULL));
471 gst_rtp_vorbis_pay_handle_buffer (GstRTPBasePayload * basepayload,
474 GstRtpVorbisPay *rtpvorbispay;
481 GstClockTime duration, newduration, timestamp;
485 guint8 *ppos, *payload;
487 GstRTPBuffer rtp = { NULL };
489 rtpvorbispay = GST_RTP_VORBIS_PAY (basepayload);
491 gst_buffer_map (buffer, &map, GST_MAP_READ);
494 duration = GST_BUFFER_DURATION (buffer);
495 timestamp = GST_BUFFER_TIMESTAMP (buffer);
497 GST_LOG_OBJECT (rtpvorbispay, "size %" G_GSIZE_FORMAT
498 ", duration %" GST_TIME_FORMAT, size, GST_TIME_ARGS (duration));
500 if (G_UNLIKELY (size < 1 || size > 0xffff))
503 /* find packet type */
507 /* identification, we need to parse this in order to get the clock rate. */
508 if (G_UNLIKELY (!gst_rtp_vorbis_pay_parse_id (basepayload, data, size)))
509 goto parse_id_failed;
511 } else if (data[0] == 3) {
514 } else if (data[0] == 5) {
523 if (rtpvorbispay->need_headers) {
524 /* we need to collect the headers and construct a config string from them */
526 GST_DEBUG_OBJECT (rtpvorbispay, "collecting header");
527 /* append header to the list of headers */
528 gst_buffer_unmap (buffer, &map);
529 rtpvorbispay->headers = g_list_append (rtpvorbispay->headers, buffer);
533 if (!gst_rtp_vorbis_pay_finish_headers (basepayload))
535 rtpvorbispay->need_headers = FALSE;
539 /* size increases with packet length and 2 bytes size eader. */
540 newduration = rtpvorbispay->payload_duration;
541 if (duration != GST_CLOCK_TIME_NONE)
542 newduration += duration;
544 newsize = rtpvorbispay->payload_pos + 2 + size;
545 packet_len = gst_rtp_buffer_calc_packet_len (newsize, 0, 0);
547 /* check buffer filled against length and max latency */
548 flush = gst_rtp_base_payload_is_filled (basepayload, packet_len, newduration);
549 /* we can store up to 15 vorbis packets in one RTP packet. */
550 flush |= (rtpvorbispay->payload_pkts == 15);
551 /* flush if we have a new VDT */
552 if (rtpvorbispay->packet)
553 flush |= (rtpvorbispay->payload_VDT != VDT);
555 gst_rtp_vorbis_pay_flush_packet (rtpvorbispay);
557 /* create new packet if we must */
558 if (!rtpvorbispay->packet) {
559 gst_rtp_vorbis_pay_init_packet (rtpvorbispay, VDT, timestamp);
562 gst_rtp_buffer_map (rtpvorbispay->packet, GST_MAP_WRITE, &rtp);
563 payload = gst_rtp_buffer_get_payload (&rtp);
564 ppos = payload + rtpvorbispay->payload_pos;
569 /* put buffer in packet, it either fits completely or needs to be fragmented
570 * over multiple RTP packets. */
572 plen = MIN (rtpvorbispay->payload_left - 2, size);
574 GST_LOG_OBJECT (rtpvorbispay, "append %u bytes", plen);
576 /* data is copied in the payload with a 2 byte length header */
577 ppos[0] = (plen >> 8) & 0xff;
578 ppos[1] = (plen & 0xff);
579 memcpy (&ppos[2], data, plen);
584 rtpvorbispay->payload_pos += plen + 2;
585 rtpvorbispay->payload_left -= plen + 2;
589 /* last fragment, set F to 0x3. */
590 rtpvorbispay->payload_F = 0x3;
592 /* fragment continues, set F to 0x2. */
593 rtpvorbispay->payload_F = 0x2;
596 /* fragmented packet starts, set F to 0x1, mark ourselves as
598 rtpvorbispay->payload_F = 0x1;
603 gst_rtp_buffer_unmap (&rtp);
604 /* fragmented packets are always flushed and have ptks of 0 */
605 rtpvorbispay->payload_pkts = 0;
606 ret = gst_rtp_vorbis_pay_flush_packet (rtpvorbispay);
609 /* start new packet and get pointers. VDT stays the same. */
610 gst_rtp_vorbis_pay_init_packet (rtpvorbispay,
611 rtpvorbispay->payload_VDT, timestamp);
612 gst_rtp_buffer_map (rtpvorbispay->packet, GST_MAP_WRITE, &rtp);
613 payload = gst_rtp_buffer_get_payload (&rtp);
614 ppos = payload + rtpvorbispay->payload_pos;
617 /* unfragmented packet, update stats for next packet, size == 0 and we
618 * exit the while loop */
619 rtpvorbispay->payload_pkts++;
620 if (duration != GST_CLOCK_TIME_NONE)
621 rtpvorbispay->payload_duration += duration;
626 gst_rtp_buffer_unmap (&rtp);
628 gst_buffer_unmap (buffer, &map);
629 gst_buffer_unref (buffer);
637 GST_ELEMENT_WARNING (rtpvorbispay, STREAM, DECODE,
638 ("Invalid packet size (1 < %" G_GSIZE_FORMAT " <= 0xffff)", size),
640 gst_buffer_unmap (buffer, &map);
641 gst_buffer_unref (buffer);
646 gst_buffer_unmap (buffer, &map);
647 gst_buffer_unref (buffer);
648 return GST_FLOW_ERROR;
652 GST_ELEMENT_WARNING (rtpvorbispay, STREAM, DECODE,
653 (NULL), ("Ignoring unknown header received"));
654 gst_buffer_unmap (buffer, &map);
655 gst_buffer_unref (buffer);
660 GST_ELEMENT_WARNING (rtpvorbispay, STREAM, DECODE,
661 (NULL), ("Error initializing header config"));
662 gst_buffer_unmap (buffer, &map);
663 gst_buffer_unref (buffer);
669 gst_rtp_vorbis_pay_sink_event (GstRTPBasePayload * payload, GstEvent * event)
671 GstRtpVorbisPay *rtpvorbispay = GST_RTP_VORBIS_PAY (payload);
673 switch (GST_EVENT_TYPE (event)) {
674 case GST_EVENT_FLUSH_STOP:
675 gst_rtp_vorbis_pay_clear_packet (rtpvorbispay);
680 /* false to let parent handle event as well */
681 return GST_RTP_BASE_PAYLOAD_CLASS (parent_class)->sink_event (payload, event);
684 static GstStateChangeReturn
685 gst_rtp_vorbis_pay_change_state (GstElement * element,
686 GstStateChange transition)
688 GstRtpVorbisPay *rtpvorbispay;
689 GstStateChangeReturn ret;
691 rtpvorbispay = GST_RTP_VORBIS_PAY (element);
693 switch (transition) {
698 ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
700 switch (transition) {
701 case GST_STATE_CHANGE_PAUSED_TO_READY:
702 gst_rtp_vorbis_pay_cleanup (rtpvorbispay);
711 gst_rtp_vorbis_pay_plugin_init (GstPlugin * plugin)
713 return gst_element_register (plugin, "rtpvorbispay",
714 GST_RANK_SECONDARY, GST_TYPE_RTP_VORBIS_PAY);