+2008-01-11 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):
+ * gst/rtp/gstrtptheorapay.c:
+ Fix the clock rate to 90000 as required by the RFC.
+ Fixes #508644.
+
2008-01-11 Tim-Philipp Müller <tim at centricular dot net>
* tests/check/elements/icydemux.c: (GST_START_TEST), (icydemux_suite):
GST_STATIC_CAPS ("application/x-rtp, "
"media = (string) \"video\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
- "clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"THEORA\""
+ "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" } "
GstCaps *srccaps;
const gchar *delivery_method;
const gchar *configuration;
- gint clock_rate;
rtptheoradepay = GST_RTP_THEORA_DEPAY (depayload);
structure = gst_caps_get_structure (caps, 0);
- /* get clockrate */
- 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 == NULL)
if (!gst_rtp_theora_depay_parse_configuration (rtptheoradepay, configuration))
goto invalid_configuration;
- /* caps seem good, configure element */
- depayload->clock_rate = clock_rate;
-
/* set caps on pad and on header */
srccaps = gst_caps_new_simple ("video/x-theora", NULL);
gst_pad_set_caps (depayload->srcpad, srccaps);
gst_caps_unref (srccaps);
+ /* Clock rate is always 90000 according to draft-barbato-avt-rtp-theora-01 */
+ depayload->clock_rate = 90000;
+
return TRUE;
/* ERRORS */
GST_ERROR_OBJECT (rtptheoradepay, "invalid configuration specified");
return FALSE;
}
-no_rate:
- {
- GST_ERROR_OBJECT (rtptheoradepay, "no clock-rate specified");
- return FALSE;
- }
}
static gboolean
GST_STATIC_CAPS ("application/x-rtp, "
"media = (string) \"video\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
- "clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"THEORA\""
+ "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" } "