gst/rtp/gstrtptheorapay.c: The Theora RTP payloader only supports the "inline" delievery method so let's declare this...

Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* gst/rtp/gstrtptheorapay.c:
The Theora RTP payloader only supports the "inline" delievery method
so let's declare this on the caps of the static pad template.
Fixes bug #537675.
This commit is contained in:
Olivier Crete 2008-06-11 08:56:16 +00:00 committed by Sebastian Dröge
parent 06fa431cef
commit 86c4b045ea
2 changed files with 35 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2008-06-11 Sebastian Dröge <slomo@circular-chaos.org>
Patch by: Olivier Crete <tester at tester dot ca>
* gst/rtp/gstrtptheorapay.c:
The Theora RTP payloader only supports the "inline" delievery method
so let's declare this on the caps of the static pad template.
Fixes bug #537675.
2008-06-10 Wim Taymans <wim.taymans@collabora.co.uk> 2008-06-10 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/videomixer/videomixer.c: (gst_videomixer_fill_queues), * gst/videomixer/videomixer.c: (gst_videomixer_fill_queues),

View file

@ -51,7 +51,8 @@ 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" } "
@ -101,7 +102,9 @@ static void
gst_rtp_theora_pay_class_init (GstRtpTheoraPayClass * klass) gst_rtp_theora_pay_class_init (GstRtpTheoraPayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstBaseRTPPayloadClass *gstbasertppayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
@ -188,7 +191,9 @@ static GstFlowReturn
gst_rtp_theora_pay_flush_packet (GstRtpTheoraPay * rtptheorapay) gst_rtp_theora_pay_flush_packet (GstRtpTheoraPay * rtptheorapay)
{ {
GstFlowReturn ret; GstFlowReturn ret;
guint8 *payload; guint8 *payload;
guint hlen; guint hlen;
/* check for empty packet */ /* check for empty packet */
@ -236,6 +241,7 @@ static gchar *
encode_base64 (const guint8 * in, guint size, guint * len) encode_base64 (const guint8 * in, guint size, guint * len)
{ {
gchar *ret, *d; gchar *ret, *d;
static const gchar *v = static const gchar *v =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@ -261,10 +267,15 @@ static gboolean
gst_rtp_theora_pay_finish_headers (GstBaseRTPPayload * basepayload) gst_rtp_theora_pay_finish_headers (GstBaseRTPPayload * basepayload)
{ {
GstRtpTheoraPay *rtptheorapay = GST_RTP_THEORA_PAY (basepayload); GstRtpTheoraPay *rtptheorapay = GST_RTP_THEORA_PAY (basepayload);
GList *walk; GList *walk;
guint length, size, n_headers, configlen; guint length, size, n_headers, configlen;
gchar *wstr, *hstr, *configuration; gchar *wstr, *hstr, *configuration;
guint8 *data, *config; guint8 *data, *config;
guint32 ident; guint32 ident;
GST_DEBUG_OBJECT (rtptheorapay, "finish headers"); GST_DEBUG_OBJECT (rtptheorapay, "finish headers");
@ -322,6 +333,7 @@ gst_rtp_theora_pay_finish_headers (GstBaseRTPPayload * basepayload)
ident = fnv1_hash_32_new (); ident = fnv1_hash_32_new ();
for (walk = rtptheorapay->headers; walk; walk = g_list_next (walk)) { for (walk = rtptheorapay->headers; walk; walk = g_list_next (walk)) {
GstBuffer *buf = GST_BUFFER_CAST (walk->data); GstBuffer *buf = GST_BUFFER_CAST (walk->data);
guint bsize; guint bsize;
bsize = GST_BUFFER_SIZE (buf); bsize = GST_BUFFER_SIZE (buf);
@ -371,6 +383,7 @@ gst_rtp_theora_pay_finish_headers (GstBaseRTPPayload * basepayload)
/* store length for each header */ /* store length for each header */
for (walk = rtptheorapay->headers; walk; walk = g_list_next (walk)) { for (walk = rtptheorapay->headers; walk; walk = g_list_next (walk)) {
GstBuffer *buf = GST_BUFFER_CAST (walk->data); GstBuffer *buf = GST_BUFFER_CAST (walk->data);
guint bsize, size, temp; guint bsize, size, temp;
/* only need to store the length when it's not the last header */ /* only need to store the length when it's not the last header */
@ -441,6 +454,7 @@ gst_rtp_theora_pay_parse_id (GstBaseRTPPayload * basepayload, guint8 * data,
guint size) guint size)
{ {
GstRtpTheoraPay *rtptheorapay; GstRtpTheoraPay *rtptheorapay;
gint width, height; gint width, height;
rtptheorapay = GST_RTP_THEORA_PAY (basepayload); rtptheorapay = GST_RTP_THEORA_PAY (basepayload);
@ -498,15 +512,25 @@ gst_rtp_theora_pay_handle_buffer (GstBaseRTPPayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpTheoraPay *rtptheorapay; GstRtpTheoraPay *rtptheorapay;
GstFlowReturn ret; GstFlowReturn ret;
guint size, newsize; guint size, newsize;
guint8 *data; guint8 *data;
guint packet_len; guint packet_len;
GstClockTime duration, newduration, timestamp; GstClockTime duration, newduration, timestamp;
gboolean flush; gboolean flush;
guint8 TDT; guint8 TDT;
guint plen; guint plen;
guint8 *ppos, *payload; guint8 *ppos, *payload;
gboolean fragmented; gboolean fragmented;
rtptheorapay = GST_RTP_THEORA_PAY (basepayload); rtptheorapay = GST_RTP_THEORA_PAY (basepayload);
@ -679,6 +703,7 @@ gst_rtp_theora_pay_change_state (GstElement * element,
GstStateChange transition) GstStateChange transition)
{ {
GstRtpTheoraPay *rtptheorapay; GstRtpTheoraPay *rtptheorapay;
GstStateChangeReturn ret; GstStateChangeReturn ret;
rtptheorapay = GST_RTP_THEORA_PAY (element); rtptheorapay = GST_RTP_THEORA_PAY (element);