summaryrefslogtreecommitdiffstats
path: root/gst/rtp/gstrtptheoradepay.c
diff options
context:
space:
mode:
authorOlivier Crete <tester@tester.ca>2008-01-11 17:21:30 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-01-11 17:21:30 +0000
commit4e1ff0164f5cf31086826cdd8ed72f372ba9decc (patch)
tree68074ccc50b6250d3717756560891d1b7fb81178 /gst/rtp/gstrtptheoradepay.c
parentd53e4a60b1b860962572de07e7a319f6cf99a625 (diff)
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.
Diffstat (limited to 'gst/rtp/gstrtptheoradepay.c')
-rw-r--r--gst/rtp/gstrtptheoradepay.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/gst/rtp/gstrtptheoradepay.c b/gst/rtp/gstrtptheoradepay.c
index ab364b93..d3989dc9 100644
--- a/gst/rtp/gstrtptheoradepay.c
+++ b/gst/rtp/gstrtptheoradepay.c
@@ -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