diff options
Diffstat (limited to 'ext/audiofile')
-rw-r--r-- | ext/audiofile/gstafparse.c | 10 | ||||
-rw-r--r-- | ext/audiofile/gstafsink.c | 5 | ||||
-rw-r--r-- | ext/audiofile/gstafsrc.c | 8 |
3 files changed, 12 insertions, 11 deletions
diff --git a/ext/audiofile/gstafparse.c b/ext/audiofile/gstafparse.c index 183f5147..248389f6 100644 --- a/ext/audiofile/gstafparse.c +++ b/ext/audiofile/gstafparse.c @@ -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); diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c index 3392717c..fd80975e 100644 --- a/ext/audiofile/gstafsink.c +++ b/ext/audiofile/gstafsink.c @@ -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; diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c index 2b817310..8c1a0c69 100644 --- a/ext/audiofile/gstafsrc.c +++ b/ext/audiofile/gstafsrc.c @@ -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 |