rtptheora: remove delivery-method from caps

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
This commit is contained in:
Wim Taymans 2010-05-25 17:05:12 +02:00
parent d148ec0ad2
commit 49463a37cb
2 changed files with 4 additions and 26 deletions

View file

@ -37,9 +37,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
GST_STATIC_CAPS ("application/x-rtp, " GST_STATIC_CAPS ("application/x-rtp, "
"media = (string) \"video\", " "media = (string) \"video\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "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 /* All required parameters
* *
* "sampling = (string) { "YCbCr-4:2:0", "YCbCr-4:2:2", "YCbCr-4:4:4" } " * "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; GstStructure *structure;
GstRtpTheoraDepay *rtptheoradepay; GstRtpTheoraDepay *rtptheoradepay;
GstCaps *srccaps; GstCaps *srccaps;
const gchar *delivery_method;
const gchar *configuration; const gchar *configuration;
gboolean res; gboolean res;
@ -313,9 +310,6 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
structure = gst_caps_get_structure (caps, 0); 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 */ /* read and parse configuration string */
configuration = gst_structure_get_string (structure, "configuration"); configuration = gst_structure_get_string (structure, "configuration");
if (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)) if (!gst_rtp_theora_depay_parse_configuration (rtptheoradepay, confbuf))
goto invalid_configuration; 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 */ /* set caps on pad and on header */
srccaps = gst_caps_new_simple ("video/x-theora", NULL); srccaps = gst_caps_new_simple ("video/x-theora", NULL);
@ -358,12 +344,6 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
return res; return res;
/* ERRORS */ /* ERRORS */
unsupported_delivery_method:
{
GST_ERROR_OBJECT (rtptheoradepay,
"unsupported delivery-method \"%s\" specified", delivery_method);
return FALSE;
}
no_configuration: no_configuration:
{ {
GST_ERROR_OBJECT (rtptheoradepay, "no configuration specified"); GST_ERROR_OBJECT (rtptheoradepay, "no configuration specified");

View file

@ -44,19 +44,18 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS ("application/x-rtp, " GST_STATIC_CAPS ("application/x-rtp, "
"media = (string) \"video\", " "media = (string) \"video\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
"clock-rate = (int) 90000, " "encoding-name = (string) \"THEORA\", " "clock-rate = (int) 90000, " "encoding-name = (string) \"THEORA\""
"delivery-method = (string) \"inline\""
/* All required parameters /* All required parameters
* *
* "sampling = (string) { "YCbCr-4:2:0", "YCbCr-4:2:2", "YCbCr-4:4:4" } " * "sampling = (string) { "YCbCr-4:2:0", "YCbCr-4:2:2", "YCbCr-4:4:4" } "
* "width = (string) [1, 1048561] (multiples of 16) " * "width = (string) [1, 1048561] (multiples of 16) "
* "height = (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" * "configuration = (string) ANY"
*/ */
/* All optional parameters /* All optional parameters
* *
* "configuration-uri =" * "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, "width", G_TYPE_STRING, wstr,
"height", G_TYPE_STRING, hstr, "height", G_TYPE_STRING, hstr,
"configuration", G_TYPE_STRING, configuration, "configuration", G_TYPE_STRING, configuration,
"delivery-method", G_TYPE_STRING, "inline",
/* don't set the other defaults /* don't set the other defaults
*/ */
NULL); NULL);