diff --git a/ChangeLog b/ChangeLog index acaaed962c..239a94db4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-08-15 Wim Taymans + + Patch by: Olivier Crete + + * 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 * gst/qtdemux/qtdemux.c: Add 'hdv6' as a HDV format for 1080i/60 diff --git a/gst/rtp/gstrtpvorbisdepay.c b/gst/rtp/gstrtpvorbisdepay.c index 7bee88301f..a44287bc24 100644 --- a/gst/rtp/gstrtpvorbisdepay.c +++ b/gst/rtp/gstrtpvorbisdepay.c @@ -31,14 +31,14 @@ GST_DEBUG_CATEGORY_STATIC (rtpvorbisdepay_debug); #define GST_CAT_DEFAULT (rtpvorbisdepay_debug) /* 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 */ static const GstElementDetails gst_rtp_vorbis_depay_details = GST_ELEMENT_DETAILS ("RTP packet depayloader", "Codec/Depayloader/Network", - "Extracts Vorbis Audio from RTP packets (draft-04 of RFC XXXX)", + "Extracts Vorbis Audio from RTP packets (RFC 5215)", "Wim Taymans "); static GstStaticPadTemplate gst_rtp_vorbis_depay_sink_template = @@ -54,11 +54,6 @@ GST_STATIC_PAD_TEMPLATE ("sink", * "encoding-params = (string) " * "configuration = (string) ANY" */ - /* All optional parameters - * - * "delivery-method = (string) { inline, in_band, out_band/ } " - * "configuration-uri =" - */ ) ); @@ -330,7 +325,6 @@ gst_rtp_vorbis_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) GstStructure *structure; GstRtpVorbisDepay *rtpvorbisdepay; GstCaps *srccaps; - const gchar *delivery_method; const gchar *configuration; 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)) 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 */ configuration = gst_structure_get_string (structure, "configuration"); - if (configuration == NULL) - goto no_configuration; - - if (!gst_rtp_vorbis_depay_parse_configuration (rtpvorbisdepay, configuration)) - goto invalid_configuration; + if (configuration) { + if (!gst_rtp_vorbis_depay_parse_configuration (rtpvorbisdepay, + configuration)) + goto invalid_configuration; + } else { + GST_WARNING_OBJECT (rtpvorbisdepay, "no configuration specified"); + } /* caps seem good, configure element */ depayload->clock_rate = clock_rate; @@ -377,17 +357,6 @@ gst_rtp_vorbis_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) return TRUE; /* 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: { GST_ERROR_OBJECT (rtpvorbisdepay, "invalid configuration specified"); @@ -632,7 +601,7 @@ bad_packet: } switch_failed: { - GST_ELEMENT_ERROR (rtpvorbisdepay, STREAM, DECODE, + GST_ELEMENT_WARNING (rtpvorbisdepay, STREAM, DECODE, (NULL), ("Could not switch codebooks")); return NULL; } diff --git a/gst/rtp/gstrtpvorbispay.c b/gst/rtp/gstrtpvorbispay.c index 65e093af12..0c13a09f5f 100644 --- a/gst/rtp/gstrtpvorbispay.c +++ b/gst/rtp/gstrtpvorbispay.c @@ -32,14 +32,14 @@ GST_DEBUG_CATEGORY_STATIC (rtpvorbispay_debug); #define GST_CAT_DEFAULT (rtpvorbispay_debug) /* 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 */ static const GstElementDetails gst_rtp_vorbispay_details = GST_ELEMENT_DETAILS ("RTP packet depayloader", "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 "); static GstStaticPadTemplate gst_rtp_vorbis_pay_src_template = @@ -55,11 +55,6 @@ GST_STATIC_PAD_TEMPLATE ("src", * "encoding-params = (string) " * "configuration = (string) ANY" */ - /* All optional parameters - * - * "delivery-method = (string) { inline, in_band, out_band/ } " - * "configuration-uri =" - */ ) ); @@ -410,11 +405,7 @@ gst_rtp_vorbis_pay_finish_headers (GstBaseRTPPayload * basepayload) gst_basertppayload_set_options (basepayload, "audio", TRUE, "VORBIS", rtpvorbispay->rate); gst_basertppayload_set_outcaps (basepayload, "encoding-params", G_TYPE_STRING, - cstr, "configuration", G_TYPE_STRING, configuration, - "delivery-method", G_TYPE_STRING, "inline", - /* don't set the other defaults - */ - NULL); + cstr, "configuration", G_TYPE_STRING, configuration, NULL); g_free (cstr); g_free (configuration);