diff options
author | Andy Wingo <wingo@pobox.com> | 2003-10-08 16:08:18 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2003-10-08 16:08:18 +0000 |
commit | f2d5cae8daade402e9d74a829d2b87283167aaa7 (patch) | |
tree | cbb13b82d43fa41ffaf6c93973e80c2f620ebf8e /gst | |
parent | 9246e543319c072c52fffa51259a2cf927c8dd43 (diff) |
/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.
Diffstat (limited to 'gst')
43 files changed, 192 insertions, 155 deletions
diff --git a/gst/audiofx/audiowsincband.c b/gst/audiofx/audiowsincband.c index 68af7a28..be9feec7 100644 --- a/gst/audiofx/audiowsincband.c +++ b/gst/audiofx/audiowsincband.c @@ -104,7 +104,7 @@ static void gst_bpwsinc_set_property (GObject * object, guint prop_id, static void gst_bpwsinc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_bpwsinc_chain (GstPad * pad, GstBuffer * buf); +static void gst_bpwsinc_chain (GstPad * pad, GstData *_data); static GstPadLinkReturn gst_bpwsinc_sink_connect (GstPad * pad, GstCaps * caps); @@ -273,8 +273,9 @@ gst_bpwsinc_sink_connect (GstPad * pad, GstCaps * caps) } static void -gst_bpwsinc_chain (GstPad *pad, GstBuffer *buf) +gst_bpwsinc_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstBPWSinc *filter; gfloat *src; gfloat *input; @@ -321,7 +322,7 @@ gst_bpwsinc_chain (GstPad *pad, GstBuffer *buf) } g_free (input); - gst_pad_push (filter->srcpad, buf); + gst_pad_push (filter->srcpad, GST_DATA (buf)); } static void diff --git a/gst/audiofx/audiowsinclimit.c b/gst/audiofx/audiowsinclimit.c index 54eb81d3..18bebef7 100644 --- a/gst/audiofx/audiowsinclimit.c +++ b/gst/audiofx/audiowsinclimit.c @@ -101,7 +101,7 @@ static void gst_lpwsinc_set_property (GObject * object, guint prop_id, static void gst_lpwsinc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_lpwsinc_chain (GstPad * pad, GstBuffer * buf); +static void gst_lpwsinc_chain (GstPad * pad, GstData *_data); static GstPadLinkReturn gst_lpwsinc_sink_connect (GstPad * pad, GstCaps * caps); @@ -221,8 +221,9 @@ gst_lpwsinc_sink_connect (GstPad * pad, GstCaps * caps) } static void -gst_lpwsinc_chain (GstPad * pad, GstBuffer * buf) +gst_lpwsinc_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstLPWSinc *filter; gfloat *src; gfloat *input; @@ -269,7 +270,7 @@ gst_lpwsinc_chain (GstPad * pad, GstBuffer * buf) } g_free (input); - gst_pad_push (filter->srcpad, buf); + gst_pad_push (filter->srcpad, GST_DATA (buf)); } static void diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index f2ce8c85..744b5cb3 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -128,7 +128,7 @@ enum { static void gst_auparse_class_init (GstAuParseClass *klass); static void gst_auparse_init (GstAuParse *auparse); -static void gst_auparse_chain (GstPad *pad,GstBuffer *buf); +static void gst_auparse_chain (GstPad *pad,GstData *_data); static GstElementClass *parent_class = NULL; /*static guint gst_auparse_signals[LAST_SIGNAL] = { 0 }; */ @@ -184,8 +184,9 @@ gst_auparse_init (GstAuParse *auparse) } static void -gst_auparse_chain (GstPad *pad, GstBuffer *buf) +gst_auparse_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstAuParse *auparse; gchar *data; glong size; @@ -305,11 +306,11 @@ gst_auparse_chain (GstPad *pad, GstBuffer *buf) gst_buffer_unref (buf); - gst_pad_push (auparse->srcpad, newbuf); + gst_pad_push (auparse->srcpad, GST_DATA (newbuf)); return; } - gst_pad_push (auparse->srcpad, buf); + gst_pad_push (auparse->srcpad, GST_DATA (buf)); } diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index 70170309..09fe61a3 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -1599,7 +1599,7 @@ gst_avi_demux_handle_sink_event (GstAviDemux *avi_demux) discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, avi_demux->last_seek + stream->delay , NULL); - gst_pad_push (stream->pad, GST_BUFFER (discont)); + gst_pad_push (stream->pad, GST_DATA (discont)); } } break; @@ -1807,7 +1807,7 @@ gst_avi_demux_loop (GstElement *element) else { if (GST_PAD_IS_USABLE (stream->pad)) { if (next_ts >= stream->end_pos) { - gst_pad_push (stream->pad, GST_BUFFER (gst_event_new (GST_EVENT_EOS))); + gst_pad_push (stream->pad, GST_DATA (gst_event_new (GST_EVENT_EOS))); GST_DEBUG ("end stream %d: %" G_GINT64_FORMAT " %d %" G_GINT64_FORMAT, stream_id, next_ts, stream->current_frame - 1, stream->end_pos); @@ -1833,7 +1833,7 @@ gst_avi_demux_loop (GstElement *element) stream_id, next_ts, stream->current_frame - 1, stream->delay, chunk.size); - gst_pad_push(stream->pad, buf); + gst_pad_push(stream->pad, GST_DATA (buf)); } } } diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c index ee392164..74bc1731 100644 --- a/gst/avi/gstavimux.c +++ b/gst/avi/gstavimux.c @@ -919,14 +919,14 @@ gst_avimux_write_index (GstAviMux *avimux) memcpy(GST_BUFFER_DATA(buffer), "idx1", 4); temp32 = LE_FROM_GUINT32(avimux->idx_index * sizeof(gst_riff_index_entry)); memcpy(GST_BUFFER_DATA(buffer)+4, &temp32, 4); - gst_pad_push(avimux->srcpad, buffer); + gst_pad_push(avimux->srcpad, GST_DATA (buffer)); buffer = gst_buffer_new(); GST_BUFFER_SIZE(buffer) = avimux->idx_index * sizeof(gst_riff_index_entry); GST_BUFFER_DATA(buffer) = (unsigned char*) avimux->idx; avimux->idx = NULL; /* will be free()'ed by gst_buffer_unref() */ avimux->total_data += GST_BUFFER_SIZE(buffer); - gst_pad_push(avimux->srcpad, buffer); + gst_pad_push(avimux->srcpad, GST_DATA (buffer)); avimux->idx_size += avimux->idx_index * sizeof(gst_riff_index_entry) + 8; @@ -962,18 +962,18 @@ gst_avimux_bigfile(GstAviMux *avimux, gboolean last) GST_SEEK_FLAG_FLUSH, avimux->avix_start); /* if the event succeeds */ - gst_pad_push(avimux->srcpad, GST_BUFFER(event)); + gst_pad_push(avimux->srcpad, GST_DATA(event)); /* rewrite AVIX header */ header = gst_avimux_riff_get_avix_header(avimux->datax_size); - gst_pad_push(avimux->srcpad, header); + gst_pad_push(avimux->srcpad, GST_DATA (header)); /* go back to current location */ event = gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, avimux->total_data); - gst_pad_push(avimux->srcpad, GST_BUFFER(event)); + gst_pad_push(avimux->srcpad, GST_DATA(event)); } avimux->avix_start = avimux->total_data; @@ -986,7 +986,7 @@ gst_avimux_bigfile(GstAviMux *avimux, gboolean last) header = gst_avimux_riff_get_avix_header(0); avimux->total_data += GST_BUFFER_SIZE(header); - gst_pad_push(avimux->srcpad, header); + gst_pad_push(avimux->srcpad, GST_DATA (header)); } /* enough header blabla now, let's go on to actually writing the headers */ @@ -1019,7 +1019,7 @@ gst_avimux_start_file (GstAviMux *avimux) header = gst_avimux_riff_get_avi_header(avimux); avimux->total_data += GST_BUFFER_SIZE(header); avimux->idx_offset = avimux->total_data; - gst_pad_push(avimux->srcpad, header); + gst_pad_push(avimux->srcpad, GST_DATA (header)); avimux->write_header = FALSE; avimux->restart = FALSE; @@ -1080,11 +1080,11 @@ gst_avimux_stop_file (GstAviMux *avimux) header = gst_avimux_riff_get_avi_header(avimux); event = gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_SET, 0); - gst_pad_push(avimux->srcpad, GST_BUFFER(event)); - gst_pad_push(avimux->srcpad, header); + gst_pad_push(avimux->srcpad, GST_DATA(event)); + gst_pad_push(avimux->srcpad, GST_DATA (header)); event = gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_SET, avimux->total_data); - gst_pad_push(avimux->srcpad, GST_BUFFER(event)); + gst_pad_push(avimux->srcpad, GST_DATA(event)); } avimux->write_header = TRUE; @@ -1098,7 +1098,7 @@ gst_avimux_restart_file (GstAviMux *avimux) gst_avimux_stop_file(avimux); event = gst_event_new(GST_EVENT_EOS); - gst_pad_push(avimux->srcpad, GST_BUFFER(event)); + gst_pad_push(avimux->srcpad, GST_DATA(event)); gst_avimux_start_file(avimux); } @@ -1145,7 +1145,7 @@ gst_avimux_fill_queue (GstAviMux *avimux) GST_PAD_IS_USABLE(avimux->audiosinkpad) && !avimux->audio_pad_eos) { - buffer = gst_pad_pull(avimux->audiosinkpad); + buffer = GST_BUFFER (gst_pad_pull(avimux->audiosinkpad)); if (GST_IS_EVENT(buffer)) { gst_avimux_handle_event(avimux->audiosinkpad, GST_EVENT(buffer)); } else { @@ -1160,7 +1160,7 @@ gst_avimux_fill_queue (GstAviMux *avimux) GST_PAD_IS_USABLE(avimux->videosinkpad) && !avimux->video_pad_eos) { - buffer = gst_pad_pull(avimux->videosinkpad); + buffer = GST_BUFFER (gst_pad_pull(avimux->videosinkpad)); if (GST_IS_EVENT(buffer)) { gst_avimux_handle_event(avimux->videosinkpad, GST_EVENT(buffer)); } else { @@ -1183,7 +1183,7 @@ gst_avimux_send_pad_data (GstAviMux *avimux, GST_BUFFER_DATA(buffer) = g_malloc(num_bytes); memset(GST_BUFFER_DATA(buffer), 0, num_bytes); - gst_pad_push(avimux->srcpad, buffer); + gst_pad_push(avimux->srcpad, GST_DATA (buffer)); } /* do audio buffer */ @@ -1212,8 +1212,8 @@ gst_avimux_do_audio_buffer (GstAviMux *avimux) gst_avimux_add_index(avimux, "01wb", 0x0, GST_BUFFER_SIZE(data)); } - gst_pad_push(avimux->srcpad, header); - gst_pad_push(avimux->srcpad, data); + gst_pad_push(avimux->srcpad, GST_DATA (header)); + gst_pad_push(avimux->srcpad, GST_DATA (data)); if (pad_bytes) { gst_avimux_send_pad_data(avimux, pad_bytes); } @@ -1265,8 +1265,8 @@ gst_avimux_do_video_buffer (GstAviMux *avimux) gst_avimux_add_index(avimux, "00db", flags, GST_BUFFER_SIZE(data)); } - gst_pad_push(avimux->srcpad, header); - gst_pad_push(avimux->srcpad, data); + gst_pad_push(avimux->srcpad, GST_DATA (header)); + gst_pad_push(avimux->srcpad, GST_DATA (data)); if (pad_bytes) { gst_avimux_send_pad_data(avimux, pad_bytes); } @@ -1302,7 +1302,7 @@ gst_avimux_do_one_buffer (GstAviMux *avimux) /* simply finish off the file and send EOS */ gst_avimux_stop_file(avimux); gst_pad_push(avimux->srcpad, - GST_BUFFER(gst_event_new(GST_EVENT_EOS))); + GST_DATA(gst_event_new(GST_EVENT_EOS))); gst_element_set_eos(GST_ELEMENT(avimux)); return FALSE; } diff --git a/gst/cutter/gstcutter.c b/gst/cutter/gstcutter.c index 071fdf1c..28fc95ab 100644 --- a/gst/cutter/gstcutter.c +++ b/gst/cutter/gstcutter.c @@ -95,7 +95,7 @@ static void gst_cutter_set_property (GObject *object, guint prop_id, static void gst_cutter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_cutter_chain (GstPad *pad, GstBuffer *buf); +static void gst_cutter_chain (GstPad *pad, GstData *_data); static double inline gst_cutter_16bit_ms (gint16* data, guint numsamples); static double @@ -212,8 +212,9 @@ gst_cutter_init (GstCutter *filter) } static void -gst_cutter_chain (GstPad *pad, GstBuffer *buf) +gst_cutter_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstCutter *filter; gint16 *in_data; double RMS = 0.0; /* RMS of signal in buffer */ @@ -299,7 +300,7 @@ gst_cutter_chain (GstPad *pad, GstBuffer *buf) { prebuf = (g_list_first (filter->pre_buffer))->data; filter->pre_buffer = g_list_remove (filter->pre_buffer, prebuf); - gst_pad_push (filter->srcpad, prebuf); + gst_pad_push (filter->srcpad, GST_DATA (prebuf)); ++count; } GST_DEBUG ("flushed %d buffers", count); @@ -327,13 +328,13 @@ gst_cutter_chain (GstPad *pad, GstBuffer *buf) filter->pre_run_length -= gst_audio_length (filter->srcpad, prebuf); /* only pass buffers if we don't leak */ if (!filter->leaky) - gst_pad_push (filter->srcpad, prebuf); + gst_pad_push (filter->srcpad, GST_DATA (prebuf)); /* we unref it after getting it out of the pre_buffer */ gst_buffer_unref (prebuf); } } else - gst_pad_push (filter->srcpad, buf); + gst_pad_push (filter->srcpad, GST_DATA (buf)); } static double inline diff --git a/gst/debug/efence.c b/gst/debug/efence.c index 505be406..904ee73f 100644 --- a/gst/debug/efence.c +++ b/gst/debug/efence.c @@ -83,7 +83,7 @@ static void gst_efence_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_efence_chain (GstPad *pad, GstBuffer *buf); +static void gst_efence_chain (GstPad *pad, GstData *_data); static GstElementClass *parent_class = NULL; @@ -201,8 +201,9 @@ gst_efence_init (GstEFence *filter) */ static void -gst_efence_chain (GstPad *pad, GstBuffer *buffer) +gst_efence_chain (GstPad *pad, GstData *_data) { + GstBuffer *buffer = GST_BUFFER (_data); GstEFence *efence; GstBuffer *copy; void *ptr; @@ -231,7 +232,7 @@ gst_efence_chain (GstPad *pad, GstBuffer *buffer) GST_BUFFER_POOL_PRIVATE (copy) = NULL; gst_buffer_unref(buffer); - gst_pad_push (efence->srcpad, copy); + gst_pad_push (efence->srcpad, GST_DATA (copy)); } static void diff --git a/gst/effectv/gstaging.c b/gst/effectv/gstaging.c index 5967e478..003014b7 100644 --- a/gst/effectv/gstaging.c +++ b/gst/effectv/gstaging.c @@ -111,7 +111,7 @@ static void gst_agingtv_set_property (GObject * object, guint prop_id, static void gst_agingtv_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_agingtv_chain (GstPad * pad, GstBuffer * buf); +static void gst_agingtv_chain (GstPad * pad, GstData *_data); static GstElementClass *parent_class = NULL; /*static guint gst_agingtv_signals[LAST_SIGNAL] = { 0 }; */ @@ -342,8 +342,9 @@ aging_mode_switch (GstAgingTV *filter) } static void -gst_agingtv_chain (GstPad * pad, GstBuffer * buf) +gst_agingtv_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstAgingTV *filter; guint32 *src, *dest; GstBuffer *outbuf; @@ -365,7 +366,7 @@ gst_agingtv_chain (GstPad * pad, GstBuffer * buf) gst_buffer_unref (buf); - gst_pad_push (filter->srcpad, outbuf); + gst_pad_push (filter->srcpad, GST_DATA (outbuf)); } static void diff --git a/gst/effectv/gstdice.c b/gst/effectv/gstdice.c index 50c5b081..2856ecbe 100644 --- a/gst/effectv/gstdice.c +++ b/gst/effectv/gstdice.c @@ -102,7 +102,7 @@ static void gst_dicetv_set_property (GObject * object, guint prop_id, static void gst_dicetv_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_dicetv_chain (GstPad * pad, GstBuffer * buf); +static void gst_dicetv_chain (GstPad * pad, GstData *_data); static GstElementClass *parent_class = NULL; static guint gst_dicetv_signals[LAST_SIGNAL] = { 0 }; @@ -301,8 +301,9 @@ gst_dicetv_create_map (GstDiceTV *filter) } static void -gst_dicetv_chain (GstPad * pad, GstBuffer * buf) +gst_dicetv_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstDiceTV *filter; guint32 *src, *dest; GstBuffer *outbuf; @@ -320,7 +321,7 @@ gst_dicetv_chain (GstPad * pad, GstBuffer * buf) gst_buffer_unref (buf); - gst_pad_push (filter->srcpad, outbuf); + gst_pad_push (filter->srcpad, GST_DATA (outbuf)); } static void diff --git a/gst/effectv/gstedge.c b/gst/effectv/gstedge.c index 16cf9781..69f8c153 100644 --- a/gst/effectv/gstedge.c +++ b/gst/effectv/gstedge.c @@ -91,7 +91,7 @@ static void gst_edgetv_set_property (GObject * object, guint prop_id, static void gst_edgetv_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_edgetv_chain (GstPad * pad, GstBuffer * buf); +static void gst_edgetv_chain (GstPad * pad, GstData *_data); static GstElementClass *parent_class = NULL; /*static guint gst_edgetv_signals[LAST_SIGNAL] = { 0 }; */ @@ -171,8 +171,9 @@ gst_edgetv_init (GstEdgeTV * filter) } static void -gst_edgetv_chain (GstPad * pad, GstBuffer * buf) +gst_edgetv_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstEdgeTV *filter; int x, y; int r, g, b; @@ -269,7 +270,7 @@ gst_edgetv_chain (GstPad * pad, GstBuffer * buf) } gst_buffer_unref (buf); - gst_pad_push (filter->srcpad, outbuf); + gst_pad_push (filter->srcpad, GST_DATA (outbuf)); } static void diff --git a/gst/effectv/gstquark.c b/gst/effectv/gstquark.c index b520aa77..93e983d1 100644 --- a/gst/effectv/gstquark.c +++ b/gst/effectv/gstquark.c @@ -101,7 +101,7 @@ static void gst_quarktv_set_property (GObject * object, guint prop_id, static void gst_quarktv_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_quarktv_chain (GstPad * pad, GstBuffer * buf); +static void gst_quarktv_chain (GstPad * pad, GstData *_data); static GstElementClass *parent_class = NULL; /* static guint gst_quarktv_signals[LAST_SIGNAL] = { 0 }; */ @@ -200,8 +200,9 @@ gst_quarktv_init (GstQuarkTV * filter) } static void -gst_quarktv_chain (GstPad * pad, GstBuffer * buf) +gst_quarktv_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstQuarkTV *filter; guint32 *src, *dest; GstBuffer *outbuf; @@ -232,7 +233,7 @@ gst_quarktv_chain (GstPad * pad, GstBuffer * buf) dest[area] = (rand ? ((guint32 *)GST_BUFFER_DATA (rand))[area] : 0); } - gst_pad_push (filter->srcpad, outbuf); + gst_pad_push (filter->srcpad, GST_DATA (outbuf)); filter->current_plane--; diff --git a/gst/effectv/gstrev.c b/gst/effectv/gstrev.c index bfb2975b..001ab5dd 100644 --- a/gst/effectv/gstrev.c +++ b/gst/effectv/gstrev.c @@ -120,7 +120,7 @@ static void gst_revtv_set_property (GObject * object, guint prop_id, static void gst_revtv_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_revtv_chain (GstPad * pad, GstBuffer * buf); +static void gst_revtv_chain (GstPad * pad, GstData *_data); static GstElementClass *parent_class = NULL; /* static guint gst_revtv_signals[LAST_SIGNAL] = { 0 }; */ @@ -206,8 +206,9 @@ gst_revtv_init (GstRevTV * filter) static void -gst_revtv_chain (GstPad * pad, GstBuffer * buf) +gst_revtv_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstRevTV *filter; guint32 *src, *dest; GstBuffer *outbuf; @@ -248,7 +249,7 @@ gst_revtv_chain (GstPad * pad, GstBuffer * buf) gst_buffer_unref (buf); - gst_pad_push (filter->srcpad, outbuf); + gst_pad_push (filter->srcpad, GST_DATA (outbuf)); } static void diff --git a/gst/effectv/gstshagadelic.c b/gst/effectv/gstshagadelic.c index 84d681e9..1f792dbd 100644 --- a/gst/effectv/gstshagadelic.c +++ b/gst/effectv/gstshagadelic.c @@ -100,7 +100,7 @@ static void gst_shagadelictv_set_property (GObject * object, guint prop_id, static void gst_shagadelictv_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_shagadelictv_chain (GstPad * pad, GstBuffer * buf); +static void gst_shagadelictv_chain (GstPad * pad, GstData *_data); static GstElementClass *parent_class = NULL; /*static guint gst_shagadelictv_signals[LAST_SIGNAL] = { 0 }; */ @@ -250,8 +250,9 @@ int shagadelicDraw() return 0; } static void -gst_shagadelictv_chain (GstPad * pad, GstBuffer * buf) +gst_shagadelictv_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstShagadelicTV *filter; guint32 *src, *dest; GstBuffer *outbuf; @@ -300,7 +301,7 @@ gst_shagadelictv_chain (GstPad * pad, GstBuffer * buf) gst_buffer_unref (buf); - gst_pad_push (filter->srcpad, outbuf); + gst_pad_push (filter->srcpad, GST_DATA (outbuf)); } static void diff --git a/gst/effectv/gstvertigo.c b/gst/effectv/gstvertigo.c index d1bd5cc5..45a2b8fd 100644 --- a/gst/effectv/gstvertigo.c +++ b/gst/effectv/gstvertigo.c @@ -105,7 +105,7 @@ static void gst_vertigotv_set_property (GObject * object, guint prop_id, static void gst_vertigotv_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_vertigotv_chain (GstPad * pad, GstBuffer * buf); +static void gst_vertigotv_chain (GstPad * pad, GstData *_data); static GstElementClass *parent_class = NULL; static guint gst_vertigotv_signals[LAST_SIGNAL] = { 0 }; @@ -263,8 +263,9 @@ gst_vertigotv_set_parms (GstVertigoTV *filter) } static void -gst_vertigotv_chain (GstPad * pad, GstBuffer * buf) +gst_vertigotv_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstVertigoTV *filter; guint32 *src, *dest; GstBuffer *outbuf; @@ -315,7 +316,7 @@ gst_vertigotv_chain (GstPad * pad, GstBuffer * buf) gst_buffer_unref (buf); - gst_pad_push (filter->srcpad, outbuf); + gst_pad_push (filter->srcpad, GST_DATA (outbuf)); p = filter->current_buffer; filter->current_buffer = filter->alt_buffer; diff --git a/gst/effectv/gstwarp.c b/gst/effectv/gstwarp.c index c098ab62..f4bb281f 100644 --- a/gst/effectv/gstwarp.c +++ b/gst/effectv/gstwarp.c @@ -107,7 +107,7 @@ static void gst_warptv_set_property (GObject * object, guint prop_id, static void gst_warptv_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_warptv_chain (GstPad * pad, GstBuffer * buf); +static void gst_warptv_chain (GstPad * pad, GstData *_data); static GstElementClass *parent_class = NULL; /*static guint gst_warptv_signals[LAST_SIGNAL] = { 0 }; */ @@ -249,8 +249,9 @@ gst_warptv_initialize (GstWarpTV *filter) } static void -gst_warptv_chain (GstPad * pad, GstBuffer * buf) +gst_warptv_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstWarpTV *filter; guint32 *src, *dest; gint xw,yw,cw; @@ -312,7 +313,7 @@ gst_warptv_chain (GstPad * pad, GstBuffer * buf) gst_buffer_unref (buf); - gst_pad_push (filter->srcpad, outbuf); + gst_pad_push (filter->srcpad, GST_DATA (outbuf)); } static void diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index 1f55b7d9..7ed55f1b 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -609,7 +609,7 @@ gst_flxdec_loop (GstElement *element) GST_BUFFER_TIMESTAMP (out) = flxdec->next_time; flxdec->next_time += flxdec->frame_time; - gst_pad_push(flxdec->srcpad, out); + gst_pad_push(flxdec->srcpad, GST_DATA (out)); break; } diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c index f571fc3f..31a9f05b 100644 --- a/gst/goom/gstgoom.c +++ b/gst/goom/gstgoom.c @@ -117,7 +117,7 @@ static void gst_goom_dispose (GObject *object); static GstElementStateReturn gst_goom_change_state (GstElement *element); -static void gst_goom_chain (GstPad *pad, GstBuffer *buf); +static void gst_goom_chain (GstPad *pad, GstData *_data); static GstPadLinkReturn gst_goom_sinkconnect (GstPad *pad, GstCaps *caps); static GstPadLinkReturn gst_goom_srcconnect (GstPad *pad, GstCaps *caps); @@ -268,8 +268,9 @@ gst_goom_negotiate_default (GstGOOM *goom) } static void -gst_goom_chain (GstPad *pad, GstBuffer *bufin) +gst_goom_chain (GstPad *pad, GstData *_data) { + GstBuffer *bufin = GST_BUFFER (_data); GstGOOM *goom; GstBuffer *bufout; guint32 samples_in; @@ -344,7 +345,7 @@ gst_goom_chain (GstPad *pad, GstBuffer *bufin) goom->next_time += GST_SECOND / goom->fps; - gst_pad_push (goom->srcpad, bufout); + gst_pad_push (goom->srcpad, GST_DATA (bufout)); done: gst_buffer_unref (bufin); diff --git a/gst/law/alaw-decode.c b/gst/law/alaw-decode.c index 94cf6d05..2ba0d536 100644 --- a/gst/law/alaw-decode.c +++ b/gst/law/alaw-decode.c @@ -41,7 +41,7 @@ static void gst_alawdec_init (GstALawDec *alawdec); static void gst_alawdec_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gst_alawdec_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_alawdec_chain (GstPad *pad, GstBuffer *buf); +static void gst_alawdec_chain (GstPad *pad, GstData *_data); static GstElementClass *parent_class = NULL; @@ -146,8 +146,9 @@ gst_alawdec_init (GstALawDec *alawdec) } static void -gst_alawdec_chain (GstPad *pad,GstBuffer *buf) +gst_alawdec_chain (GstPad *pad,GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstALawDec *alawdec; gint16 *linear_data; guint8 *alaw_data; @@ -175,7 +176,7 @@ gst_alawdec_chain (GstPad *pad,GstBuffer *buf) } gst_buffer_unref(buf); - gst_pad_push(alawdec->srcpad,outbuf); + gst_pad_push(alawdec->srcpad,GST_DATA (outbuf)); } static void diff --git a/gst/law/alaw-encode.c b/gst/law/alaw-encode.c index cd796886..9edd8cb2 100644 --- a/gst/law/alaw-encode.c +++ b/gst/law/alaw-encode.c @@ -41,7 +41,7 @@ static void gst_alawenc_init (GstALawEnc *alawenc); static void gst_alawenc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gst_alawenc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_alawenc_chain (GstPad *pad, GstBuffer *buf); +static void gst_alawenc_chain (GstPad *pad, GstData *_data); /* * s16_to_alaw() - Convert a 16-bit linear PCM value to 8-bit A-law @@ -185,8 +185,9 @@ gst_alawenc_init (GstALawEnc *alawenc) } static void -gst_alawenc_chain (GstPad *pad,GstBuffer *buf) +gst_alawenc_chain (GstPad *pad,GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstALawEnc *alawenc; gint16 *linear_data; guint8 *alaw_data; @@ -214,7 +215,7 @@ gst_alawenc_chain (GstPad *pad,GstBuffer *buf) linear_data++; } gst_buffer_unref(buf); - gst_pad_push(alawenc->srcpad,outbuf); + gst_pad_push(alawenc->srcpad,GST_DATA (outbuf)); } static void diff --git a/gst/law/mulaw-decode.c b/gst/law/mulaw-decode.c index abce597d..b9db0de8 100644 --- a/gst/law/mulaw-decode.c +++ b/gst/law/mulaw-decode.c @@ -40,7 +40,7 @@ static void gst_mulawdec_init (GstMuLawDec *mulawdec); static void gst_mulawdec_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gst_mulawdec_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_mulawdec_chain (GstPad *pad, GstBuffer *buf); +static void gst_mulawdec_chain (GstPad *pad, GstData *_data); static GstElementClass *parent_class = NULL; @@ -125,8 +125,9 @@ gst_mulawdec_init (GstMuLawDec *mulawdec) } static void -gst_mulawdec_chain (GstPad *pad,GstBuffer *buf) +gst_mulawdec_chain (GstPad *pad,GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstMuLawDec *mulawdec; gint16 *linear_data; guint8 *mulaw_data; @@ -149,7 +150,7 @@ gst_mulawdec_chain (GstPad *pad,GstBuffer *buf) mulaw_decode(mulaw_data,linear_data,GST_BUFFER_SIZE(buf)); gst_buffer_unref(buf); - gst_pad_push(mulawdec->srcpad,outbuf); + gst_pad_push(mulawdec->srcpad,GST_DATA (outbuf)); } static void diff --git a/gst/law/mulaw-encode.c b/gst/law/mulaw-encode.c index ec045db6..8fa4a613 100644 --- a/gst/law/mulaw-encode.c +++ b/gst/law/mulaw-encode.c @@ -40,7 +40,7 @@ static void gst_mulawenc_init (GstMuLawEnc *mulawenc); static void gst_mulawenc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gst_mulawenc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_mulawenc_chain (GstPad *pad, GstBuffer *buf); +static void gst_mulawenc_chain (GstPad *pad, GstData *_data); static GstElementClass *parent_class = NULL; @@ -123,8 +123,9 @@ gst_mulawenc_init (GstMuLawEnc *mulawenc) } static void -gst_mulawenc_chain (GstPad *pad,GstBuffer *buf) +gst_mulawenc_chain (GstPad *pad,GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstMuLawEnc *mulawenc; gint16 *linear_data; guint8 *mulaw_data; @@ -147,7 +148,7 @@ gst_mulawenc_chain (GstPad *pad,GstBuffer *buf) mulaw_encode(linear_data,mulaw_data,GST_BUFFER_SIZE(outbuf)); gst_buffer_unref(buf); - gst_pad_push(mulawenc->srcpad,outbuf); + gst_pad_push(mulawenc->srcpad,GST_DATA (outbuf)); } static void diff --git a/gst/level/gstlevel.c b/gst/level/gstlevel.c index ca33743f..82d1ca40 100644 --- a/gst/level/gstlevel.c +++ b/gst/level/gstlevel.c @@ -101,7 +101,7 @@ static void gst_level_init (GstLevel *filter); static void gst_level_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gst_level_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_level_chain (GstPad *pad, GstBuffer *buf); +static void gst_level_chain (GstPad *pad, GstData *_data); static GstElementClass *parent_class = NULL; static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; @@ -193,8 +193,9 @@ gst_level_fast_8bit_chain (gint8* in, guint num, gint channels, #include "filter.func" static void -gst_level_chain (GstPad *pad, GstBuffer *buf) +gst_level_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstLevel *filter; gint16 *in_data; @@ -239,7 +240,7 @@ gst_level_chain (GstPad *pad, GstBuffer *buf) filter->CS[i] += CS; } - gst_pad_push (filter->srcpad, buf); + gst_pad_push (filter->srcpad, GST_DATA (buf)); filter->num_samples += num_samples; diff --git a/gst/median/gstmedian.c b/gst/median/gstmedian.c index 3b146b4d..a71a0093 100644 --- a/gst/median/gstmedian.c +++ b/gst/median/gstmedian.c @@ -81,7 +81,7 @@ static void gst_median_init (GstMedian *median); static void median_5 (unsigned char *src, unsigned char *dest, int height, int width); static void median_9 (unsigned char *src, unsigned char *dest, int height, int width); -static void gst_median_chain (GstPad *pad, GstBuffer *buf); +static void gst_median_chain (GstPad *pad, GstData *_data); static void gst_median_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gst_median_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); @@ -267,8 +267,9 @@ median_9 (unsigned char *src, unsigned char *dest, int width, int height) } static void -gst_median_chain (GstPad *pad, GstBuffer *buf) +gst_median_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstMedian *median; guchar *data; gulong size; @@ -283,7 +284,7 @@ gst_median_chain (GstPad *pad, GstBuffer *buf) median = GST_MEDIAN (GST_OBJECT_PARENT (pad)); if (!median->active) { - gst_pad_push(median->srcpad,buf); + gst_pad_push(median->srcpad,GST_DATA (buf)); return; } @@ -323,7 +324,7 @@ gst_median_chain (GstPad *pad, GstBuffer *buf) gst_buffer_unref(buf); - gst_pad_push(median->srcpad,outbuf); + gst_pad_push(median->srcpad,GST_DATA (outbuf)); } static void diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c index 13a6099b..a87414ac 100644 --- a/gst/monoscope/gstmonoscope.c +++ b/gst/monoscope/gstmonoscope.c @@ -124,7 +124,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_template, static void gst_monoscope_class_init (GstMonoscopeClass *klass); static void gst_monoscope_init (GstMonoscope *monoscope); -static void gst_monoscope_chain (GstPad *pad, GstBuffer *buf); +static void gst_monoscope_chain (GstPad *pad, GstData *_data); static GstPadLinkReturn gst_monoscope_sinkconnect (GstPad *pad, GstCaps *caps); @@ -250,8 +250,9 @@ gst_monoscope_srcconnect (GstPad *pad, GstCaps *caps) } static void -gst_monoscope_chain (GstPad *pad, GstBuffer *bufin) +gst_monoscope_chain (GstPad *pad, GstData *_data) { + GstBuffer *bufin = GST_BUFFER (_data); GstMonoscope *monoscope; GstBuffer *bufout; guint32 samples_in; @@ -300,7 +301,7 @@ gst_monoscope_chain (GstPad *pad, GstBuffer *bufin) monoscope->next_time += GST_SECOND / monoscope->fps; - gst_pad_push (monoscope->srcpad, bufout); + gst_pad_push (monoscope->srcpad, GST_DATA (bufout)); gst_buffer_unref (bufin); diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index f5a95c03..dfd4b2c5 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -462,7 +462,7 @@ static void gst_qtdemux_loop_header (GstElement *element) if(index==-1){ for(i=0;i<qtdemux->n_streams;i++){ gst_pad_push(qtdemux->streams[i]->pad, - GST_BUFFER(gst_event_new (GST_EVENT_EOS))); + GST_DATA(gst_event_new (GST_EVENT_EOS))); } ret = gst_bytestream_seek(qtdemux->bs, 0, GST_SEEK_METHOD_END); GST_DEBUG ("seek returned %d",ret); @@ -516,7 +516,7 @@ static void gst_qtdemux_loop_header (GstElement *element) GST_BUFFER_TIMESTAMP(buf) = stream->samples[stream->sample_index].timestamp; GST_BUFFER_DURATION(buf) = stream->samples[stream->sample_index].duration; - gst_pad_push(stream->pad, buf); + gst_pad_push(stream->pad, GST_DATA (buf)); } stream->sample_index++; break; diff --git a/gst/rtp/gstrtpL16depay.c b/gst/rtp/gstrtpL16depay.c index 832bb23d..1623b772 100644 --- a/gst/rtp/gstrtpL16depay.c +++ b/gst/rtp/gstrtpL16depay.c @@ -72,7 +72,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory, static void gst_rtpL16parse_class_init (GstRtpL16ParseClass * klass); static void gst_rtpL16parse_init (GstRtpL16Parse * rtpL16parse); -static void gst_rtpL16parse_chain (GstPad * pad, GstBuffer * buf); +static void gst_rtpL16parse_chain (GstPad * pad, GstData *_data); static void gst_rtpL16parse_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -195,8 +195,9 @@ gst_rtpL16parse_payloadtype_change (GstRtpL16Parse *rtpL16parse, rtp_payload_t p } static void -gst_rtpL16parse_chain (GstPad * pad, GstBuffer * buf) +gst_rtpL16parse_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstRtpL16Parse *rtpL16parse; GstBuffer *outbuf; Rtp_Packet packet; @@ -244,7 +245,7 @@ gst_rtpL16parse_chain (GstPad * pad, GstBuffer * buf) gst_rtpL16parse_ntohs (outbuf); #endif - gst_pad_push (rtpL16parse->srcpad, outbuf); + gst_pad_push (rtpL16parse->srcpad, GST_DATA (outbuf)); rtp_packet_free (packet); gst_buffer_unref (buf); diff --git a/gst/rtp/gstrtpL16enc.c b/gst/rtp/gstrtpL16enc.c index c4468c56..47145b97 100644 --- a/gst/rtp/gstrtpL16enc.c +++ b/gst/rtp/gstrtpL16enc.c @@ -75,7 +75,7 @@ GST_PAD_TEMPLATE_FACTORY (src_factory, static void gst_rtpL16enc_class_init (GstRtpL16EncClass * klass); static void gst_rtpL16enc_init (GstRtpL16Enc * rtpL16enc); -static void gst_rtpL16enc_chain (GstPad * pad, GstBuffer * buf); +static void gst_rtpL16enc_chain (GstPad * pad, GstData *_data); static void gst_rtpL16enc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpL16enc_get_property (GObject * object, guint prop_id, @@ -176,8 +176,9 @@ gst_rtpL16enc_htons (GstBuffer *buf) } static void -gst_rtpL16enc_chain (GstPad * pad, GstBuffer * buf) +gst_rtpL16enc_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstRtpL16Enc *rtpL16enc; GstBuffer *outbuf; Rtp_Packet packet; @@ -240,7 +241,7 @@ gst_rtpL16enc_chain (GstPad * pad, GstBuffer * buf) memcpy (GST_BUFFER_DATA (outbuf) + rtp_packet_get_packet_len(packet), GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); GST_DEBUG ("gst_rtpL16enc_chain: pushing buffer of size %d", GST_BUFFER_SIZE(outbuf)); - gst_pad_push (rtpL16enc->srcpad, outbuf); + gst_pad_push (rtpL16enc->srcpad, GST_DATA (outbuf)); ++rtpL16enc->seq; rtpL16enc->next_time += rtpL16enc->time_interval * GST_BUFFER_SIZE (buf); diff --git a/gst/rtp/gstrtpL16parse.c b/gst/rtp/gstrtpL16parse.c index 832bb23d..1623b772 100644 --- a/gst/rtp/gstrtpL16parse.c +++ b/gst/rtp/gstrtpL16parse.c @@ -72,7 +72,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory, static void gst_rtpL16parse_class_init (GstRtpL16ParseClass * klass); static void gst_rtpL16parse_init (GstRtpL16Parse * rtpL16parse); -static void gst_rtpL16parse_chain (GstPad * pad, GstBuffer * buf); +static void gst_rtpL16parse_chain (GstPad * pad, GstData *_data); static void gst_rtpL16parse_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -195,8 +195,9 @@ gst_rtpL16parse_payloadtype_change (GstRtpL16Parse *rtpL16parse, rtp_payload_t p } static void -gst_rtpL16parse_chain (GstPad * pad, GstBuffer * buf) +gst_rtpL16parse_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstRtpL16Parse *rtpL16parse; GstBuffer *outbuf; Rtp_Packet packet; @@ -244,7 +245,7 @@ gst_rtpL16parse_chain (GstPad * pad, GstBuffer * buf) gst_rtpL16parse_ntohs (outbuf); #endif - gst_pad_push (rtpL16parse->srcpad, outbuf); + gst_pad_push (rtpL16parse->srcpad, GST_DATA (outbuf)); rtp_packet_free (packet); gst_buffer_unref (buf); diff --git a/gst/rtp/gstrtpL16pay.c b/gst/rtp/gstrtpL16pay.c index c4468c56..47145b97 100644 --- a/gst/rtp/gstrtpL16pay.c +++ b/gst/rtp/gstrtpL16pay.c @@ -75,7 +75,7 @@ GST_PAD_TEMPLATE_FACTORY (src_factory, static void gst_rtpL16enc_class_init (GstRtpL16EncClass * klass); static void gst_rtpL16enc_init (GstRtpL16Enc * rtpL16enc); -static void gst_rtpL16enc_chain (GstPad * pad, GstBuffer * buf); +static void gst_rtpL16enc_chain (GstPad * pad, GstData *_data); static void gst_rtpL16enc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpL16enc_get_property (GObject * object, guint prop_id, @@ -176,8 +176,9 @@ gst_rtpL16enc_htons (GstBuffer *buf) } static void -gst_rtpL16enc_chain (GstPad * pad, GstBuffer * buf) +gst_rtpL16enc_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstRtpL16Enc *rtpL16enc; GstBuffer *outbuf; Rtp_Packet packet; @@ -240,7 +241,7 @@ gst_rtpL16enc_chain (GstPad * pad, GstBuffer * buf) memcpy (GST_BUFFER_DATA (outbuf) + rtp_packet_get_packet_len(packet), GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); GST_DEBUG ("gst_rtpL16enc_chain: pushing buffer of size %d", GST_BUFFER_SIZE(outbuf)); - gst_pad_push (rtpL16enc->srcpad, outbuf); + gst_pad_push (rtpL16enc->srcpad, GST_DATA (outbuf)); ++rtpL16enc->seq; rtpL16enc->next_time += rtpL16enc->time_interval * GST_BUFFER_SIZE (buf); diff --git a/gst/rtp/gstrtpgsmdepay.c b/gst/rtp/gstrtpgsmdepay.c index 0c68a1be..4d32f378 100644 --- a/gst/rtp/gstrtpgsmdepay.c +++ b/gst/rtp/gstrtpgsmdepay.c @@ -67,7 +67,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory, static void gst_rtpgsmparse_class_init (GstRtpGSMParseClass * klass); static void gst_rtpgsmparse_init (GstRtpGSMParse * rtpgsmparse); -static void gst_rtpgsmparse_chain (GstPad * pad, GstBuffer * buf); +static void gst_rtpgsmparse_chain (GstPad * pad, GstData *_data); static void gst_rtpgsmparse_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -160,8 +160,9 @@ gst_rtpgsm_caps_nego (GstRtpGSMParse *rtpgsmparse) } static void -gst_rtpgsmparse_chain (GstPad * pad, GstBuffer * buf) +gst_rtpgsmparse_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstRtpGSMParse *rtpgsmparse; GstBuffer *outbuf; Rtp_Packet packet; @@ -212,7 +213,7 @@ gst_rtpgsmparse_chain (GstPad * pad, GstBuffer * buf) gst_rtpgsmparse_ntohs (outbuf); #endif - gst_pad_push (rtpgsmparse->srcpad, outbuf); + gst_pad_push (rtpgsmparse->srcpad, GST_DATA (outbuf)); rtp_packet_free (packet); gst_buffer_unref (buf); diff --git a/gst/rtp/gstrtpgsmenc.c b/gst/rtp/gstrtpgsmenc.c index ec074639..eb7a7852 100644 --- a/gst/rtp/gstrtpgsmenc.c +++ b/gst/rtp/gstrtpgsmenc.c @@ -71,7 +71,7 @@ GST_PAD_TEMPLATE_FACTORY (src_factory, static void gst_rtpgsmenc_class_init (GstRtpGSMEncClass * klass); static void gst_rtpgsmenc_init (GstRtpGSMEnc * rtpgsmenc); -static void gst_rtpgsmenc_chain (GstPad * pad, GstBuffer * buf); +static void gst_rtpgsmenc_chain (GstPad * pad, GstData *_data); static void gst_rtpgsmenc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpgsmenc_get_property (GObject * object, guint prop_id, @@ -170,8 +170,9 @@ gst_rtpgsmenc_htons (GstBuffer *buf) } static void -gst_rtpgsmenc_chain (GstPad * pad, GstBuffer * buf) +gst_rtpgsmenc_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstRtpGSMEnc *rtpgsmenc; GstBuffer *outbuf; Rtp_Packet packet; @@ -227,7 +228,7 @@ gst_rtpgsmenc_chain (GstPad * pad, GstBuffer * buf) memcpy (GST_BUFFER_DATA (outbuf) + rtp_packet_get_packet_len(packet), GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); GST_DEBUG ("gst_rtpgsmenc_chain: pushing buffer of size %d", GST_BUFFER_SIZE(outbuf)); - gst_pad_push (rtpgsmenc->srcpad, outbuf); + gst_pad_push (rtpgsmenc->srcpad, GST_DATA (outbuf)); ++rtpgsmenc->seq; rtpgsmenc->next_time += rtpgsmenc->time_interval * GST_BUFFER_SIZE (buf); diff --git a/gst/rtp/gstrtpgsmparse.c b/gst/rtp/gstrtpgsmparse.c index 0c68a1be..4d32f378 100644 --- a/gst/rtp/gstrtpgsmparse.c +++ b/gst/rtp/gstrtpgsmparse.c @@ -67,7 +67,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory, static void gst_rtpgsmparse_class_init (GstRtpGSMParseClass * klass); static void gst_rtpgsmparse_init (GstRtpGSMParse * rtpgsmparse); -static void gst_rtpgsmparse_chain (GstPad * pad, GstBuffer * buf); +static void gst_rtpgsmparse_chain (GstPad * pad, GstData *_data); static void gst_rtpgsmparse_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -160,8 +160,9 @@ gst_rtpgsm_caps_nego (GstRtpGSMParse *rtpgsmparse) } static void -gst_rtpgsmparse_chain (GstPad * pad, GstBuffer * buf) +gst_rtpgsmparse_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstRtpGSMParse *rtpgsmparse; GstBuffer *outbuf; Rtp_Packet packet; @@ -212,7 +213,7 @@ gst_rtpgsmparse_chain (GstPad * pad, GstBuffer * buf) gst_rtpgsmparse_ntohs (outbuf); #endif - gst_pad_push (rtpgsmparse->srcpad, outbuf); + gst_pad_push (rtpgsmparse->srcpad, GST_DATA (outbuf)); rtp_packet_free (packet); gst_buffer_unref (buf); diff --git a/gst/rtp/gstrtpgsmpay.c b/gst/rtp/gstrtpgsmpay.c index ec074639..eb7a7852 100644 --- a/gst/rtp/gstrtpgsmpay.c +++ b/gst/rtp/gstrtpgsmpay.c @@ -71,7 +71,7 @@ GST_PAD_TEMPLATE_FACTORY (src_factory, static void gst_rtpgsmenc_class_init (GstRtpGSMEncClass * klass); static void gst_rtpgsmenc_init (GstRtpGSMEnc * rtpgsmenc); -static void gst_rtpgsmenc_chain (GstPad * pad, GstBuffer * buf); +static void gst_rtpgsmenc_chain (GstPad * pad, GstData *_data); static void gst_rtpgsmenc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpgsmenc_get_property (GObject * object, guint prop_id, @@ -170,8 +170,9 @@ gst_rtpgsmenc_htons (GstBuffer *buf) } static void -gst_rtpgsmenc_chain (GstPad * pad, GstBuffer * buf) +gst_rtpgsmenc_chain (GstPad * pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstRtpGSMEnc *rtpgsmenc; GstBuffer *outbuf; Rtp_Packet packet; @@ -227,7 +228,7 @@ gst_rtpgsmenc_chain (GstPad * pad, GstBuffer * buf) memcpy (GST_BUFFER_DATA (outbuf) + rtp_packet_get_packet_len(packet), GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); GST_DEBUG ("gst_rtpgsmenc_chain: pushing buffer of size %d", GST_BUFFER_SIZE(outbuf)); - gst_pad_push (rtpgsmenc->srcpad, outbuf); + gst_pad_push (rtpgsmenc->srcpad, GST_DATA (outbuf)); ++rtpgsmenc->seq; rtpgsmenc->next_time += rtpgsmenc->time_interval * GST_BUFFER_SIZE (buf); diff --git a/gst/smoothwave/gstsmoothwave.c b/gst/smoothwave/gstsmoothwave.c index a8b88496..5fcd79c0 100644 --- a/gst/smoothwave/gstsmoothwave.c +++ b/gst/smoothwave/gstsmoothwave.c @@ -56,7 +56,7 @@ static void gst_smoothwave_init (GstSmoothWave *smoothwave); static void gst_smoothwave_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gst_smoothwave_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_smoothwave_chain (GstPad *pad, GstBuffer *buf); +static void gst_smoothwave_chain (GstPad *pad, GstData *_data); static GstElementClass *parent_class = NULL; /*static guint gst_smoothwave_signals[LAST_SIGNAL] = { 0 }; */ @@ -146,8 +146,9 @@ gst_smoothwave_init (GstSmoothWave *smoothwave) } static void -gst_smoothwave_chain (GstPad *pad, GstBuffer *buf) +gst_smoothwave_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstSmoothWave *smoothwave; gint16 *samples; gint samplecount,i; diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c index bf042e4c..488d9515 100644 --- a/gst/smpte/gstsmpte.c +++ b/gst/smpte/gstsmpte.c @@ -323,18 +323,18 @@ gst_smpte_loop (GstElement *element) ts = smpte->position * GST_SECOND / smpte->fps; while (GST_PAD_IS_USABLE (smpte->sinkpad1) && in1 == NULL) { - in1 = gst_pad_pull (smpte->sinkpad1); + in1 = GST_BUFFER (gst_pad_pull (smpte->sinkpad1)); if (GST_IS_EVENT (in1)) { - gst_pad_push (smpte->srcpad, in1); + gst_pad_push (smpte->srcpad, GST_DATA (in1)); in1 = NULL; } else ts = GST_BUFFER_TIMESTAMP (in1); } if (GST_PAD_IS_USABLE (smpte->sinkpad2) && in2 == NULL) { - in2 = gst_pad_pull (smpte->sinkpad2); + in2 = GST_BUFFER (gst_pad_pull (smpte->sinkpad2)); if (GST_IS_EVENT (in2)) { - gst_pad_push (smpte->srcpad, in2); + gst_pad_push (smpte->srcpad, GST_DATA (in2)); in2 = NULL; } else @@ -390,7 +390,7 @@ gst_smpte_loop (GstElement *element) gst_buffer_unref (in2); GST_BUFFER_TIMESTAMP (outbuf) = ts; - gst_pad_push (smpte->srcpad, outbuf); + gst_pad_push (smpte->srcpad, GST_DATA (outbuf)); } static void diff --git a/gst/spectrum/gstspectrum.c b/gst/spectrum/gstspectrum.c index 16786e33..5a2e8eb9 100644 --- a/gst/spectrum/gstspectrum.c +++ b/gst/spectrum/gstspectrum.c @@ -52,7 +52,7 @@ static void gst_spectrum_init (GstSpectrum *spectrum); static void gst_spectrum_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); -static void gst_spectrum_chain (GstPad *pad, GstBuffer *buf); +static void gst_spectrum_chain (GstPad *pad, GstData *_data); #define fixed short int gst_spectrum_fix_fft(fixed fr[], fixed fi[], int m, int inverse); @@ -131,8 +131,9 @@ gst_spectrum_set_property (GObject *object, guint prop_id, const GValue *value, } static void -gst_spectrum_chain (GstPad *pad, GstBuffer *buf) +gst_spectrum_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstSpectrum *spectrum; gint spec_base, spec_len; gint16 *re, *im, *loud; @@ -188,7 +189,7 @@ gst_spectrum_chain (GstPad *pad, GstBuffer *buf) GST_BUFFER_DATA(newbuf) = spect; GST_BUFFER_SIZE(newbuf) = spectrum->width; - gst_pad_push(spectrum->srcpad,newbuf); + gst_pad_push(spectrum->srcpad,GST_DATA (newbuf)); } static gboolean diff --git a/gst/udp/gstudpsink.c b/gst/udp/gstudpsink.c index 4953061d..cae46e18 100644 --- a/gst/udp/gstudpsink.c +++ b/gst/udp/gstudpsink.c @@ -75,7 +75,7 @@ static void gst_udpsink_init (GstUDPSink *udpsink); static void gst_udpsink_set_clock (GstElement *element, GstClock *clock); -static void gst_udpsink_chain (GstPad *pad,GstBuffer *buf); +static void gst_udpsink_chain (GstPad *pad,GstData *_data); static GstElementStateReturn gst_udpsink_change_state (GstElement *element); static void gst_udpsink_set_property (GObject *object, guint prop_id, @@ -257,8 +257,9 @@ gst_udpsink_init (GstUDPSink *udpsink) } static void -gst_udpsink_chain (GstPad *pad, GstBuffer *buf) +gst_udpsink_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstUDPSink *udpsink; guint tolen, i; diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index 82023c3c..d332b1c3 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -72,7 +72,7 @@ gst_udpsrc_control_get_type(void) { static void gst_udpsrc_class_init (GstUDPSrc *klass); static void gst_udpsrc_init (GstUDPSrc *udpsrc); -static GstBuffer* gst_udpsrc_get (GstPad *pad); +static GstData* gst_udpsrc_get (GstPad *pad); static GstElementStateReturn gst_udpsrc_change_state (GstElement *element); @@ -166,7 +166,7 @@ gst_udpsrc_init (GstUDPSrc *udpsrc) udpsrc->first_buf = TRUE; } -static GstBuffer* +static GstData* gst_udpsrc_get (GstPad *pad) { GstUDPSrc *udpsrc; @@ -254,7 +254,7 @@ gst_udpsrc_get (GstPad *pad) discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, current_time, NULL); - gst_pad_push (udpsrc->srcpad, GST_BUFFER (discont)); + gst_pad_push (udpsrc->srcpad, GST_DATA (discont)); } udpsrc->first_buf = FALSE; @@ -283,7 +283,7 @@ gst_udpsrc_get (GstPad *pad) perror ("select"); outbuf = NULL; } - return outbuf; + return GST_DATA (outbuf); } diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c index dc67ceb1..4c731220 100644 --- a/gst/videocrop/gstvideocrop.c +++ b/gst/videocrop/gstvideocrop.c @@ -118,7 +118,7 @@ static void gst_video_crop_get_property (GObject *object, guint prop_id, static GstPadLinkReturn gst_video_crop_sink_connect (GstPad *pad, GstCaps *caps); -static void gst_video_crop_chain (GstPad *pad, GstBuffer *buffer); +static void gst_video_crop_chain (GstPad *pad, GstData *_data); static GstElementStateReturn gst_video_crop_change_state (GstElement *element); @@ -345,8 +345,9 @@ gst_video_crop_i420 (GstVideoCrop *video_crop, GstBuffer *src_buffer, GstBuffer } static void -gst_video_crop_chain (GstPad *pad, GstBuffer *buffer) +gst_video_crop_chain (GstPad *pad, GstData *_data) { + GstBuffer *buffer = GST_BUFFER (_data); GstVideoCrop *video_crop; GstBuffer *outbuf; gint new_width, new_height; @@ -391,7 +392,7 @@ gst_video_crop_chain (GstPad *pad, GstBuffer *buffer) gst_video_crop_i420 (video_crop, buffer, outbuf); gst_buffer_unref (buffer); - gst_pad_push (video_crop->srcpad, outbuf); + gst_pad_push (video_crop->srcpad, GST_DATA (outbuf)); } static GstElementStateReturn diff --git a/gst/videofilter/gstvideofilter.c b/gst/videofilter/gstvideofilter.c index f9c0b8d8..a4a3bae2 100644 --- a/gst/videofilter/gstvideofilter.c +++ b/gst/videofilter/gstvideofilter.c @@ -56,7 +56,7 @@ static void gst_videofilter_init (GstVideofilter *videofilter); static void gst_videofilter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gst_videofilter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_videofilter_chain (GstPad *pad, GstBuffer *buf); +static void gst_videofilter_chain (GstPad *pad, GstData *_data); GstCaps * gst_videofilter_class_get_capslist(GstVideofilterClass *klass); static void gst_videofilter_setup(GstVideofilter *videofilter); @@ -366,8 +366,9 @@ gst_videofilter_postinit (GstVideofilter *videofilter) static void -gst_videofilter_chain (GstPad *pad, GstBuffer *buf) +gst_videofilter_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstVideofilter *videofilter; guchar *data; gulong size; @@ -386,7 +387,7 @@ gst_videofilter_chain (GstPad *pad, GstBuffer *buf) size = GST_BUFFER_SIZE(buf); if(videofilter->passthru){ - gst_pad_push(videofilter->srcpad, buf); + gst_pad_push(videofilter->srcpad, GST_DATA (buf)); return; } @@ -419,7 +420,7 @@ gst_videofilter_chain (GstPad *pad, GstBuffer *buf) GST_DEBUG ("gst_videofilter_chain: pushing buffer of %d bytes in '%s'",GST_BUFFER_SIZE(outbuf), GST_OBJECT_NAME (videofilter)); - gst_pad_push(videofilter->srcpad, outbuf); + gst_pad_push(videofilter->srcpad, GST_DATA (outbuf)); gst_buffer_unref(buf); } diff --git a/gst/videoflip/gstvideoflip.c b/gst/videoflip/gstvideoflip.c index efaa6dcd..d5013b81 100644 --- a/gst/videoflip/gstvideoflip.c +++ b/gst/videoflip/gstvideoflip.c @@ -56,7 +56,7 @@ static void gst_videoflip_init (GstVideoflip *videoflip); static void gst_videoflip_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gst_videoflip_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_videoflip_chain (GstPad *pad, GstBuffer *buf); +static void gst_videoflip_chain (GstPad *pad, GstData *_data); static GstCaps * gst_videoflip_get_capslist(void); static GstElementClass *parent_class = NULL; @@ -341,8 +341,9 @@ gst_videoflip_init (GstVideoflip *videoflip) static void -gst_videoflip_chain (GstPad *pad, GstBuffer *buf) +gst_videoflip_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstVideoflip *videoflip; guchar *data; gulong size; @@ -361,7 +362,7 @@ gst_videoflip_chain (GstPad *pad, GstBuffer *buf) size = GST_BUFFER_SIZE(buf); if(videoflip->passthru){ - gst_pad_push(videoflip->srcpad, buf); + gst_pad_push(videoflip->srcpad, GST_DATA (buf)); return; } @@ -392,7 +393,7 @@ gst_videoflip_chain (GstPad *pad, GstBuffer *buf) GST_DEBUG ("gst_videoflip_chain: pushing buffer of %d bytes in '%s'",GST_BUFFER_SIZE(outbuf), GST_OBJECT_NAME (videoflip)); - gst_pad_push(videoflip->srcpad, outbuf); + gst_pad_push(videoflip->srcpad, GST_DATA (outbuf)); gst_buffer_unref(buf); } diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c index 4d9a44d1..84027027 100644 --- a/gst/wavenc/gstwavenc.c +++ b/gst/wavenc/gstwavenc.c @@ -27,7 +27,7 @@ static void gst_wavenc_class_init (GstWavEncClass *klass); static void gst_wavenc_init (GstWavEnc *wavenc); -static void gst_wavenc_chain (GstPad *pad, GstBuffer *buf); +static void gst_wavenc_chain (GstPad *pad, GstData *_data); #define WAVE_FORMAT_PCM 0x0001 @@ -253,7 +253,7 @@ gst_wavenc_stop_file (GstWavEnc *wavenc) WRITE_U32 (wavenc->header + 4, wavenc->length); memcpy (GST_BUFFER_DATA (outbuf), wavenc->header, WAV_HEADER_LEN); - gst_pad_push (wavenc->srcpad, outbuf); + gst_pad_push (wavenc->srcpad, GST_DATA (outbuf)); } static void @@ -275,8 +275,9 @@ gst_wavenc_init (GstWavEnc *wavenc) static void gst_wavenc_chain (GstPad *pad, - GstBuffer *buf) + GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstWavEnc *wavenc; wavenc = GST_WAVENC (gst_pad_get_parent (pad)); @@ -292,7 +293,7 @@ gst_wavenc_chain (GstPad *pad, wavenc->pad_eos = TRUE; gst_wavenc_stop_file (wavenc); gst_pad_push (wavenc->srcpad, - GST_BUFFER (gst_event_new (GST_EVENT_EOS))); + GST_DATA (gst_event_new (GST_EVENT_EOS))); gst_element_set_eos (GST_ELEMENT (wavenc)); } else { gst_pad_event_default (wavenc->srcpad, GST_EVENT (buf)); @@ -308,12 +309,12 @@ gst_wavenc_chain (GstPad *pad, memcpy (GST_BUFFER_DATA (outbuf), wavenc->header, WAV_HEADER_LEN); GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf); - gst_pad_push (wavenc->srcpad, outbuf); + gst_pad_push (wavenc->srcpad, GST_DATA (outbuf)); wavenc->flush_header = FALSE; } wavenc->length += GST_BUFFER_SIZE (buf); - gst_pad_push (wavenc->srcpad, buf); + gst_pad_push (wavenc->srcpad, GST_DATA (buf)); } } diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 67d7fa19..656bebd4 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -46,7 +46,7 @@ static gboolean gst_wavparse_pad_convert (GstPad *pad, gint64 src_value, GstFormat *dest_format, gint64 *dest_value); -static void gst_wavparse_chain (GstPad *pad, GstBuffer *buf); +static void gst_wavparse_chain (GstPad *pad, GstData *_data); static const GstEventMask* gst_wavparse_get_event_masks (GstPad *pad); @@ -324,8 +324,9 @@ static void wav_new_chunk_callback(GstRiffChunk *chunk, gpointer data) } static void -gst_wavparse_chain (GstPad *pad, GstBuffer *buf) +gst_wavparse_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstWavParse *wavparse; gboolean buffer_riffed = FALSE; /* so we don't parse twice */ gulong size; @@ -380,19 +381,19 @@ gst_wavparse_chain (GstPad *pad, GstBuffer *buf) if (wavparse->need_discont) { if (buf && GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { gst_pad_push (wavparse->srcpad, - GST_BUFFER (gst_event_new_discontinuous (FALSE, + GST_DATA (gst_event_new_discontinuous (FALSE, GST_FORMAT_BYTES, wavparse->offset, GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (buf), NULL))); } else { gst_pad_push (wavparse->srcpad, - GST_BUFFER (gst_event_new_discontinuous (FALSE, + GST_DATA (gst_event_new_discontinuous (FALSE, GST_FORMAT_BYTES, wavparse->offset, NULL))); } wavparse->need_discont = FALSE; } - gst_pad_push (wavparse->srcpad, buf); + gst_pad_push (wavparse->srcpad, GST_DATA (buf)); } else { gst_buffer_unref (buf); } @@ -494,7 +495,7 @@ gst_wavparse_chain (GstPad *pad, GstBuffer *buf) GST_BUFFER_TIMESTAMP (newbuf) = 0; if (GST_PAD_IS_USABLE (wavparse->srcpad)) - gst_pad_push (wavparse->srcpad, newbuf); + gst_pad_push (wavparse->srcpad, GST_DATA (newbuf)); else gst_buffer_unref (newbuf); |