From 2ba1de92a4c4e8399b2b285daf2f9b15e651a537 Mon Sep 17 00:00:00 2001 From: Olivier Crete Date: Fri, 13 Jun 2008 09:39:41 +0000 Subject: gst/rtp/gstrtptheoradepay.c: Make the delivery-method mandatory on the caps and only accept inline for now. Original commit message from CVS: Patch by: Olivier Crete * 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. --- gst/rtp/gstrtptheoradepay.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gst/rtp/gstrtptheoradepay.c') 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; -- cgit