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 /sys | |
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 'sys')
-rw-r--r-- | sys/oss/gstossgst.c | 6 | ||||
-rw-r--r-- | sys/oss/gstosssink.c | 5 | ||||
-rw-r--r-- | sys/oss/gstosssrc.c | 16 | ||||
-rw-r--r-- | sys/v4l2/gstv4l2src.c | 6 |
4 files changed, 17 insertions, 16 deletions
diff --git a/sys/oss/gstossgst.c b/sys/oss/gstossgst.c index 070c693a..1dfd2b07 100644 --- a/sys/oss/gstossgst.c +++ b/sys/oss/gstossgst.c @@ -55,7 +55,7 @@ static GstElementStateReturn gst_ossgst_change_state (GstElement *element); static void gst_ossgst_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gst_ossgst_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static GstBuffer* gst_ossgst_get (GstPad *pad); +static GstData* gst_ossgst_get (GstPad *pad); /* OssGst signals and args */ enum { @@ -277,7 +277,7 @@ gst_ossgst_format_to_caps (gint format, gint stereo, gint rate) return caps; } -static GstBuffer* +static GstData* gst_ossgst_get (GstPad *pad) { GstOssGst *ossgst; @@ -320,7 +320,7 @@ gst_ossgst_get (GstPad *pad) } } - return buf; + return GST_DATA (buf); } static void diff --git a/sys/oss/gstosssink.c b/sys/oss/gstosssink.c index 067f69ce..f902f3f2 100644 --- a/sys/oss/gstosssink.c +++ b/sys/oss/gstosssink.c @@ -67,7 +67,7 @@ static void gst_osssink_set_property (GObject *object, guint prop_id, const G static void gst_osssink_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_osssink_chain (GstPad *pad,GstBuffer *buf); +static void gst_osssink_chain (GstPad *pad,GstData *_data); /* OssSink signals and args */ enum { @@ -316,8 +316,9 @@ gst_osssink_set_clock (GstElement *element, GstClock *clock) } static void -gst_osssink_chain (GstPad *pad, GstBuffer *buf) +gst_osssink_chain (GstPad *pad, GstData *_data) { + GstBuffer *buf = GST_BUFFER (_data); GstOssSink *osssink; GstClockTime buftime; diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c index c2ff0025..7e675344 100644 --- a/sys/oss/gstosssrc.c +++ b/sys/oss/gstosssrc.c @@ -112,7 +112,7 @@ static const GstQueryType* gst_osssrc_get_query_types (GstPad *pad); static gboolean gst_osssrc_src_query (GstPad *pad, GstQueryType type, GstFormat *format, gint64 *value); -static GstBuffer * gst_osssrc_get (GstPad *pad); +static GstData * gst_osssrc_get (GstPad *pad); static GstElementClass *parent_class = NULL; /*static guint gst_osssrc_signals[LAST_SIGNAL] = { 0 }; */ @@ -293,7 +293,7 @@ gst_osssrc_set_clock (GstElement *element, GstClock *clock) osssrc->clock = clock; } -static GstBuffer * +static GstData * gst_osssrc_get (GstPad *pad) { GstOssSrc *src; @@ -306,7 +306,7 @@ gst_osssrc_get (GstPad *pad) if (src->need_eos) { src->need_eos = FALSE; - return GST_BUFFER (gst_event_new (GST_EVENT_EOS)); + return GST_DATA (gst_event_new (GST_EVENT_EOS)); } buf = gst_buffer_new_and_alloc (src->buffersize); @@ -316,13 +316,13 @@ gst_osssrc_get (GstPad *pad) if (!gst_osssrc_negotiate (pad)) { gst_buffer_unref (buf); gst_element_error (GST_ELEMENT (src), "could not negotiate format"); - return GST_BUFFER (gst_event_new (GST_EVENT_INTERRUPT)); + return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT)); } } if (GST_OSSELEMENT (src)->bps == 0) { gst_buffer_unref (buf); gst_element_error (GST_ELEMENT (src), "no format negotiated"); - return GST_BUFFER (gst_event_new (GST_EVENT_INTERRUPT)); + return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT)); } readbytes = read (GST_OSSELEMENT (src)->fd,GST_BUFFER_DATA (buf), @@ -331,13 +331,13 @@ gst_osssrc_get (GstPad *pad) gst_buffer_unref (buf); gst_element_error (GST_ELEMENT (src), "error reading data (%s)", strerror (errno)); - return GST_BUFFER (gst_event_new (GST_EVENT_INTERRUPT)); + return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT)); } if (readbytes == 0) { gst_buffer_unref (buf); gst_element_set_eos (GST_ELEMENT (src)); - return GST_BUFFER (gst_event_new (GST_EVENT_INTERRUPT)); + return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT)); } GST_BUFFER_SIZE (buf) = readbytes; @@ -353,7 +353,7 @@ gst_osssrc_get (GstPad *pad) GST_DEBUG ("pushed buffer from soundcard of %ld bytes, timestamp %" G_GINT64_FORMAT, readbytes, GST_BUFFER_TIMESTAMP (buf)); - return buf; + return GST_DATA (buf); } static void diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 015e3c43..7a0094bd 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -74,7 +74,7 @@ static GstPadLinkReturn gst_v4l2src_srcconnect (GstPad *pad, GstCaps *caps); static GstCaps * gst_v4l2src_getcaps (GstPad *pad, GstCaps *caps); -static GstBuffer * gst_v4l2src_get (GstPad *pad); +static GstData * gst_v4l2src_get (GstPad *pad); /* get/set params */ static void gst_v4l2src_set_property (GObject *object, @@ -765,7 +765,7 @@ gst_v4l2src_getcaps (GstPad *pad, } -static GstBuffer* +static GstData* gst_v4l2src_get (GstPad *pad) { GstV4l2Src *v4l2src; @@ -874,7 +874,7 @@ gst_v4l2src_get (GstPad *pad) g_signal_emit(G_OBJECT(v4l2src), gst_v4l2src_signals[SIGNAL_FRAME_CAPTURE], 0); - return buf; + return GST_DATA (buf); } |