mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gst/rtp/: Fix the clock rate to 90000 as required by the RFC.
Original commit message from CVS: 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.
This commit is contained in:
parent
d53e4a60b1
commit
4e1ff0164f
3 changed files with 14 additions and 15 deletions
|
@ -1,3 +1,12 @@
|
|||
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):
|
||||
|
|
|
@ -44,7 +44,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) [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" } "
|
||||
|
@ -329,16 +329,11 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||
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)
|
||||
|
@ -362,14 +357,14 @@ gst_rtp_theora_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||
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 */
|
||||
|
@ -394,11 +389,6 @@ invalid_configuration:
|
|||
GST_ERROR_OBJECT (rtptheoradepay, "invalid configuration specified");
|
||||
return FALSE;
|
||||
}
|
||||
no_rate:
|
||||
{
|
||||
GST_ERROR_OBJECT (rtptheoradepay, "no clock-rate specified");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -51,7 +51,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||
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" } "
|
||||
|
|
Loading…
Reference in a new issue