gst/rtp/: Update the vorbis RTP pay/depay to RFC 5215.
Original commit message from CVS: Patch by: Olivier Crete <tester at tester dot ca> * gst/rtp/gstrtpvorbisdepay.c: (gst_rtp_vorbis_depay_setcaps), (gst_rtp_vorbis_depay_process): * gst/rtp/gstrtpvorbispay.c: (gst_rtp_vorbis_pay_finish_headers): Update the vorbis RTP pay/depay to RFC 5215. Fixes #547842.
This commit is contained in:
parent
62491dcb74
commit
87fd8ada34
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2008-08-15 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
Patch by: Olivier Crete <tester at tester dot ca>
|
||||||
|
|
||||||
|
* gst/rtp/gstrtpvorbisdepay.c: (gst_rtp_vorbis_depay_setcaps),
|
||||||
|
(gst_rtp_vorbis_depay_process):
|
||||||
|
* gst/rtp/gstrtpvorbispay.c: (gst_rtp_vorbis_pay_finish_headers):
|
||||||
|
Update the vorbis RTP pay/depay to RFC 5215.
|
||||||
|
Fixes #547842.
|
||||||
|
|
||||||
2008-08-14 David Schleef <ds@schleef.org>
|
2008-08-14 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* gst/qtdemux/qtdemux.c: Add 'hdv6' as a HDV format for 1080i/60
|
* gst/qtdemux/qtdemux.c: Add 'hdv6' as a HDV format for 1080i/60
|
||||||
|
@ -31,14 +31,14 @@ GST_DEBUG_CATEGORY_STATIC (rtpvorbisdepay_debug);
|
|||||||
#define GST_CAT_DEFAULT (rtpvorbisdepay_debug)
|
#define GST_CAT_DEFAULT (rtpvorbisdepay_debug)
|
||||||
|
|
||||||
/* references:
|
/* references:
|
||||||
* http://svn.xiph.org/trunk/vorbis/doc/draft-ietf-avt-rtp-vorbis-04.txt
|
* http://www.rfc-editor.org/rfc/rfc5215.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* elementfactory information */
|
/* elementfactory information */
|
||||||
static const GstElementDetails gst_rtp_vorbis_depay_details =
|
static const GstElementDetails gst_rtp_vorbis_depay_details =
|
||||||
GST_ELEMENT_DETAILS ("RTP packet depayloader",
|
GST_ELEMENT_DETAILS ("RTP packet depayloader",
|
||||||
"Codec/Depayloader/Network",
|
"Codec/Depayloader/Network",
|
||||||
"Extracts Vorbis Audio from RTP packets (draft-04 of RFC XXXX)",
|
"Extracts Vorbis Audio from RTP packets (RFC 5215)",
|
||||||
"Wim Taymans <wim@fluendo.com>");
|
"Wim Taymans <wim@fluendo.com>");
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_rtp_vorbis_depay_sink_template =
|
static GstStaticPadTemplate gst_rtp_vorbis_depay_sink_template =
|
||||||
@ -54,11 +54,6 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
|||||||
* "encoding-params = (string) <num channels>"
|
* "encoding-params = (string) <num channels>"
|
||||||
* "configuration = (string) ANY"
|
* "configuration = (string) ANY"
|
||||||
*/
|
*/
|
||||||
/* All optional parameters
|
|
||||||
*
|
|
||||||
* "delivery-method = (string) { inline, in_band, out_band/<specific_name> } "
|
|
||||||
* "configuration-uri ="
|
|
||||||
*/
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -330,7 +325,6 @@ gst_rtp_vorbis_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
GstRtpVorbisDepay *rtpvorbisdepay;
|
GstRtpVorbisDepay *rtpvorbisdepay;
|
||||||
GstCaps *srccaps;
|
GstCaps *srccaps;
|
||||||
const gchar *delivery_method;
|
|
||||||
const gchar *configuration;
|
const gchar *configuration;
|
||||||
gint clock_rate;
|
gint clock_rate;
|
||||||
|
|
||||||
@ -342,29 +336,15 @@ gst_rtp_vorbis_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||||||
if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
|
if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
|
||||||
goto no_rate;
|
goto no_rate;
|
||||||
|
|
||||||
/* see how the configuration parameters will be transmitted */
|
|
||||||
delivery_method = gst_structure_get_string (structure, "delivery-method");
|
|
||||||
|
|
||||||
if (delivery_method) {
|
|
||||||
if (!g_ascii_strcasecmp (delivery_method, "inline")) {
|
|
||||||
/* configure string is in the caps */
|
|
||||||
} else if (!g_ascii_strcasecmp (delivery_method, "in_band")) {
|
|
||||||
/* headers will (also) be transmitted in the RTP packets */
|
|
||||||
goto unsupported_delivery_method;
|
|
||||||
} else if (g_str_has_prefix (delivery_method, "out_band/")) {
|
|
||||||
/* some other method of header delivery. */
|
|
||||||
goto unsupported_delivery_method;
|
|
||||||
} else
|
|
||||||
goto unsupported_delivery_method;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* read and parse configuration string */
|
/* read and parse configuration string */
|
||||||
configuration = gst_structure_get_string (structure, "configuration");
|
configuration = gst_structure_get_string (structure, "configuration");
|
||||||
if (configuration == NULL)
|
if (configuration) {
|
||||||
goto no_configuration;
|
if (!gst_rtp_vorbis_depay_parse_configuration (rtpvorbisdepay,
|
||||||
|
configuration))
|
||||||
if (!gst_rtp_vorbis_depay_parse_configuration (rtpvorbisdepay, configuration))
|
goto invalid_configuration;
|
||||||
goto invalid_configuration;
|
} else {
|
||||||
|
GST_WARNING_OBJECT (rtpvorbisdepay, "no configuration specified");
|
||||||
|
}
|
||||||
|
|
||||||
/* caps seem good, configure element */
|
/* caps seem good, configure element */
|
||||||
depayload->clock_rate = clock_rate;
|
depayload->clock_rate = clock_rate;
|
||||||
@ -377,17 +357,6 @@ gst_rtp_vorbis_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
unsupported_delivery_method:
|
|
||||||
{
|
|
||||||
GST_ERROR_OBJECT (rtpvorbisdepay,
|
|
||||||
"unsupported delivery-method \"%s\" specified", delivery_method);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
no_configuration:
|
|
||||||
{
|
|
||||||
GST_ERROR_OBJECT (rtpvorbisdepay, "no configuration specified");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
invalid_configuration:
|
invalid_configuration:
|
||||||
{
|
{
|
||||||
GST_ERROR_OBJECT (rtpvorbisdepay, "invalid configuration specified");
|
GST_ERROR_OBJECT (rtpvorbisdepay, "invalid configuration specified");
|
||||||
@ -632,7 +601,7 @@ bad_packet:
|
|||||||
}
|
}
|
||||||
switch_failed:
|
switch_failed:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (rtpvorbisdepay, STREAM, DECODE,
|
GST_ELEMENT_WARNING (rtpvorbisdepay, STREAM, DECODE,
|
||||||
(NULL), ("Could not switch codebooks"));
|
(NULL), ("Could not switch codebooks"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -32,14 +32,14 @@ GST_DEBUG_CATEGORY_STATIC (rtpvorbispay_debug);
|
|||||||
#define GST_CAT_DEFAULT (rtpvorbispay_debug)
|
#define GST_CAT_DEFAULT (rtpvorbispay_debug)
|
||||||
|
|
||||||
/* references:
|
/* references:
|
||||||
* http://svn.xiph.org/trunk/vorbis/doc/draft-ietf-avt-rtp-vorbis-04.txt
|
* http://www.rfc-editor.org/rfc/rfc5215.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* elementfactory information */
|
/* elementfactory information */
|
||||||
static const GstElementDetails gst_rtp_vorbispay_details =
|
static const GstElementDetails gst_rtp_vorbispay_details =
|
||||||
GST_ELEMENT_DETAILS ("RTP packet depayloader",
|
GST_ELEMENT_DETAILS ("RTP packet depayloader",
|
||||||
"Codec/Payloader/Network",
|
"Codec/Payloader/Network",
|
||||||
"Payload-encode Vorbis audio into RTP packets (draft-01 RFC XXXX)",
|
"Payload-encode Vorbis audio into RTP packets (RFC 5215)",
|
||||||
"Wim Taymans <wim@fluendo.com>");
|
"Wim Taymans <wim@fluendo.com>");
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_rtp_vorbis_pay_src_template =
|
static GstStaticPadTemplate gst_rtp_vorbis_pay_src_template =
|
||||||
@ -55,11 +55,6 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||||||
* "encoding-params = (string) <num channels>"
|
* "encoding-params = (string) <num channels>"
|
||||||
* "configuration = (string) ANY"
|
* "configuration = (string) ANY"
|
||||||
*/
|
*/
|
||||||
/* All optional parameters
|
|
||||||
*
|
|
||||||
* "delivery-method = (string) { inline, in_band, out_band/<specific_name> } "
|
|
||||||
* "configuration-uri ="
|
|
||||||
*/
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -410,11 +405,7 @@ gst_rtp_vorbis_pay_finish_headers (GstBaseRTPPayload * basepayload)
|
|||||||
gst_basertppayload_set_options (basepayload, "audio", TRUE, "VORBIS",
|
gst_basertppayload_set_options (basepayload, "audio", TRUE, "VORBIS",
|
||||||
rtpvorbispay->rate);
|
rtpvorbispay->rate);
|
||||||
gst_basertppayload_set_outcaps (basepayload, "encoding-params", G_TYPE_STRING,
|
gst_basertppayload_set_outcaps (basepayload, "encoding-params", G_TYPE_STRING,
|
||||||
cstr, "configuration", G_TYPE_STRING, configuration,
|
cstr, "configuration", G_TYPE_STRING, configuration, NULL);
|
||||||
"delivery-method", G_TYPE_STRING, "inline",
|
|
||||||
/* don't set the other defaults
|
|
||||||
*/
|
|
||||||
NULL);
|
|
||||||
g_free (cstr);
|
g_free (cstr);
|
||||||
g_free (configuration);
|
g_free (configuration);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user