rtptheora: remove delivery-method from caps
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 25 May 2010 15:05:12 +0000 (17:05 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 25 May 2010 16:53:48 +0000 (18:53 +0200)
We can accept all delivery methods so don't advertise anything on the caps or
parse anything, we will handle whatever we receive.

Fixes #618940

gst/rtp/gstrtptheoradepay.c
gst/rtp/gstrtptheorapay.c

index 2e281bf..27ba21c 100644 (file)
@@ -37,9 +37,7 @@ 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\","
-        /* only support inline delivery */
-        "delivery-method = (string) \"inline\""
+        "clock-rate = (int) 90000, " "encoding-name = (string) \"THEORA\""
         /* All required parameters 
          *
          * "sampling = (string) { "YCbCr-4:2:0", "YCbCr-4:2:2", "YCbCr-4:4:4" } "
@@ -305,7 +303,6 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
   GstStructure *structure;
   GstRtpTheoraDepay *rtptheoradepay;
   GstCaps *srccaps;
-  const gchar *delivery_method;
   const gchar *configuration;
   gboolean res;
 
@@ -313,9 +310,6 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
 
   structure = gst_caps_get_structure (caps, 0);
 
-  /* see how the configuration parameters will be transmitted */
-  delivery_method = gst_structure_get_string (structure, "delivery-method");
-
   /* read and parse configuration string */
   configuration = gst_structure_get_string (structure, "configuration");
   if (configuration) {
@@ -337,15 +331,7 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
 
     if (!gst_rtp_theora_depay_parse_configuration (rtptheoradepay, confbuf))
       goto invalid_configuration;
-  } else if (!delivery_method ||
-      !g_ascii_strcasecmp (delivery_method, "in_band")) {
-    /* headers will (also) be transmitted in the RTP packets */
-    GST_DEBUG_OBJECT (rtptheoradepay, "expecting in_band configuration");
-  } 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;
+  }
 
   /* set caps on pad and on header */
   srccaps = gst_caps_new_simple ("video/x-theora", NULL);
@@ -358,12 +344,6 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
   return res;
 
   /* ERRORS */
-unsupported_delivery_method:
-  {
-    GST_ERROR_OBJECT (rtptheoradepay,
-        "unsupported delivery-method \"%s\" specified", delivery_method);
-    return FALSE;
-  }
 no_configuration:
   {
     GST_ERROR_OBJECT (rtptheoradepay, "no configuration specified");
index 0bdee39..17bc640 100644 (file)
@@ -44,19 +44,18 @@ GST_STATIC_PAD_TEMPLATE ("src",
     GST_STATIC_CAPS ("application/x-rtp, "
         "media = (string) \"video\", "
         "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
-        "clock-rate = (int) 90000, " "encoding-name = (string) \"THEORA\", "
-        "delivery-method = (string) \"inline\""
+        "clock-rate = (int) 90000, " "encoding-name = (string) \"THEORA\""
         /* All required parameters
          *
          * "sampling = (string) { "YCbCr-4:2:0", "YCbCr-4:2:2", "YCbCr-4:4:4" } "
          * "width = (string) [1, 1048561] (multiples of 16) "
          * "height = (string) [1, 1048561] (multiples of 16) "
-         * "delivery-method = (string) { inline, in_band, out_band/<specific_name> } "
          * "configuration = (string) ANY"
          */
         /* All optional parameters
          *
          * "configuration-uri ="
+         * "delivery-method = (string) { inline, in_band, out_band/<specific_name> } "
          */
     )
     );
@@ -435,7 +434,6 @@ gst_rtp_theora_pay_finish_headers (GstBaseRTPPayload * basepayload)
       "width", G_TYPE_STRING, wstr,
       "height", G_TYPE_STRING, hstr,
       "configuration", G_TYPE_STRING, configuration,
-      "delivery-method", G_TYPE_STRING, "inline",
       /* don't set the other defaults 
        */
       NULL);