diff options
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | gst/rtp/gstrtptheoradepay.c | 9 | ||||
-rw-r--r-- | gst/rtp/gstrtpvorbisdepay.c | 32 | ||||
-rw-r--r-- | gst/rtp/gstrtpvorbispay.c | 2 |
4 files changed, 39 insertions, 22 deletions
@@ -1,3 +1,21 @@ +2008-06-13 Wim Taymans <wim.taymans@collabora.co.uk> + + Patch by: Olivier Crete <tester at tester dot ca> + + * gst/rtp/gstrtptheoradepay.c: (gst_rtp_theora_depay_setcaps): + Make the delivery-method mandatory on the caps and only accept inline + for now. + Reverse strcmp checks for delivery-method. + + * gst/rtp/gstrtpvorbisdepay.c: (gst_rtp_vorbis_depay_setcaps): + Make delivery method optional when parsing caps and note this in the + caps. + Reverse strcmp checks for delivery-method. + + * gst/rtp/gstrtpvorbispay.c: + Update a comment to note that the delivery-method is optional, + Fixes #537675. + 2008-06-12 Wim Taymans <wim.taymans@collabora.co.uk> * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_stream_configure_mcast): diff --git a/gst/rtp/gstrtptheoradepay.c b/gst/rtp/gstrtptheoradepay.c index e3c229e7..fd64c145 100644 --- a/gst/rtp/gstrtptheoradepay.c +++ b/gst/rtp/gstrtptheoradepay.c @@ -44,7 +44,9 @@ GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"video\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " - "clock-rate = (int) 90000, " "encoding-name = (string) \"THEORA\"" + "clock-rate = (int) 90000, " "encoding-name = (string) \"THEORA\"," + /* only support inline delivery */ + "delivery-method = (string) \"inline\"" /* All required parameters * * "sampling = (string) { "YCbCr-4:2:0", "YCbCr-4:2:2", "YCbCr-4:4:4" } " @@ -339,10 +341,11 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) if (delivery_method == NULL) goto no_delivery_method; - if (g_ascii_strcasecmp (delivery_method, "inline")) { + if (!g_ascii_strcasecmp (delivery_method, "inline")) { /* configure string is in the caps */ - } else if (g_ascii_strcasecmp (delivery_method, "in_band")) { + } 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; diff --git a/gst/rtp/gstrtpvorbisdepay.c b/gst/rtp/gstrtpvorbisdepay.c index 46afd2b4..7bee8830 100644 --- a/gst/rtp/gstrtpvorbisdepay.c +++ b/gst/rtp/gstrtpvorbisdepay.c @@ -52,11 +52,11 @@ GST_STATIC_PAD_TEMPLATE ("sink", /* All required parameters * * "encoding-params = (string) <num channels>" - * "delivery-method = (string) { inline, in_band, out_band/<specific_name> } " * "configuration = (string) ANY" */ /* All optional parameters * + * "delivery-method = (string) { inline, in_band, out_band/<specific_name> } " * "configuration-uri =" */ ) @@ -344,18 +344,19 @@ gst_rtp_vorbis_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) /* see how the configuration parameters will be transmitted */ delivery_method = gst_structure_get_string (structure, "delivery-method"); - if (delivery_method == NULL) - goto no_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 */ - } 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; + + 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"); @@ -382,11 +383,6 @@ unsupported_delivery_method: "unsupported delivery-method \"%s\" specified", delivery_method); return FALSE; } -no_delivery_method: - { - GST_ERROR_OBJECT (rtpvorbisdepay, "no delivery-method specified"); - return FALSE; - } no_configuration: { GST_ERROR_OBJECT (rtpvorbisdepay, "no configuration specified"); diff --git a/gst/rtp/gstrtpvorbispay.c b/gst/rtp/gstrtpvorbispay.c index f9fa15b2..65e093af 100644 --- a/gst/rtp/gstrtpvorbispay.c +++ b/gst/rtp/gstrtpvorbispay.c @@ -53,11 +53,11 @@ GST_STATIC_PAD_TEMPLATE ("src", /* All required parameters * * "encoding-params = (string) <num channels>" - * "delivery-method = (string) { inline, in_band, out_band/<specific_name> } " * "configuration = (string) ANY" */ /* All optional parameters * + * "delivery-method = (string) { inline, in_band, out_band/<specific_name> } " * "configuration-uri =" */ ) |