From f2d5cae8daade402e9d74a829d2b87283167aaa7 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 8 Oct 2003 16:08:18 +0000 Subject: /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. --- ext/aalib/gstaasink.c | 5 +++-- ext/dv/gstdvdec.c | 8 ++++---- ext/esd/esdmon.c | 6 +++--- ext/esd/esdsink.c | 5 +++-- ext/flac/gstflacdec.c | 6 +++--- ext/flac/gstflacenc.c | 9 +++++---- ext/gdk_pixbuf/gstgdkpixbuf.c | 7 ++++--- ext/jpeg/gstjpegdec.c | 7 ++++--- ext/jpeg/gstjpegenc.c | 13 +++++++------ ext/ladspa/gstladspa.c | 19 ++++++++++--------- ext/libpng/gstpngenc.c | 11 ++++++----- ext/mikmod/drv_gst.c | 2 +- ext/mikmod/gstmikmod.c | 4 ++-- ext/pango/gsttextoverlay.c | 11 ++++++----- ext/raw1394/gstdv1394src.c | 4 ++-- ext/shout2/gstshout2.c | 5 +++-- ext/speex/gstspeexdec.c | 5 +++-- ext/speex/gstspeexenc.c | 11 ++++++----- 18 files changed, 75 insertions(+), 63 deletions(-) (limited to 'ext') diff --git a/ext/aalib/gstaasink.c b/ext/aalib/gstaasink.c index 537cfd54..1d694d7f 100644 --- a/ext/aalib/gstaasink.c +++ b/ext/aalib/gstaasink.c @@ -78,7 +78,7 @@ static void gst_aasink_class_init (GstAASinkClass *klass); static void gst_aasink_init (GstAASink *aasink); static void gst_aasink_set_clock (GstElement *element, GstClock *clock); -static void gst_aasink_chain (GstPad *pad, GstBuffer *buf); +static void gst_aasink_chain (GstPad *pad, GstData *_data); static void gst_aasink_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); @@ -333,8 +333,9 @@ gst_aasink_scale (GstAASink *aasink, gchar *src, gchar *dest, } static void -gst_aasink_chain (GstPad *pad, GstBuffer *buf) +gst_aasink_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstAASink *aasink; g_return_if_fail (pad != NULL); diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c index 27283f69..518e6495 100644 --- a/ext/dv/gstdvdec.c +++ b/ext/dv/gstdvdec.c @@ -689,17 +689,17 @@ gst_dvdec_push (GstDVDec *dvdec, GstBuffer *outbuf, GstPad *pad, GstClockTime ts GstEvent *discont; discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, ts, NULL); - gst_pad_push (pad, GST_BUFFER (discont)); + gst_pad_push (pad, GST_DATA (discont)); } - gst_pad_push (pad, outbuf); + gst_pad_push (pad, GST_DATA (outbuf)); if ((dvdec->end_position != -1) && (dvdec->next_ts >= dvdec->end_position)) { if (dvdec->loop) - gst_pad_push (pad, GST_BUFFER(gst_event_new (GST_EVENT_SEGMENT_DONE))); + gst_pad_push (pad, GST_DATA(gst_event_new (GST_EVENT_SEGMENT_DONE)))); else - gst_pad_push (pad, GST_BUFFER(gst_event_new (GST_EVENT_EOS))); + gst_pad_push (pad, GST_DATA(gst_event_new (GST_EVENT_EOS)))); } } diff --git a/ext/esd/esdmon.c b/ext/esd/esdmon.c index ae8d4fd4..de7e1148 100644 --- a/ext/esd/esdmon.c +++ b/ext/esd/esdmon.c @@ -92,7 +92,7 @@ static void gst_esdmon_close_audio (GstEsdmon *src); static GstElementStateReturn gst_esdmon_change_state (GstElement *element); static gboolean gst_esdmon_sync_parms (GstEsdmon *esdmon); -static GstBuffer * gst_esdmon_get (GstPad *pad); +static GstData * gst_esdmon_get (GstPad *pad); static void gst_esdmon_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); @@ -225,7 +225,7 @@ gst_esdmon_sync_parms (GstEsdmon *esdmon) return gst_esdmon_open_audio (esdmon); } -static GstBuffer * +static GstData * gst_esdmon_get (GstPad *pad) { GstEsdmon *esdmon; @@ -282,7 +282,7 @@ gst_esdmon_get (GstPad *pad) esdmon->samples_since_basetime += readsamples; GST_DEBUG ("pushed buffer from esdmon of %ld bytes, timestamp %" G_GINT64_FORMAT, readbytes, GST_BUFFER_TIMESTAMP (buf)); - return buf; + return GST_DATA (buf); } static void diff --git a/ext/esd/esdsink.c b/ext/esd/esdsink.c index 2e114786..711c43fc 100644 --- a/ext/esd/esdsink.c +++ b/ext/esd/esdsink.c @@ -93,7 +93,7 @@ static GstPadLinkReturn gst_esdsink_sinkconnect (GstPad *pad, GstCaps *caps); static GstClockTime gst_esdsink_get_time (GstClock *clock, gpointer data); static GstClock * gst_esdsink_get_clock (GstElement *element); static void gst_esdsink_set_clock (GstElement *element, GstClock *clock); -static void gst_esdsink_chain (GstPad *pad, GstBuffer *buf); +static void gst_esdsink_chain (GstPad *pad, GstData *_data); static void gst_esdsink_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); @@ -259,8 +259,9 @@ gst_esdsink_set_clock (GstElement *element, GstClock *clock) } static void -gst_esdsink_chain (GstPad *pad, GstBuffer *buf) +gst_esdsink_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstEsdsink *esdsink; esdsink = GST_ESDSINK (gst_pad_get_parent (pad)); diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index c11be9f6..ea7b0576 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -451,7 +451,7 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder *decoder, GST_FORMAT_DEFAULT, flacdec->total_samples, NULL); - gst_pad_push (flacdec->srcpad, GST_BUFFER (discont)); + gst_pad_push (flacdec->srcpad, GST_DATA (discont)); } } } @@ -502,7 +502,7 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder *decoder, g_warning ("flacdec: invalid depth %d found\n", depth); return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; } - gst_pad_push (flacdec->srcpad, outbuf); + gst_pad_push (flacdec->srcpad, GST_DATA (outbuf)); } flacdec->total_samples += samples; @@ -555,7 +555,7 @@ gst_flacdec_loop (GstElement *element) if (GST_PAD_IS_USABLE (flacdec->srcpad)) { event = gst_event_new (GST_EVENT_EOS); - gst_pad_push (flacdec->srcpad, GST_BUFFER (event)); + gst_pad_push (flacdec->srcpad, GST_DATA (event)); } gst_element_set_eos (element); } diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index ef9e5386..816c8558 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -70,7 +70,7 @@ static void gst_flacenc_dispose (GObject *object); static GstPadLinkReturn gst_flacenc_sinkconnect (GstPad *pad, GstCaps *caps); -static void gst_flacenc_chain (GstPad *pad, GstBuffer *buf); +static void gst_flacenc_chain (GstPad *pad, GstData *_data); static gboolean gst_flacenc_update_quality (FlacEnc *flacenc, gint quality); static void gst_flacenc_set_property (GObject *object, guint prop_id, @@ -410,7 +410,7 @@ GstEvent *event; event = gst_event_new_seek ((GstSeekType)(int)(GST_FORMAT_BYTES | GST_SEEK_METHOD_SET), absolute_byte_offset); if (event) - gst_pad_push (flacenc->srcpad, GST_BUFFER (event)); + gst_pad_push (flacenc->srcpad, GST_DATA (event)); return FLAC__STREAM_ENCODER_OK; } @@ -439,7 +439,7 @@ gst_flacenc_write_callback (const FLAC__SeekableStreamEncoder *encoder, flacenc->first = FALSE; } - gst_pad_push (flacenc->srcpad, outbuf); + gst_pad_push (flacenc->srcpad, GST_DATA (outbuf)); return FLAC__STREAM_ENCODER_OK; } @@ -485,8 +485,9 @@ gst_flacenc_set_metadata (FlacEnc *flacenc, GstCaps *caps) static void -gst_flacenc_chain (GstPad *pad, GstBuffer *buf) +gst_flacenc_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); FlacEnc *flacenc; FLAC__int32 *data; gulong insize; diff --git a/ext/gdk_pixbuf/gstgdkpixbuf.c b/ext/gdk_pixbuf/gstgdkpixbuf.c index fec02e10..b5f42bd1 100644 --- a/ext/gdk_pixbuf/gstgdkpixbuf.c +++ b/ext/gdk_pixbuf/gstgdkpixbuf.c @@ -106,7 +106,7 @@ static void gst_gdk_pixbuf_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_gdk_pixbuf_chain (GstPad *pad, GstBuffer *buf); +static void gst_gdk_pixbuf_chain (GstPad *pad, GstData *_data); static GstElementClass *parent_class = NULL; @@ -267,8 +267,9 @@ gst_gdk_pixbuf_init (GstGdkPixbuf *filter) } static void -gst_gdk_pixbuf_chain (GstPad *pad, GstBuffer *buf) +gst_gdk_pixbuf_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstGdkPixbuf *filter; GdkPixbufLoader *pixbuf_loader; GdkPixbuf *pixbuf; @@ -322,7 +323,7 @@ gst_gdk_pixbuf_chain (GstPad *pad, GstBuffer *buf) g_object_unref(G_OBJECT(pixbuf_loader)); - gst_pad_push (filter->srcpad, outbuf); + gst_pad_push (filter->srcpad, GST_DATA (outbuf)); } static void diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c index a9718b08..57cc6665 100644 --- a/ext/jpeg/gstjpegdec.c +++ b/ext/jpeg/gstjpegdec.c @@ -53,7 +53,7 @@ enum { static void gst_jpegdec_class_init (GstJpegDec *klass); static void gst_jpegdec_init (GstJpegDec *jpegdec); -static void gst_jpegdec_chain (GstPad *pad, GstBuffer *buf); +static void gst_jpegdec_chain (GstPad *pad, GstData *_data); static GstPadLinkReturn gst_jpegdec_link (GstPad *pad, GstCaps *caps); @@ -303,8 +303,9 @@ static void guarantee_huff_tables(j_decompress_ptr dinfo) } static void -gst_jpegdec_chain (GstPad *pad, GstBuffer *buf) +gst_jpegdec_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstJpegDec *jpegdec; guchar *data, *outdata; gulong size, outsize; @@ -410,7 +411,7 @@ gst_jpegdec_chain (GstPad *pad, GstBuffer *buf) jpeg_finish_decompress(&jpegdec->cinfo); GST_DEBUG ("gst_jpegdec_chain: sending buffer"); - gst_pad_push(jpegdec->srcpad, outbuf); + gst_pad_push(jpegdec->srcpad, GST_DATA (outbuf)); gst_buffer_unref(buf); } diff --git a/ext/jpeg/gstjpegenc.c b/ext/jpeg/gstjpegenc.c index 736fab2e..df94da9d 100644 --- a/ext/jpeg/gstjpegenc.c +++ b/ext/jpeg/gstjpegenc.c @@ -51,10 +51,10 @@ enum { static void gst_jpegenc_class_init (GstJpegEnc *klass); static void gst_jpegenc_init (GstJpegEnc *jpegenc); -static void gst_jpegenc_chain (GstPad *pad,GstBuffer *buf); +static void gst_jpegenc_chain (GstPad *pad,GstData *_data); static GstPadLinkReturn gst_jpegenc_link (GstPad *pad, GstCaps *caps); -static GstBuffer *gst_jpegenc_get (GstPad *pad); +static GstData *gst_jpegenc_get (GstPad *pad); static void gst_jpegenc_resync (GstJpegEnc *jpegenc); @@ -241,7 +241,7 @@ gst_jpegenc_resync (GstJpegEnc *jpegenc) GST_DEBUG ("gst_jpegenc_resync: resync done"); } -static GstBuffer* +static GstData* gst_jpegenc_get (GstPad *pad) { GstJpegEnc *jpegenc; @@ -263,12 +263,13 @@ gst_jpegenc_get (GstPad *pad) } gst_buffer_ref(jpegenc->buffer); - return jpegenc->buffer; + return GST_DATA (jpegenc->buffer); } static void -gst_jpegenc_chain (GstPad *pad, GstBuffer *buf) +gst_jpegenc_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstJpegEnc *jpegenc; guchar *data, *outdata; gulong size, outsize; @@ -326,7 +327,7 @@ gst_jpegenc_chain (GstPad *pad, GstBuffer *buf) GST_BUFFER_SIZE(outbuf) = (((outsize - jpegenc->jdest.free_in_buffer)+3)&~3); - gst_pad_push(jpegenc->srcpad, outbuf); + gst_pad_push(jpegenc->srcpad, GST_DATA (outbuf)); g_signal_emit(G_OBJECT(jpegenc),gst_jpegenc_signals[FRAME_ENCODED], 0); diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index 5f16dbf5..f22b4aac 100644 --- a/ext/ladspa/gstladspa.c +++ b/ext/ladspa/gstladspa.c @@ -76,8 +76,8 @@ static void gst_ladspa_deactivate (GstLADSPA *ladspa); static GstElementStateReturn gst_ladspa_change_state (GstElement *element); static void gst_ladspa_loop (GstElement *element); -static void gst_ladspa_chain (GstPad *pad,GstBuffer *buf); -static GstBuffer * gst_ladspa_get (GstPad *pad); +static void gst_ladspa_chain (GstPad *pad,GstData *_data); +static GstData * gst_ladspa_get (GstPad *pad); static GstElementClass *parent_class = NULL; @@ -676,13 +676,13 @@ gst_ladspa_loop (GstElement *element) /* first get all the necessary data from the input ports */ for (i=0 ; isinkpads[i]); + buffers_in[i] = GST_BUFFER (gst_pad_pull (ladspa->sinkpads[i])); if (GST_IS_EVENT (buffers_in[i])) { /* push it out on all pads */ gst_data_ref_by_count ((GstData*)buffers_in[i], numsrcpads); for (j=0; jsrcpads[j], buffers_in[i]); + gst_pad_push (ladspa->srcpads[j], GST_DATA (buffers_in[i])); if (GST_EVENT_TYPE (buffers_in[i]) == GST_EVENT_EOS) { /* shut down */ gst_element_set_eos (element); @@ -753,7 +753,7 @@ gst_ladspa_loop (GstElement *element) } for (i=0 ; isrcpads[i], buffers_out[i]); + gst_pad_push (ladspa->srcpads[i], GST_DATA (buffers_out[i])); data_out[i] = NULL; buffers_out[i] = NULL; @@ -770,8 +770,9 @@ gst_ladspa_loop (GstElement *element) } static void -gst_ladspa_chain (GstPad *pad, GstBuffer *buffer_in) +gst_ladspa_chain (GstPad *pad, GstData *_data) { + GstBuffer *buffer_in = GST_BUFFER (_data); LADSPA_Descriptor *desc; LADSPA_Data *data_in, **data_out = NULL; GstBuffer **buffers_out = NULL; @@ -850,7 +851,7 @@ gst_ladspa_chain (GstPad *pad, GstBuffer *buffer_in) for (i=0; isrcpads[i], buffers_out[i]); + gst_pad_push (ladspa->srcpads[i], GST_DATA (buffers_out[i])); } g_free(buffers_out); @@ -858,7 +859,7 @@ gst_ladspa_chain (GstPad *pad, GstBuffer *buffer_in) } } -static GstBuffer * +static GstData * gst_ladspa_get(GstPad *pad) { GstLADSPA *ladspa; @@ -902,7 +903,7 @@ gst_ladspa_get(GstPad *pad) num_processed = num_to_process; } - return buf; + return GST_DATA (buf); } static void diff --git a/ext/libpng/gstpngenc.c b/ext/libpng/gstpngenc.c index 5c33107f..a4578477 100644 --- a/ext/libpng/gstpngenc.c +++ b/ext/libpng/gstpngenc.c @@ -52,7 +52,7 @@ enum static void gst_pngenc_class_init (GstPngEncClass *klass); static void gst_pngenc_init (GstPngEnc *pngenc); -static void gst_pngenc_chain (GstPad *pad, GstBuffer *buf); +static void gst_pngenc_chain (GstPad *pad, GstData *_data); static GstElementClass *parent_class = NULL; @@ -151,7 +151,7 @@ GstPngEnc *pngenc; pngenc = (GstPngEnc *) png_get_io_ptr (png_ptr); - gst_pad_push (pngenc->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_FLUSH))); + gst_pad_push (pngenc->srcpad, GST_DATA (gst_event_new (GST_EVENT_FLUSH))); } @@ -176,8 +176,9 @@ void user_write_data (png_structp png_ptr, png_bytep data, png_uint_32 length) } static void -gst_pngenc_chain (GstPad *pad, GstBuffer *buf) +gst_pngenc_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstPngEnc *pngenc; gint row_index; png_byte *row_pointers[MAX_HEIGHT]; @@ -246,11 +247,11 @@ gst_pngenc_chain (GstPad *pad, GstBuffer *buf) png_destroy_info_struct (pngenc->png_struct_ptr, &pngenc->png_info_ptr); png_destroy_write_struct (&pngenc->png_struct_ptr, (png_infopp) NULL); - gst_pad_push (pngenc->srcpad, pngenc->buffer_out); + gst_pad_push (pngenc->srcpad, GST_DATA (pngenc->buffer_out)); /* send EOS event, since a frame has been pushed out */ event = gst_event_new (GST_EVENT_EOS); - gst_pad_push (pngenc->srcpad, GST_BUFFER (event)); + gst_pad_push (pngenc->srcpad, GST_DATA (event)); gst_buffer_unref (buf); } diff --git a/ext/mikmod/drv_gst.c b/ext/mikmod/drv_gst.c index 57080462..122de610 100644 --- a/ext/mikmod/drv_gst.c +++ b/ext/mikmod/drv_gst.c @@ -51,7 +51,7 @@ static void mikmod_Update( void ) /* FIXME, send a flush event or something */ need_sync = 0 ; } - gst_pad_push( srcpad, outdata ); + gst_pad_push( srcpad, GST_DATA (outdata )); } diff --git a/ext/mikmod/gstmikmod.c b/ext/mikmod/gstmikmod.c index 6ef507c2..32808a8e 100644 --- a/ext/mikmod/gstmikmod.c +++ b/ext/mikmod/gstmikmod.c @@ -290,7 +290,7 @@ gst_mikmod_loop (GstElement *element) srcpad = mikmod->srcpad; mikmod->Buffer = NULL; - while ((buffer_in = gst_pad_pull( mikmod->sinkpad ))) { + while ((buffer_in = GST_BUFFER (gst_pad_pull( mikmod->sinkpad )))) { if ( GST_IS_EVENT (buffer_in) ) { GstEvent *event = GST_EVENT (buffer_in); @@ -338,7 +338,7 @@ gst_mikmod_loop (GstElement *element) } else { gst_element_set_eos (GST_ELEMENT (mikmod)); - gst_pad_push (mikmod->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS))); + gst_pad_push (mikmod->srcpad, GST_DATA (gst_event_new (GST_EVENT_EOS)))); } } diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c index 304dcdd2..726d3799 100644 --- a/ext/pango/gsttextoverlay.c +++ b/ext/pango/gsttextoverlay.c @@ -324,8 +324,9 @@ gst_text_overlay_blit_yuv420(GstTextOverlay *overlay, FT_Bitmap *bitmap, static void -gst_textoverlay_video_chain(GstPad *pad, GstBuffer *buf) +gst_textoverlay_video_chain(GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstTextOverlay *overlay; guchar *pixbuf; gint x0, y0; @@ -368,7 +369,7 @@ gst_textoverlay_video_chain(GstPad *pad, GstBuffer *buf) if (overlay->bitmap.buffer) gst_text_overlay_blit_yuv420(overlay, &overlay->bitmap, pixbuf, x0, y0); - gst_pad_push(overlay->srcpad, buf); + gst_pad_push(overlay->srcpad, GST_DATA (buf)); } #define PAST_END(buffer, time) \ @@ -388,7 +389,7 @@ gst_textoverlay_loop(GstElement *element) g_return_if_fail(GST_IS_TEXTOVERLAY(element)); overlay = GST_TEXTOVERLAY(element); - video_frame = gst_pad_pull(overlay->video_sinkpad); + video_frame = GST_BUFFER (gst_pad_pull(overlay->video_sinkpad)); now = GST_BUFFER_TIMESTAMP(video_frame); /* @@ -409,7 +410,7 @@ gst_textoverlay_loop(GstElement *element) if(!GST_PAD_IS_USABLE(overlay->text_sinkpad)){ break; } - overlay->next_buffer = gst_pad_pull(overlay->text_sinkpad); + overlay->next_buffer = GST_BUFFER (gst_pad_pull(overlay->text_sinkpad)); if (!overlay->next_buffer) break; @@ -458,7 +459,7 @@ gst_textoverlay_loop(GstElement *element) overlay->need_render = FALSE; } - gst_textoverlay_video_chain(overlay->srcpad, video_frame); + gst_textoverlay_video_chain(overlay->srcpad, GST_DATA (video_frame)); } diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c index 97b2989e..07a5c82a 100644 --- a/ext/raw1394/gstdv1394src.c +++ b/ext/raw1394/gstdv1394src.c @@ -77,7 +77,7 @@ static void gst_dv1394src_get_property (GObject *object, guint prop_id, GValue static GstElementStateReturn gst_dv1394src_change_state (GstElement *element); -static GstBuffer * gst_dv1394src_get (GstPad *pad); +static GstData * gst_dv1394src_get (GstPad *pad); static GstElementClass *parent_class = NULL; /*static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; */ @@ -314,7 +314,7 @@ int gst_dv1394src_bus_reset(raw1394handle_t handle, return 0; } -static GstBuffer * +static GstData * gst_dv1394src_get (GstPad *pad) { GstDV1394Src *dv1394src = GST_DV1394SRC (GST_PAD_PARENT(pad)); diff --git a/ext/shout2/gstshout2.c b/ext/shout2/gstshout2.c index 808bd9ad..e9ef5f52 100644 --- a/ext/shout2/gstshout2.c +++ b/ext/shout2/gstshout2.c @@ -89,7 +89,7 @@ sink_template_factory (void) static void gst_shout2send_class_init (GstShout2sendClass *klass); static void gst_shout2send_init (GstShout2send *shout2send); -static void gst_shout2send_chain (GstPad *pad, GstBuffer *buf); +static void gst_shout2send_chain (GstPad *pad, GstData *_data); static GstPadLinkReturn gst_shout2send_connect (GstPad *pad, GstCaps *caps); static void gst_shout2send_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); @@ -217,8 +217,9 @@ gst_shout2send_init (GstShout2send *shout2send) } static void -gst_shout2send_chain (GstPad *pad, GstBuffer *buf) +gst_shout2send_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstShout2send *shout2send; glong ret; diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c index 89b5c576..7ef79df7 100644 --- a/ext/speex/gstspeexdec.c +++ b/ext/speex/gstspeexdec.c @@ -52,7 +52,7 @@ enum { static void gst_speexdec_class_init (GstSpeexDec *klass); static void gst_speexdec_init (GstSpeexDec *speexdec); -static void gst_speexdec_chain (GstPad *pad, GstBuffer *buf); +static void gst_speexdec_chain (GstPad *pad, GstData *_data); static GstPadLinkReturn gst_speexdec_sinkconnect (GstPad *pad, GstCaps *caps); static GstElementClass *parent_class = NULL; @@ -135,8 +135,9 @@ gst_speexdec_sinkconnect (GstPad *pad, GstCaps *caps) } static void -gst_speexdec_chain (GstPad *pad, GstBuffer *buf) +gst_speexdec_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstSpeexDec *speexdec; gchar *data; guint size; diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c index dd4cb45f..47412bb6 100644 --- a/ext/speex/gstspeexenc.c +++ b/ext/speex/gstspeexenc.c @@ -53,7 +53,7 @@ enum { static void gst_speexenc_class_init (GstSpeexEnc *klass); static void gst_speexenc_init (GstSpeexEnc *speexenc); -static void gst_speexenc_chain (GstPad *pad,GstBuffer *buf); +static void gst_speexenc_chain (GstPad *pad,GstData *_data); static GstPadLinkReturn gst_speexenc_sinkconnect (GstPad *pad, GstCaps *caps); static GstElementClass *parent_class = NULL; @@ -149,8 +149,9 @@ gst_speexenc_sinkconnect (GstPad *pad, GstCaps *caps) } static void -gst_speexenc_chain (GstPad *pad, GstBuffer *buf) +gst_speexenc_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstSpeexEnc *speexenc; GstBuffer *outbuf; gint16 *data; @@ -188,7 +189,7 @@ gst_speexenc_chain (GstPad *pad, GstBuffer *buf) GST_BUFFER_DATA (outbuf) = header_data; GST_BUFFER_SIZE (outbuf) = size; - gst_pad_push (speexenc->srcpad, outbuf); + gst_pad_push (speexenc->srcpad, GST_DATA (outbuf)); } data = (gint16 *) GST_BUFFER_DATA (buf); @@ -214,7 +215,7 @@ gst_speexenc_chain (GstPad *pad, GstBuffer *buf) GST_BUFFER_TIMESTAMP (outbuf) = speexenc->next_ts; speex_bits_reset(&speexenc->bits); - gst_pad_push (speexenc->srcpad, outbuf); + gst_pad_push (speexenc->srcpad, GST_DATA (outbuf)); speexenc->next_ts += frame_size * GST_SECOND / speexenc->rate; } @@ -240,7 +241,7 @@ gst_speexenc_chain (GstPad *pad, GstBuffer *buf) GST_BUFFER_TIMESTAMP (outbuf) = speexenc->next_ts; speex_bits_reset(&speexenc->bits); - gst_pad_push (speexenc->srcpad, outbuf); + gst_pad_push (speexenc->srcpad, GST_DATA (outbuf)); speexenc->next_ts += frame_size * GST_SECOND / speexenc->rate; } -- cgit