From 8603e03fd5b0e5e3bb62c0357b8f02bc7cac1420 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 8 Oct 2003 16:07:38 +0000 Subject: [PATCH] /GstBuffer/GstData/ in the API where you can pass events. Fix the plugins to deal with that. Fixes #113488. Original commit message from CVS: /GstBuffer/GstData/ in the API where you can pass events. Fix the plugins to deal with that. Fixes #113488. --- common | 2 +- ext/ffmpeg/gstffmpegdec.c | 5 +++-- ext/ffmpeg/gstffmpegdemux.c | 4 ++-- ext/ffmpeg/gstffmpegenc.c | 7 ++++--- ext/ffmpeg/gstffmpegmux.c | 2 +- ext/ffmpeg/gstffmpegprotocol.c | 6 +++--- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/common b/common index b7abb51..e903f88 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit b7abb510aa14e8692df39ea8c2c758e37d8a8d8a +Subproject commit e903f88a7388f0b463204ea1f960a4ace840175b diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index efab63a..e81c539 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -271,8 +271,9 @@ gst_ffmpegdec_release_buffer (AVCodecContext *context, static void gst_ffmpegdec_chain (GstPad *pad, - GstBuffer *inbuf) + GstData *_data) { + GstBuffer *inbuf = GST_BUFFER (_data); GstBuffer *outbuf = NULL; GstFFMpegDec *ffmpegdec = (GstFFMpegDec *)(gst_pad_get_parent (pad)); GstFFMpegDecClass *oclass = (GstFFMpegDecClass*)(G_OBJECT_GET_CLASS (ffmpegdec)); @@ -354,7 +355,7 @@ gst_ffmpegdec_chain (GstPad *pad, GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (inbuf); - gst_pad_push (ffmpegdec->srcpad, outbuf); + gst_pad_push (ffmpegdec->srcpad, GST_DATA (outbuf)); } size -= len; diff --git a/ext/ffmpeg/gstffmpegdemux.c b/ext/ffmpeg/gstffmpegdemux.c index 6815695..c0ead8a 100644 --- a/ext/ffmpeg/gstffmpegdemux.c +++ b/ext/ffmpeg/gstffmpegdemux.c @@ -246,7 +246,7 @@ gst_ffmpegdemux_loop (GstElement *element) pad = ffmpegdemux->srcpads[i]; if (GST_PAD_IS_USABLE (pad)) { gst_data_ref (GST_DATA (event)); - gst_pad_push (pad, GST_BUFFER (event)); + gst_pad_push (pad, GST_DATA (event)); } gst_data_unref (GST_DATA (event)); } @@ -332,7 +332,7 @@ gst_ffmpegdemux_loop (GstElement *element) GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_KEY_UNIT); } - gst_pad_push (pad, outbuf); + gst_pad_push (pad, GST_DATA (outbuf)); pkt.destruct (&pkt); } } diff --git a/ext/ffmpeg/gstffmpegenc.c b/ext/ffmpeg/gstffmpegenc.c index 4672dff..54fc65e 100644 --- a/ext/ffmpeg/gstffmpegenc.c +++ b/ext/ffmpeg/gstffmpegenc.c @@ -124,7 +124,7 @@ static void gst_ffmpegenc_dispose (GObject *object); static GstPadLinkReturn gst_ffmpegenc_connect (GstPad *pad, GstCaps *caps); -static void gst_ffmpegenc_chain (GstPad *pad, GstBuffer *buffer); +static void gst_ffmpegenc_chain (GstPad *pad, GstData *_data); static void gst_ffmpegenc_set_property (GObject *object, guint prop_id, @@ -339,8 +339,9 @@ gst_ffmpegenc_connect (GstPad *pad, static void gst_ffmpegenc_chain (GstPad *pad, - GstBuffer *inbuf) + GstData *_data) { + GstBuffer *inbuf = GST_BUFFER (_data); GstBuffer *outbuf = NULL; GstFFMpegEnc *ffmpegenc = (GstFFMpegEnc *)(gst_pad_get_parent (pad)); GstFFMpegEncClass *oclass = (GstFFMpegEncClass*)(G_OBJECT_GET_CLASS(ffmpegenc)); @@ -393,7 +394,7 @@ gst_ffmpegenc_chain (GstPad *pad, GST_BUFFER_SIZE (outbuf) = ret_size; GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (inbuf); GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (inbuf); - gst_pad_push (ffmpegenc->srcpad, outbuf); + gst_pad_push (ffmpegenc->srcpad, GST_DATA (outbuf)); gst_buffer_unref (inbuf); } diff --git a/ext/ffmpeg/gstffmpegmux.c b/ext/ffmpeg/gstffmpegmux.c index b789c90..9a693f4 100644 --- a/ext/ffmpeg/gstffmpegmux.c +++ b/ext/ffmpeg/gstffmpegmux.c @@ -321,7 +321,7 @@ gst_ffmpegmux_loop (GstElement *element) ffmpegmux->eos[i] == FALSE && ffmpegmux->bufferqueue[i] == NULL) { /* we can pull a buffer! */ - buf = gst_pad_pull (pad); + buf = GST_BUFFER (gst_pad_pull (pad)); if (GST_IS_EVENT (buf)) { if (GST_EVENT_TYPE (GST_EVENT (buf)) == GST_EVENT_EOS) { /* flag EOS on this stream */ diff --git a/ext/ffmpeg/gstffmpegprotocol.c b/ext/ffmpeg/gstffmpegprotocol.c index 5373eb9..6668868 100644 --- a/ext/ffmpeg/gstffmpegprotocol.c +++ b/ext/ffmpeg/gstffmpegprotocol.c @@ -151,7 +151,7 @@ gst_write (URLContext *h, GST_BUFFER_SIZE (outbuf) = size; memcpy (GST_BUFFER_DATA (outbuf), buf, size); - gst_pad_push (info->pad, outbuf); + gst_pad_push (info->pad, GST_DATA (outbuf)); return 0; } @@ -188,7 +188,7 @@ gst_seek (URLContext *h, case URL_WRONLY: { GstEvent *event = gst_event_new_seek (seek_type, pos); - gst_pad_push (info->pad, GST_BUFFER (event)); + gst_pad_push (info->pad, GST_DATA (event)); } break; } @@ -207,7 +207,7 @@ gst_close (URLContext *h) case URL_WRONLY: { /* send EOS - that closes down the stream */ GstEvent *event = gst_event_new (GST_EVENT_EOS); - gst_pad_push (info->pad, GST_BUFFER (event)); + gst_pad_push (info->pad, GST_DATA (event)); } break; -- 2.7.4