summaryrefslogtreecommitdiffstats
path: root/sys/v4l2
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-12-21 22:11:46 +0000
committerDavid Schleef <ds@schleef.org>2003-12-21 22:11:46 +0000
commit0d9a29465920184a2f1ae1d21be9d8598dd33b93 (patch)
treef2a81f79d8968ea82550fa7b430d9f3f1930865d /sys/v4l2
parentb2c18cf78125b584585f0c229338738c4c16eb9f (diff)
downloadgst-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/v4l2')
-rw-r--r--sys/v4l2/gstv4l2src.c31
-rw-r--r--sys/v4l2/gstv4l2src.h3
2 files changed, 7 insertions, 27 deletions
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 {