diff options
author | David Schleef <ds@schleef.org> | 2003-12-21 22:11:46 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2003-12-21 22:11:46 +0000 |
commit | 0d9a29465920184a2f1ae1d21be9d8598dd33b93 (patch) | |
tree | f2a81f79d8968ea82550fa7b430d9f3f1930865d /sys | |
parent | b2c18cf78125b584585f0c229338738c4c16eb9f (diff) | |
download | gst-plugins-bad-0d9a29465920184a2f1ae1d21be9d8598dd33b93.tar.gz gst-plugins-bad-0d9a29465920184a2f1ae1d21be9d8598dd33b93.tar.bz2 gst-plugins-bad-0d9a29465920184a2f1ae1d21be9d8598dd33b93.zip |
Remove bufferpools (but keep implementations)
Original commit message from CVS:
Remove bufferpools (but keep implementations)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/glsink/gstglsink.c | 27 | ||||
-rw-r--r-- | sys/v4l2/gstv4l2src.c | 31 | ||||
-rw-r--r-- | sys/v4l2/gstv4l2src.h | 3 |
3 files changed, 9 insertions, 52 deletions
diff --git a/sys/glsink/gstglsink.c b/sys/glsink/gstglsink.c index 15e8926e..3e1e56ce 100644 --- a/sys/glsink/gstglsink.c +++ b/sys/glsink/gstglsink.c @@ -107,8 +107,6 @@ struct _GstGLSink { GstClock *clock; - /* bufferpool stuff */ - GstBufferPool *bufferpool; GMutex *cache_lock; GList *cache; @@ -139,7 +137,6 @@ static void gst_glsink_set_clock (GstElement *element, GstClock *clock); static GstElementStateReturn gst_glsink_change_state (GstElement *element); static GstPadLinkReturn gst_glsink_sinkconnect (GstPad *pad, GstCaps *caps); static GstCaps * gst_glsink_getcaps (GstPad *pad, GstCaps *caps); -static GstBufferPool* gst_glsink_get_bufferpool (GstPad *pad); static void gst_glsink_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); @@ -149,13 +146,6 @@ static void gst_glsink_get_property (GObject *object, guint prop_id, static void gst_glsink_release_conn (GstGLSink *sink); static void gst_glsink_append_cache (GstGLSink *sink, GstImageData *image); static gboolean gst_glsink_set_caps (GstGLSink *sink, GstCaps *caps); -/* bufferpool stuff */ -static GstBuffer* gst_glsink_buffer_new (GstBufferPool *pool, - gint64 location, - guint size, gpointer user_data); -static void gst_glsink_buffer_free (GstBufferPool *pool, - GstBuffer *buffer, - gpointer user_data); /* prototypes from plugins */ extern GstImagePlugin* get_gl_rgbimage_plugin (void); @@ -278,13 +268,6 @@ gst_glsink_init (GstGLSink *sink) /* create bufferpool and image cache */ GST_DEBUG ("glsink: creating bufferpool"); - sink->bufferpool = gst_buffer_pool_new ( - NULL, - NULL, - (GstBufferPoolBufferNewFunction)gst_glsink_buffer_new, - NULL, - (GstBufferPoolBufferFreeFunction)gst_glsink_buffer_free, - sink); sink->cache_lock = g_mutex_new(); sink->cache = NULL; @@ -332,6 +315,7 @@ gst_glsink_append_cache (GstGLSink *sink, GstImageData *image) g_mutex_unlock (sink->cache_lock); } +#if 0 /* Create a new buffer to hand up the chain. This allows the plugins to make its own decoding buffers @@ -380,14 +364,7 @@ gst_glsink_buffer_free (GstBufferPool *pool, GstBuffer *buffer, gpointer user_da gst_buffer_default_free (buffer); } - -static GstBufferPool* -gst_glsink_get_bufferpool (GstPad *pad) -{ - GstGLSink *sink = GST_GLSINK (gst_pad_get_parent (pad)); - - return sink->bufferpool; -} +#endif /* Set the caps that the application desires. diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 76d8a0d2..35da2078 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -92,16 +92,6 @@ static void gst_v4l2src_set_clock (GstElement *element, GstClock *clock); -/* bufferpool functions */ -static GstBuffer * gst_v4l2src_buffer_new (GstBufferPool *pool, - guint64 offset, - guint size, - gpointer user_data); -static void gst_v4l2src_buffer_free (GstBufferPool *pool, - GstBuffer *buf, - gpointer user_data); - - static GstPadTemplate *src_template; static GstElementClass *parent_class = NULL; @@ -222,12 +212,6 @@ gst_v4l2src_init (GstV4l2Src *v4l2src) gst_pad_set_convert_function (v4l2src->srcpad, gst_v4l2src_srcconvert); gst_pad_set_getcaps_function (v4l2src->srcpad, gst_v4l2src_getcaps); - v4l2src->bufferpool = gst_buffer_pool_new(NULL, NULL, - gst_v4l2src_buffer_new, - NULL, - gst_v4l2src_buffer_free, - v4l2src); - v4l2src->breq.count = 0; v4l2src->formats = NULL; @@ -761,13 +745,6 @@ gst_v4l2src_get (GstPad *pad) (fps = gst_v4l2src_get_fps(v4l2src)) == 0) return NULL; - buf = gst_buffer_new_from_pool(v4l2src->bufferpool, 0, 0); - if (!buf) { - gst_element_error(GST_ELEMENT(v4l2src), - "Failed to create a new GstBuffer"); - return NULL; - } - if (v4l2src->need_writes > 0) { /* use last frame */ num = v4l2src->last_frame; @@ -842,8 +819,10 @@ gst_v4l2src_get (GstPad *pad) v4l2src->use_num_times[num] = 1; } + buf = gst_buffer_new (); GST_BUFFER_DATA(buf) = gst_v4l2src_get_buffer(v4l2src, num); GST_BUFFER_SIZE(buf) = v4l2src->bufsettings.bytesused; + GST_BUFFER_FLAG_SET(buf, GST_BUFFER_READONLY); if (v4l2src->use_fixed_fps) GST_BUFFER_TIMESTAMP(buf) = v4l2src->handled * GST_SECOND / fps; else /* calculate time based on our own clock */ @@ -987,6 +966,7 @@ gst_v4l2src_set_clock (GstElement *element, } +#if 0 static GstBuffer* gst_v4l2src_buffer_new (GstBufferPool *pool, guint64 offset, @@ -1010,8 +990,9 @@ gst_v4l2src_buffer_new (GstBufferPool *pool, return buffer; } +#endif - +#if 0 static void gst_v4l2src_buffer_free (GstBufferPool *pool, GstBuffer *buf, @@ -1039,3 +1020,5 @@ gst_v4l2src_buffer_free (GstBufferPool *pool, /* free the buffer itself */ gst_buffer_default_free(buf); } +#endif + diff --git a/sys/v4l2/gstv4l2src.h b/sys/v4l2/gstv4l2src.h index 1b4ab095..bae60900 100644 --- a/sys/v4l2/gstv4l2src.h +++ b/sys/v4l2/gstv4l2src.h @@ -80,9 +80,6 @@ struct _GstV4l2Src { /* how are we going to push buffers? */ gboolean use_fixed_fps; - - /* bufferpool for the buffers we're gonna use */ - GstBufferPool *bufferpool; }; struct _GstV4l2SrcClass { |