Commit c07813ac authored by Andy Wingo Wingo's avatar Andy Wingo Wingo

/GstBuffer/GstData/ in the API where you can pass events. Fix the plugins to...

/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.
parent 69edaac4
common @ e903f88a
Subproject commit b7abb510aa14e8692df39ea8c2c758e37d8a8d8a
Subproject commit e903f88a7388f0b463204ea1f960a4ace840175b
......@@ -83,7 +83,7 @@ static void gst_artsdsink_close_audio (GstArtsdsink *sink);
static GstElementStateReturn gst_artsdsink_change_state (GstElement *element);
static gboolean gst_artsdsink_sync_parms (GstArtsdsink *artsdsink);
static GstPadLinkReturn gst_artsdsink_link (GstPad *pad, GstCaps *caps);
static void gst_artsdsink_chain (GstPad *pad, GstBuffer *buf);
static void gst_artsdsink_chain (GstPad *pad, GstData *_data);
static void gst_artsdsink_set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec);
......@@ -188,8 +188,9 @@ gst_artsdsink_link (GstPad *pad, GstCaps *caps)
}
static void
gst_artsdsink_chain (GstPad *pad, GstBuffer *buf)
gst_artsdsink_chain (GstPad *pad, GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstArtsdsink *artsdsink;
g_return_if_fail(pad != NULL);
......
......@@ -195,7 +195,7 @@ gst_afparse_loop(GstElement *element)
/* just stop if we cannot open the file */
if (!gst_afparse_open_file (afparse)){
gst_bytestream_destroy ((GstByteStream *) afparse->vfile->closure);
gst_pad_push (afparse->srcpad, GST_BUFFER(gst_event_new (GST_EVENT_EOS)));
gst_pad_push (afparse->srcpad, GST_DATA(gst_event_new (GST_EVENT_EOS)));
gst_element_set_eos (GST_ELEMENT (afparse));
return;
}
......@@ -236,14 +236,14 @@ gst_afparse_loop(GstElement *element)
gst_bytestream_get_status (bs, &waiting, &event);
if (event && GST_EVENT_TYPE(event) == GST_EVENT_EOS) {
gst_pad_push (afparse->srcpad,
GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
GST_DATA (gst_event_new (GST_EVENT_EOS)));
gst_element_set_eos (GST_ELEMENT (afparse));
break;
}
}
else {
GST_BUFFER_TIMESTAMP(buf) = afparse->timestamp;
gst_pad_push (afparse->srcpad, buf);
gst_pad_push (afparse->srcpad, GST_DATA (buf));
if (got_bytes != bytes_per_read){
/* this shouldn't happen very often */
/* FIXME calculate the timestamps based on the fewer bytes received */
......@@ -269,12 +269,12 @@ gst_afparse_loop(GstElement *element)
if (numframes < 1){
gst_buffer_unref(buf);
gst_pad_push (afparse->srcpad, GST_BUFFER(gst_event_new (GST_EVENT_EOS)));
gst_pad_push (afparse->srcpad, GST_DATA(gst_event_new (GST_EVENT_EOS)));
gst_element_set_eos (GST_ELEMENT (afparse));
break;
}
GST_BUFFER_SIZE(buf) = numframes * frames_to_bytes;
gst_pad_push (afparse->srcpad, buf);
gst_pad_push (afparse->srcpad, GST_DATA (buf));
afparse->timestamp += numframes * 1E9 / afparse->rate;
}
while (TRUE);
......
......@@ -104,7 +104,7 @@ static void gst_afsink_init (GstAFSink *afsink);
static gboolean gst_afsink_open_file (GstAFSink *sink);
static void gst_afsink_close_file (GstAFSink *sink);
static void gst_afsink_chain (GstPad *pad,GstBuffer *buf);
static void gst_afsink_chain (GstPad *pad,GstData *_data);
static void gst_afsink_set_property (GObject *object, guint prop_id, const GValue *value,
GParamSpec *pspec);
......@@ -389,8 +389,9 @@ gst_afsink_close_file (GstAFSink *sink)
* take the buffer from the pad and write to file if it's open
*/
static void
gst_afsink_chain (GstPad *pad, GstBuffer *buf)
gst_afsink_chain (GstPad *pad, GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstAFSink *afsink;
int ret = 0;
......
......@@ -105,7 +105,7 @@ static void gst_afsrc_init (GstAFSrc *afsrc);
static gboolean gst_afsrc_open_file (GstAFSrc *src);
static void gst_afsrc_close_file (GstAFSrc *src);
static GstBuffer* gst_afsrc_get (GstPad *pad);
static GstData* gst_afsrc_get (GstPad *pad);
static void gst_afsrc_set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec);
......@@ -190,7 +190,7 @@ gst_afsrc_init (GstAFSrc *afsrc)
afsrc->framestamp = 0;
}
static GstBuffer *
static GstData *
gst_afsrc_get (GstPad *pad)
{
GstAFSrc *src;
......@@ -216,7 +216,7 @@ gst_afsrc_get (GstPad *pad)
readbytes = readframes * (src->channels * src->width / 8);
if (readbytes == 0) {
gst_element_set_eos (GST_ELEMENT (src));
return GST_BUFFER (gst_event_new (GST_EVENT_EOS));
return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
GST_BUFFER_SIZE (buf) = readbytes;
......@@ -231,7 +231,7 @@ gst_afsrc_get (GstPad *pad)
GST_BUFFER_TIMESTAMP (buf) / 1E9);
/* g_print("DEBUG: gstafsrc: pushed buffer of %ld bytes\n", readbytes); */
return buf;
return GST_DATA (buf);
}
static void
......
......@@ -264,8 +264,9 @@ gst_divxdec_dispose (GObject *object)
static void
gst_divxdec_chain (GstPad *pad,
GstBuffer *buf)
GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstDivxDec *divxdec;
GstBuffer *outbuf;
DEC_FRAME xframe;
......@@ -310,7 +311,7 @@ gst_divxdec_chain (GstPad *pad,
return;
}
gst_pad_push(divxdec->srcpad, outbuf);
gst_pad_push(divxdec->srcpad, GST_DATA (outbuf));
gst_buffer_unref(buf);
}
......
......@@ -339,8 +339,9 @@ gst_divxenc_dispose (GObject *object)
static void
gst_divxenc_chain (GstPad *pad,
GstBuffer *buf)
GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstDivxEnc *divxenc;
GstBuffer *outbuf;
ENC_FRAME xframe;
......@@ -376,7 +377,7 @@ gst_divxenc_chain (GstPad *pad,
GST_BUFFER_FLAG_SET(outbuf, GST_BUFFER_KEY_UNIT);
/* go out, multiply! */
gst_pad_push(divxenc->srcpad, outbuf);
gst_pad_push(divxenc->srcpad, GST_DATA (outbuf));
/* proclaim destiny */
g_signal_emit(G_OBJECT(divxenc),gst_divxenc_signals[FRAME_ENCODED], 0);
......
......@@ -52,7 +52,7 @@ enum {
static void gst_gsmdec_class_init (GstGSMDec *klass);
static void gst_gsmdec_init (GstGSMDec *gsmdec);
static void gst_gsmdec_chain (GstPad *pad, GstBuffer *buf);
static void gst_gsmdec_chain (GstPad *pad, GstData *_data);
static GstPadLinkReturn gst_gsmdec_sinkconnect (GstPad *pad, GstCaps *caps);
static GstElementClass *parent_class = NULL;
......@@ -137,8 +137,9 @@ gst_gsmdec_sinkconnect (GstPad *pad, GstCaps *caps)
}
static void
gst_gsmdec_chain (GstPad *pad, GstBuffer *buf)
gst_gsmdec_chain (GstPad *pad, GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstGSMDec *gsmdec;
gsm_byte *data;
guint size;
......@@ -164,7 +165,7 @@ gst_gsmdec_chain (GstPad *pad, GstBuffer *buf)
gsm_decode (gsmdec->state, gsmdec->buffer, (gsm_signal *) GST_BUFFER_DATA (outbuf));
gst_pad_push (gsmdec->srcpad, outbuf);
gst_pad_push (gsmdec->srcpad, GST_DATA (outbuf));
size -= (33 - gsmdec->bufsize);
data += (33 - gsmdec->bufsize);
......@@ -180,7 +181,7 @@ gst_gsmdec_chain (GstPad *pad, GstBuffer *buf)
gsm_decode (gsmdec->state, data, (gsm_signal *)GST_BUFFER_DATA (outbuf));
gst_pad_push (gsmdec->srcpad, outbuf);
gst_pad_push (gsmdec->srcpad, GST_DATA (outbuf));
size -= 33;
data += 33;
......
......@@ -53,7 +53,7 @@ enum {
static void gst_gsmenc_class_init (GstGSMEnc *klass);
static void gst_gsmenc_init (GstGSMEnc *gsmenc);
static void gst_gsmenc_chain (GstPad *pad,GstBuffer *buf);
static void gst_gsmenc_chain (GstPad *pad,GstData *_data);
static GstPadLinkReturn gst_gsmenc_sinkconnect (GstPad *pad, GstCaps *caps);
static GstElementClass *parent_class = NULL;
......@@ -142,8 +142,9 @@ gst_gsmenc_sinkconnect (GstPad *pad, GstCaps *caps)
}
static void
gst_gsmenc_chain (GstPad *pad, GstBuffer *buf)
gst_gsmenc_chain (GstPad *pad, GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstGSMEnc *gsmenc;
gsm_signal *data;
guint size;
......@@ -179,7 +180,7 @@ gst_gsmenc_chain (GstPad *pad, GstBuffer *buf)
gsm_encode (gsmenc->state, gsmenc->buffer, (gsm_byte *) GST_BUFFER_DATA (outbuf));
GST_BUFFER_TIMESTAMP (outbuf) = gsmenc->next_ts;
gst_pad_push (gsmenc->srcpad, outbuf);
gst_pad_push (gsmenc->srcpad, GST_DATA (outbuf));
gsmenc->next_ts += (160.0 / gsmenc->rate) * 1000000;
size -= (160 - gsmenc->bufsize);
......@@ -197,7 +198,7 @@ gst_gsmenc_chain (GstPad *pad, GstBuffer *buf)
gsm_encode (gsmenc->state, data, (gsm_byte *) GST_BUFFER_DATA (outbuf));
GST_BUFFER_TIMESTAMP (outbuf) = gsmenc->next_ts;
gst_pad_push (gsmenc->srcpad, outbuf);
gst_pad_push (gsmenc->srcpad, GST_DATA (outbuf));
gsmenc->next_ts += (160 / gsmenc->rate) * GST_SECOND;
size -= 160;
......
......@@ -65,7 +65,7 @@ static GstPadLinkReturn
gst_colorspace_srcconnect (GstPad *pad, GstCaps *caps);
static GstPadLinkReturn
gst_colorspace_srcconnect_func (GstPad *pad, GstCaps *caps, gboolean newcaps);
static void gst_colorspace_chain (GstPad *pad, GstBuffer *buf);
static void gst_colorspace_chain (GstPad *pad, GstData *_data);
static GstElementStateReturn
gst_colorspace_change_state (GstElement *element);
......@@ -471,8 +471,9 @@ gst_colorspace_init (GstColorspace *space)
}
static void
gst_colorspace_chain (GstPad *pad,GstBuffer *buf)
gst_colorspace_chain (GstPad *pad,GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstColorspace *space;
gint size;
GstBuffer *outbuf = NULL;
......@@ -554,7 +555,7 @@ gst_colorspace_chain (GstPad *pad,GstBuffer *buf)
gst_buffer_unref (buf);
}
gst_pad_push (space->srcpad, outbuf);
gst_pad_push (space->srcpad, GST_DATA (outbuf));
}
static GstElementStateReturn
......
......@@ -609,7 +609,7 @@ gst_ivorbisfile_loop (GstElement *element)
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, time,
GST_FORMAT_DEFAULT, samples, NULL);
gst_pad_push (ivorbisfile->srcpad, GST_BUFFER (discont));
gst_pad_push (ivorbisfile->srcpad, GST_DATA (discont));
}
}
......@@ -623,7 +623,7 @@ gst_ivorbisfile_loop (GstElement *element)
}
if (GST_PAD_IS_USABLE (ivorbisfile->srcpad))
gst_pad_push (ivorbisfile->srcpad, outbuf);
gst_pad_push (ivorbisfile->srcpad, GST_DATA (outbuf));
else
gst_buffer_unref (outbuf);
}
......
......@@ -439,7 +439,7 @@ gst_jack_loop (GstElement *element)
pad = GST_JACK_PAD (pads);
if (this->direction == GST_PAD_SINK) {
buffer = gst_pad_pull (pad->pad);
buffer = GST_BUFFER (gst_pad_pull (pad->pad));
if (GST_IS_EVENT (buffer)) {
GstEvent *event = GST_EVENT (buffer);
......@@ -470,7 +470,7 @@ gst_jack_loop (GstElement *element)
gst_buffer_set_data (buffer, pad->data, len);
GST_BUFFER_FLAG_SET(buffer, GST_BUFFER_DONTFREE);
gst_pad_push (pad->pad, buffer);
gst_pad_push (pad->pad, GST_DATA (buffer));
}
pads = g_list_next (pads);
}
......
......@@ -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 ; i<numsinkpads ; i++){
get_buffer:
buffers_in[i] = gst_pad_pull (ladspa->sinkpads[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; j<numsrcpads; j++)
gst_pad_push (ladspa->srcpads[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 ; i<numsrcpads ; i++) {
DEBUG_OBJ (ladspa, "pushing buffer (%p) on src pad %d", buffers_out[i], i);
gst_pad_push (ladspa->srcpads[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; i<numsrcpads; i++) {
DEBUG_OBJ (ladspa, "pushing buffer (%p, length %u bytes) on src pad %d",
buffers_out[i], GST_BUFFER_SIZE (buffers_out[i]), i);
gst_pad_push (ladspa->srcpads[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
......
......@@ -104,7 +104,7 @@ static GstPadLinkReturn
gst_colorspace_srcconnect (GstPad *pad, GstCaps *caps);
static GstPadLinkReturn
gst_colorspace_srcconnect_func (GstPad *pad, GstCaps *caps, gboolean newcaps);
static void gst_colorspace_chain (GstPad *pad, GstBuffer *buf);
static void gst_colorspace_chain (GstPad *pad, GstData *_data);
static GstElementStateReturn
gst_colorspace_change_state (GstElement *element);
......@@ -383,8 +383,9 @@ gst_colorspace_init (GstColorspace *space)
}
static void
gst_colorspace_chain (GstPad *pad,GstBuffer *buf)
gst_colorspace_chain (GstPad *pad,GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstColorspace *space;
GstBuffer *outbuf = NULL;
......@@ -433,7 +434,7 @@ gst_colorspace_chain (GstPad *pad,GstBuffer *buf)
gst_buffer_unref (buf);
}
gst_pad_push (space->srcpad, outbuf);
gst_pad_push (space->srcpad, GST_DATA (outbuf));
}
static GstElementStateReturn
......
......@@ -168,7 +168,7 @@ static void gst_fameenc_set_property (GObject *object, guint prop_id,
static void gst_fameenc_get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec);
static void gst_fameenc_chain (GstPad *pad, GstBuffer *buf);
static void gst_fameenc_chain (GstPad *pad, GstData *_data);
static GstElementClass *parent_class = NULL;
/*static guint gst_fameenc_signals[LAST_SIGNAL] = { 0 };*/
......@@ -415,8 +415,9 @@ gst_fameenc_dispose (GObject *object)
}
static void
gst_fameenc_chain (GstPad *pad, GstBuffer *buf)
gst_fameenc_chain (GstPad *pad, GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstFameEnc *fameenc;
guchar *data;
gulong size;
......@@ -474,7 +475,7 @@ gst_fameenc_chain (GstPad *pad, GstBuffer *buf)
GST_DEBUG ("gst_fameenc_chain: pushing buffer of size %d",
GST_BUFFER_SIZE(outbuf));
gst_pad_push (fameenc->srcpad, outbuf);
gst_pad_push (fameenc->srcpad, GST_DATA (outbuf));
}
fame_end_frame (fameenc->fc, NULL);
......
......@@ -80,7 +80,7 @@ static GstElementStateReturn gst_massink_change_state (GstElement *element);
static gboolean gst_massink_sync_parms (GstMassink *massink);
static GstPadLinkReturn gst_massink_sinkconnect (GstPad *pad, GstCaps *caps);
static void gst_massink_chain (GstPad *pad, GstBuffer *buf);
static void gst_massink_chain (GstPad *pad, GstData *_data);
static void gst_massink_set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec);
......@@ -213,8 +213,9 @@ gst_massink_sinkconnect (GstPad *pad, GstCaps *caps)
}
static void
gst_massink_chain (GstPad *pad, GstBuffer *buf)
gst_massink_chain (GstPad *pad, GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
gint32 err;
g_return_if_fail(pad != NULL);
......
......@@ -392,7 +392,7 @@ gst_mplex_write_callback (PS_Stream *stream, uint8_t *data, size_t size, void *u
outbuf = gst_buffer_new_and_alloc (size);
memcpy (GST_BUFFER_DATA (outbuf), data, size);
gst_pad_push (mplex->srcpad, outbuf);
gst_pad_push (mplex->srcpad, GST_DATA (outbuf));
}
return size;
......@@ -476,7 +476,7 @@ gst_mplex_loop (GstElement *element)
case GST_MPLEX_END:
{
mplex->ostrm->Close ();
gst_pad_push (mplex->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
gst_pad_push (mplex->srcpad, GST_DATA (gst_event_new (GST_EVENT_EOS)));
gst_element_set_eos (element);
break;
}
......
......@@ -49,7 +49,7 @@ static gboolean gst_sdlvideosink_create (GstSDLVideoSink
static GstPadLinkReturn gst_sdlvideosink_sinkconnect (GstPad *pad,
GstCaps *caps);
static void gst_sdlvideosink_chain (GstPad *pad,
GstBuffer *buf);
GstData *data);
static void gst_sdlvideosink_set_property (GObject *object,
guint prop_id,
......@@ -339,8 +339,9 @@ gst_sdlvideosink_sinkconnect (GstPad *pad,
static void
gst_sdlvideosink_chain (GstPad *pad, GstBuffer *buf)
gst_sdlvideosink_chain (GstPad *pad, GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstSDLVideoSink *sdlvideosink;
SDL_Event sdl_event;
......
......@@ -92,7 +92,7 @@ sink_template_factory (void)
static void gst_icecastsend_class_init (GstIcecastSendClass *klass);
static void gst_icecastsend_init (GstIcecastSend *icecastsend);
static void gst_icecastsend_chain (GstPad *pad, GstBuffer *buf);
static void gst_icecastsend_chain (GstPad *pad, GstData *_data);
static void gst_icecastsend_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void gst_icecastsend_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
......@@ -215,8 +215,9 @@ gst_icecastsend_init (GstIcecastSend *icecastsend)
}
static void
gst_icecastsend_chain (GstPad *pad, GstBuffer *buf)
gst_icecastsend_chain (GstPad *pad, GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstIcecastSend *icecastsend;
glong ret;
......
......@@ -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;
......
......@@ -87,7 +87,7 @@ static GType gst_snapshot_get_type (void);
static void gst_snapshot_class_init (GstSnapshotClass *klass);
static void gst_snapshot_init (GstSnapshot *snapshot);
static void gst_snapshot_chain (GstPad *pad, GstBuffer *buf);
static void gst_snapshot_chain (GstPad *pad, GstData *_data);
static void gst_snapshot_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void gst_snapshot_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
......@@ -249,8 +249,9 @@ gst_snapshot_init (GstSnapshot *snapshot)
static void
gst_snapshot_chain (GstPad *pad, GstBuffer *buf)
gst_snapshot_chain (GstPad *pad, GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
GstSnapshot *snapshot;
guchar *data, *data_to_convert, *buffer_i420, *data_converted;
gulong size,image_size;
......@@ -330,7 +331,7 @@ gst_snapshot_chain (GstPad *pad, GstBuffer *buf)
}
}
gst_pad_push(snapshot->srcpad,buf );
gst_pad_push(snapshot->srcpad,GST_DATA (buf ));
}
static void
......
......@@ -703,7 +703,7 @@ gst_sf_loop (GstElement *element)
data = (gfloat*)GST_BUFFER_DATA (out);
for (j=0; j<read; j++)
data[j] = buf[j * nchannels + i % nchannels];
gst_pad_push (channel->pad, out);
gst_pad_push (channel->pad, GST_DATA (out));
}
this->time += read * (GST_SECOND / this->rate);
......@@ -715,7 +715,7 @@ gst_sf_loop (GstElement *element)
eos = 0;
} else {
for (l=this->channels; l; l=l->next)
gst_pad_push (GST_SF_CHANNEL (l)->pad, (GstBuffer*)gst_event_new (GST_EVENT_EOS));
gst_pad_push (GST_SF_CHANNEL (l)->pad, GST_DATA (gst_event_new (GST_EVENT_EOS)));
gst_element_set_eos (element);
}
}
......@@ -740,7 +740,7 @@ gst_sf_loop (GstElement *element)
for (i=0,l=this->channels; l; l=l->next,i++) {
channel = GST_SF_CHANNEL (l);
in = gst_pad_pull (channel->pad);
in = GST_BUFFER (gst_pad_pull (channel->pad));
if (buffer_frames == 0) {
/* pulling a buffer from the pad should have caused capsnego to occur,
......
......@@ -206,7 +206,7 @@ gst_swfdec_loop(GstElement *element)
ret = swfdec_decoder_parse(swfdec->state);
if(ret==SWF_NEEDBITS){
buf = gst_pad_pull(swfdec->sinkpad);
buf = GST_BUFFER (gst_pad_pull(swfdec->sinkpad));
if(GST_IS_EVENT(buf)){
switch (GST_EVENT_TYPE (buf)) {
case GST_EVENT_EOS:
......@@ -253,7 +253,7 @@ gst_swfdec_loop(GstElement *element)
swfdec->timestamp += swfdec->interval;
GST_BUFFER_TIMESTAMP(newbuf) = swfdec->timestamp;
gst_pad_push(swfdec->videopad, newbuf);
gst_pad_push(swfdec->videopad, GST_DATA (newbuf));
/* audio stuff */
......@@ -265,15 +265,15 @@ gst_swfdec_loop(GstElement *element)
GST_BUFFER_DATA(newbuf) = data;
GST_BUFFER_TIMESTAMP(newbuf) = swfdec->timestamp;
gst_pad_push(swfdec->audiopad, newbuf);
gst_pad_push(swfdec->audiopad, GST_DATA (newbuf));
data = swfdec_decoder_get_sound_chunk(swfdec->state, &len);
}
}
if(ret==SWF_EOF){
gst_pad_push(swfdec->videopad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
gst_pad_push(swfdec->audiopad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
gst_pad_push(swfdec->videopad, GST_DATA (gst_event_new (GST_EVENT_EOS)));
gst_pad_push(swfdec->audiopad, GST_DATA (gst_event_new (GST_EVENT_EOS)));
}
}
......
......@@ -56,7 +56,7 @@ enum
static void gst_tarkindec_class_init (TarkinDecClass *klass);
static void gst_tarkindec_init (TarkinDec *arkindec);
static void gst_tarkindec_chain (GstPad *pad, GstBuffer *buf);
static void gst_tarkindec_chain (GstPad *pad, GstData *_data);
static void gst_tarkindec_setup (TarkinDec *tarkindec);
static GstElementStateReturn
gst_tarkindec_change_state (GstElement *element);
......@@ -145,8 +145,9 @@ gst_tarkindec_setup (TarkinDec *tarkindec)
}
static void
gst_tarkindec_chain (GstPad *pad, GstBuffer *buf)
gst_tarkindec_chain (GstPad *pad, GstData *_data)
{
GstBuffer *buf = GST_BUFFER (_data);
TarkinDec *tarkindec;
g_return_if_fail (pad != NULL);
......@@ -234,7 +235,7 @@ gst_tarkindec_chain (GstPad *pad, GstBuffer *buf)
GST_BUFFER_DATA (outbuf) = rgb;
GST_BUFFER_SIZE (outbuf) = layer->width * layer->height * 3;
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_DONTFREE);
gst_pad_push (tarkindec->srcpad, outbuf);
gst_pad_push (tarkindec->srcpad, GST_DATA (outbuf));
tarkin_synthesis_freeframe (tarkindec->tarkin_stream, rgb);
}
......
......@@ -58,7 +58,7 @@ enum
static void gst_tarkinenc_class_init (TarkinEncClass *klass);
static void gst_tarkinenc_init (TarkinEnc *arkinenc);
static void gst_tarkinenc_chain (GstPad *pad, GstBuffer *buf);
static void gst_tarkinenc_chain (GstPad *pad, GstData *_data);
static void gst_tarkinenc_setup (TarkinEnc *tarkinenc);
static void gst_tarkinenc_get_property (GObject *object, guint prop_id, GValue *value,
......@@ -184,24 +184,24 @@ TarkinError packet_out (void *stream, ogg_packet *op)
GST_BUFFER_DATA (outbuf) = og.header;
GST_BUFFER_SIZE (outbuf) = og.header_len;
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_DONTFREE);
gst_pad_push (te->srcpad, outbuf);
gst_pad_push (te->srcpad, GST_DATA (outbuf));
outbuf = gst_buffer_new ();
GST_BUFFER_DATA (outbuf) = og.body;
GST_BUFFER_SIZE (outbuf) = og.body_len;
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_DONTFREE);
gst_pad_push (te->srcpad, outbuf);
gst_pad_push (te->srcpad, GST_DATA (outbuf));
} else {
while (ogg_stream_pageout (&te->os, &og)){
outbuf = gst_buffer_new ();
GST_BUFFER_DATA (outbuf) = og.header;
GST_BUFFER_SIZE (outbuf) = og.header_len;
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_DONTFREE);
gst_pad_push (te->srcpad, outbuf);
gst_pad_push (te->srcpad, GST_DATA (outbuf));
outbuf = gst_buffer_new ();
GST_BUFFER_DATA (outbuf) = og.body;
GST_BUFFER_SIZE (outbuf) = og.body_len;
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_DONTFREE);
gst_pad_push (te->srcpad, outbuf);
gst_pad_push (te->srcpad, GST_DATA (outbuf));
}
}
return (TARKIN_OK);
......@@ -243,20 +243,21 @@ gst_tarkinenc_setup (TarkinEnc *tarkinenc)
GST_BUFFER_DATA (outbuf) = tarkinenc->og.header;
GST_BUFFER_SIZE (outbuf) = tarkinenc->og.header_len;
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_DONTFREE);
gst_pad_push (tarkinenc->srcpad, outbuf);
gst_pad_push (tarkinenc->srcpad, GST_DATA (outbuf));
outbuf = gst_buffer_new ();
GST_BUFFER_DATA (outbuf) = tarkinenc->og.body;
GST_BUFFER_SIZE (outbuf) = tarkinenc->og.body_len;
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_DONTFREE);