summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-12-21 22:11:47 +0000
committerDavid Schleef <ds@schleef.org>2003-12-21 22:11:47 +0000
commita47a4d1f17d5154d4e00722eaca22b7b247bdfb5 (patch)
tree9d71aafceee9ea5b31df12f19a7f134e87f38899
parentfc2ff6ff59a55b345592a80a22c0e017ef763216 (diff)
Remove bufferpools (but keep implementations)
Original commit message from CVS: Remove bufferpools (but keep implementations)
-rw-r--r--gst/adder/gstadder.c16
-rw-r--r--gst/adder/gstadder.h1
-rw-r--r--gst/sine/gstsinesrc.c9
-rw-r--r--gst/sine/gstsinesrc.h1
-rw-r--r--gst/videotestsrc/gstvideotestsrc.c20
-rw-r--r--gst/videotestsrc/gstvideotestsrc.h4
-rw-r--r--gst/volume/gstvolume.c11
-rw-r--r--sys/v4l/gstv4lmjpegsink.c20
-rw-r--r--sys/v4l/gstv4lmjpegsink.h3
-rw-r--r--sys/v4l/gstv4lmjpegsrc.c32
-rw-r--r--sys/v4l/gstv4lmjpegsrc.h3
-rw-r--r--sys/v4l/gstv4lsrc.c32
-rw-r--r--sys/v4l/gstv4lsrc.h3
-rw-r--r--sys/ximage/ximagesink.c35
-rw-r--r--sys/ximage/ximagesink.h1
-rw-r--r--sys/xvimage/xvimagesink.c35
-rw-r--r--sys/xvimage/xvimagesink.h1
17 files changed, 37 insertions, 190 deletions
diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c
index 72dce369c..238e432bb 100644
--- a/gst/adder/gstadder.c
+++ b/gst/adder/gstadder.c
@@ -303,7 +303,6 @@ gst_adder_init (GstAdder *adder)
/* keep track of the sinkpads requested */
- adder->bufpool = NULL;
adder->numsinkpads = 0;
adder->input_channels = NULL;
}
@@ -396,16 +395,9 @@ gst_adder_loop (GstElement *element)
adder = GST_ADDER (element);
- if (adder->bufpool == NULL) {
- adder->bufpool = gst_pad_get_bufferpool (adder->srcpad);
- if (adder->bufpool == NULL) {
- adder->bufpool = gst_buffer_pool_get_default (GST_ADDER_BUFFER_SIZE,
- GST_ADDER_NUM_BUFFERS);
- }
- }
-
/* get new output buffer */
- buf_out = gst_buffer_new_from_pool (adder->bufpool, 0, 0);
+ /* FIXME the 1024 is arbitrary */
+ buf_out = gst_buffer_new_and_alloc (1024);
if (buf_out == NULL) {
gst_element_error (GST_ELEMENT (adder), "could not get new output buffer");
@@ -575,10 +567,6 @@ gst_adder_change_state (GstElement *element)
case GST_STATE_PAUSED_TO_PLAYING:
break;
case GST_STATE_PLAYING_TO_PAUSED:
- if (adder->bufpool) {
- gst_buffer_pool_unref (adder->bufpool);
- adder->bufpool = NULL;
- }
break;
case GST_STATE_PAUSED_TO_READY:
break;
diff --git a/gst/adder/gstadder.h b/gst/adder/gstadder.h
index a1d6f1d9f..00a950b5a 100644
--- a/gst/adder/gstadder.h
+++ b/gst/adder/gstadder.h
@@ -63,7 +63,6 @@ struct _GstAdder {
GstElement element;
GstPad *srcpad;
- GstBufferPool *bufpool;
/* keep track of the sinkpads */
guint numsinkpads;
diff --git a/gst/sine/gstsinesrc.c b/gst/sine/gstsinesrc.c
index abbcffc96..22d7cf856 100644
--- a/gst/sine/gstsinesrc.c
+++ b/gst/sine/gstsinesrc.c
@@ -188,7 +188,6 @@ gst_sinesrc_init (GstSineSrc *src)
src->samples_per_buffer=1024;
src->timestamp=0LLU;
src->offset=0LLU;
- src->bufpool=NULL;
src->seq = 0;
@@ -316,13 +315,11 @@ gst_sinesrc_get (GstPad *pad)
g_return_val_if_fail (pad != NULL, NULL);
src = GST_SINESRC (gst_pad_get_parent (pad));
- if (src->bufpool == NULL) {
- src->bufpool = gst_buffer_pool_get_default (2 * src->samples_per_buffer, 8);
- }
-
tdiff = src->samples_per_buffer * GST_SECOND / src->samplerate;
- buf = (GstBuffer *) gst_buffer_new_from_pool (src->bufpool, 0, 0);
+ /* FIXME the 1024 is arbitrary */
+ buf = gst_buffer_new_and_alloc (1024);
+
GST_BUFFER_TIMESTAMP(buf) = src->timestamp;
GST_BUFFER_OFFSET (buf) = src->offset;
GST_BUFFER_DURATION (buf) = tdiff;
diff --git a/gst/sine/gstsinesrc.h b/gst/sine/gstsinesrc.h
index 03735ee0b..b07e06743 100644
--- a/gst/sine/gstsinesrc.h
+++ b/gst/sine/gstsinesrc.h
@@ -75,7 +75,6 @@ struct _GstSineSrc {
guint64 timestamp;
guint64 offset;
- GstBufferPool *bufpool;
gdouble accumulator;
};
diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c
index dff83f584..2ce3f5997 100644
--- a/gst/videotestsrc/gstvideotestsrc.c
+++ b/gst/videotestsrc/gstvideotestsrc.c
@@ -254,8 +254,6 @@ gst_videotestsrc_src_link (GstPad * pad, const GstCaps2 * caps)
GST_DEBUG ("size %d x %d", videotestsrc->width, videotestsrc->height);
- videotestsrc->pool = gst_pad_get_bufferpool (videotestsrc->srcpad);
-
return GST_PAD_LINK_OK;
}
@@ -265,10 +263,6 @@ gst_videotestsrc_src_unlink (GstPad * pad)
GstVideotestsrc *videotestsrc;
videotestsrc = GST_VIDEOTESTSRC (gst_pad_get_parent (pad));
-
- if (videotestsrc->pool) {
- gst_buffer_pool_unref (videotestsrc->pool);
- }
}
static GstElementStateReturn
@@ -367,7 +361,6 @@ gst_videotestsrc_init (GstVideotestsrc * videotestsrc)
gst_pad_set_query_type_function (videotestsrc->srcpad,
gst_videotestsrc_get_query_types);
- videotestsrc->pool = NULL;
gst_videotestsrc_set_pattern(videotestsrc, GST_VIDEOTESTSRC_SMPTE);
videotestsrc->sync = TRUE;
@@ -446,18 +439,7 @@ gst_videotestsrc_get (GstPad * pad)
GST_DEBUG ("size=%ld %dx%d", newsize, videotestsrc->width, videotestsrc->height);
- buf = NULL;
- if (videotestsrc->pool) {
- buf = gst_buffer_new_from_pool (videotestsrc->pool, 0, 0);
- /* if the buffer we get is too small, make our own */
- if (buf && GST_BUFFER_SIZE (buf) < newsize){
- gst_buffer_unref (buf);
- buf = NULL;
- }
- }
- if (!buf) {
- buf = gst_buffer_new_and_alloc (newsize);
- }
+ buf = gst_buffer_new_and_alloc (newsize);
g_return_val_if_fail (GST_BUFFER_DATA (buf) != NULL, NULL);
videotestsrc->make_image (videotestsrc, (void *) GST_BUFFER_DATA (buf),
diff --git a/gst/videotestsrc/gstvideotestsrc.h b/gst/videotestsrc/gstvideotestsrc.h
index a333d34be..d7c1d39ee 100644
--- a/gst/videotestsrc/gstvideotestsrc.h
+++ b/gst/videotestsrc/gstvideotestsrc.h
@@ -73,8 +73,6 @@ struct _GstVideotestsrc {
int type;
GstClock *clock;
- GstBufferPool *pool;
-
void (*make_image)(GstVideotestsrc *v, unsigned char *dest, int w, int h);
};
@@ -82,7 +80,7 @@ struct _GstVideotestsrcClass {
GstElementClass parent_class;
};
-GType gst_videotestsrc_get_type(void);
+GType gst_videotestsrc_get_type(void) G_GNUC_CONST;
G_END_DECLS
diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c
index cac956b18..a86bd0711 100644
--- a/gst/volume/gstvolume.c
+++ b/gst/volume/gstvolume.c
@@ -111,16 +111,6 @@ static void volume_chain_int16 (GstPad *pad, GstData *_data);
static GstElementClass *parent_class = NULL;
/*static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; */
-static GstBufferPool*
-volume_get_bufferpool (GstPad *pad)
-{
- GstVolume *filter;
-
- filter = GST_VOLUME (gst_pad_get_parent (pad));
-
- return gst_pad_get_bufferpool (filter->srcpad);
-}
-
static GstPadLinkReturn
volume_connect (GstPad *pad, GstCaps2 *caps)
{
@@ -228,7 +218,6 @@ volume_init (GstVolume *filter)
{
filter->sinkpad = gst_pad_new_from_template(volume_sink_factory (),"sink");
gst_pad_set_link_function(filter->sinkpad,volume_connect);
- gst_pad_set_bufferpool_function(filter->sinkpad,volume_get_bufferpool);
filter->srcpad = gst_pad_new_from_template(volume_src_factory (),"src");
gst_pad_set_link_function(filter->srcpad,volume_connect);
diff --git a/sys/v4l/gstv4lmjpegsink.c b/sys/v4l/gstv4lmjpegsink.c
index 5ae1fbca6..da608c1c2 100644
--- a/sys/v4l/gstv4lmjpegsink.c
+++ b/sys/v4l/gstv4lmjpegsink.c
@@ -72,12 +72,6 @@ static void gst_v4lmjpegsink_get_property (GObject
static GstElementStateReturn gst_v4lmjpegsink_change_state (GstElement *element);
static void gst_v4lmjpegsink_set_clock (GstElement *element, GstClock *clock);
-/* bufferpool functions */
-static GstBuffer* gst_v4lmjpegsink_buffer_new (GstBufferPool *pool,
- guint64 offset,
- guint size,
- gpointer user_data);
-
static GstPadTemplate *sink_template;
@@ -192,14 +186,6 @@ gst_v4lmjpegsink_init (GstV4lMjpegSink *v4lmjpegsink)
v4lmjpegsink->bufsize = 256;
GST_FLAG_SET(v4lmjpegsink, GST_ELEMENT_THREAD_SUGGESTED);
-
- v4lmjpegsink->bufferpool = gst_buffer_pool_new(
- NULL,
- NULL,
- (GstBufferPoolBufferNewFunction)gst_v4lmjpegsink_buffer_new,
- NULL,
- NULL,
- v4lmjpegsink);
}
@@ -280,6 +266,7 @@ gst_v4lmjpegsink_chain (GstPad *pad,
gst_clock_id_free (id);
}
+#if 0
if (GST_BUFFER_POOL(buf) == v4lmjpegsink->bufferpool)
{
num = GPOINTER_TO_INT(GST_BUFFER_POOL_PRIVATE(buf));
@@ -287,6 +274,7 @@ gst_v4lmjpegsink_chain (GstPad *pad,
}
else
{
+#endif
/* check size */
if (GST_BUFFER_SIZE(buf) > v4lmjpegsink->breq.size)
{
@@ -301,7 +289,9 @@ gst_v4lmjpegsink_chain (GstPad *pad,
memcpy(gst_v4lmjpegsink_get_buffer(v4lmjpegsink, num),
GST_BUFFER_DATA(buf), GST_BUFFER_SIZE(buf));
gst_v4lmjpegsink_play_frame(v4lmjpegsink, num);
+#if 0
}
+#endif
g_signal_emit(G_OBJECT(v4lmjpegsink),gst_v4lmjpegsink_signals[SIGNAL_FRAME_DISPLAYED],0);
@@ -309,6 +299,7 @@ gst_v4lmjpegsink_chain (GstPad *pad,
}
+#if 0
static GstBuffer *
gst_v4lmjpegsink_buffer_new (GstBufferPool *pool,
guint64 offset,
@@ -344,6 +335,7 @@ gst_v4lmjpegsink_buffer_new (GstBufferPool *pool,
return buffer;
}
+#endif
static void
diff --git a/sys/v4l/gstv4lmjpegsink.h b/sys/v4l/gstv4lmjpegsink.h
index fbd1aacb2..d8578c6e1 100644
--- a/sys/v4l/gstv4lmjpegsink.h
+++ b/sys/v4l/gstv4lmjpegsink.h
@@ -66,9 +66,6 @@ struct _GstV4lMjpegSink {
GCond **cond_queued_frames;
gint current_frame;
- /* something to get our buffers from */
- GstBufferPool *bufferpool;
-
/* width/height/norm of the jpeg stream */
gint width;
gint height;
diff --git a/sys/v4l/gstv4lmjpegsrc.c b/sys/v4l/gstv4lmjpegsrc.c
index 00316d268..01a2cc940 100644
--- a/sys/v4l/gstv4lmjpegsrc.c
+++ b/sys/v4l/gstv4lmjpegsrc.c
@@ -92,15 +92,6 @@ static void gst_v4lmjpegsrc_set_clock (GstElement *eleme
/* state handling */
static GstElementStateReturn gst_v4lmjpegsrc_change_state (GstElement *element);
-/* bufferpool functions */
-static GstBuffer* gst_v4lmjpegsrc_buffer_new (GstBufferPool *pool,
- guint64 offset,
- guint size,
- gpointer user_data);
-static void gst_v4lmjpegsrc_buffer_free (GstBufferPool *pool,
- GstBuffer *buf,
- gpointer user_data);
-
static GstPadTemplate *src_template;
@@ -239,14 +230,6 @@ gst_v4lmjpegsrc_init (GstV4lMjpegSrc *v4lmjpegsrc)
gst_pad_set_link_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_srcconnect);
gst_pad_set_convert_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_srcconvert);
- v4lmjpegsrc->bufferpool = gst_buffer_pool_new(
- NULL,
- NULL,
- (GstBufferPoolBufferNewFunction)gst_v4lmjpegsrc_buffer_new,
- NULL,
- (GstBufferPoolBufferFreeFunction)gst_v4lmjpegsrc_buffer_free,
- v4lmjpegsrc);
-
#if 0
v4lmjpegsrc->frame_width = 0;
v4lmjpegsrc->frame_height = 0;
@@ -482,14 +465,6 @@ gst_v4lmjpegsrc_get (GstPad *pad)
(fps = gst_v4lmjpegsrc_get_fps(v4lmjpegsrc)) == 0)
return NULL;
- buf = gst_buffer_new_from_pool(v4lmjpegsrc->bufferpool, 0, 0);
- if (!buf)
- {
- gst_element_error(GST_ELEMENT(v4lmjpegsrc),
- "Failed to create a new GstBuffer");
- return NULL;
- }
-
if (v4lmjpegsrc->need_writes > 0) {
/* use last frame */
num = v4lmjpegsrc->last_frame;
@@ -559,8 +534,10 @@ gst_v4lmjpegsrc_get (GstPad *pad)
v4lmjpegsrc->use_num_times[num] = 1;
}
+ buf = gst_buffer_new ();
GST_BUFFER_DATA(buf) = gst_v4lmjpegsrc_get_buffer(v4lmjpegsrc, num);
GST_BUFFER_SIZE(buf) = v4lmjpegsrc->last_size;
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_READONLY);
if (v4lmjpegsrc->use_fixed_fps)
GST_BUFFER_TIMESTAMP(buf) = v4lmjpegsrc->handled * GST_SECOND / fps;
else /* calculate time based on our own clock */
@@ -743,6 +720,7 @@ gst_v4lmjpegsrc_set_clock (GstElement *element,
}
+#if 0
static GstBuffer*
gst_v4lmjpegsrc_buffer_new (GstBufferPool *pool,
guint64 offset,
@@ -765,8 +743,9 @@ gst_v4lmjpegsrc_buffer_new (GstBufferPool *pool,
return buffer;
}
+#endif
-
+#if 0
static void
gst_v4lmjpegsrc_buffer_free (GstBufferPool *pool, GstBuffer *buf, gpointer user_data)
{
@@ -793,3 +772,4 @@ gst_v4lmjpegsrc_buffer_free (GstBufferPool *pool, GstBuffer *buf, gpointer user_
/* free the buffer struct et all */
gst_buffer_default_free(buf);
}
+#endif
diff --git a/sys/v4l/gstv4lmjpegsrc.h b/sys/v4l/gstv4lmjpegsrc.h
index db2c37d24..923a007c8 100644
--- a/sys/v4l/gstv4lmjpegsrc.h
+++ b/sys/v4l/gstv4lmjpegsrc.h
@@ -46,9 +46,6 @@ struct _GstV4lMjpegSrc {
/* pads */
GstPad *srcpad;
- /* the bufferpool */
- GstBufferPool *bufferpool;
-
/* buffer/capture info */
struct mjpeg_sync bsync;
struct mjpeg_requestbuffers breq;
diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c
index 0128f3b71..2af0247d4 100644
--- a/sys/v4l/gstv4lsrc.c
+++ b/sys/v4l/gstv4lsrc.c
@@ -81,15 +81,6 @@ static void gst_v4lsrc_get_property (GObject *object,
/* state handling */
static GstElementStateReturn gst_v4lsrc_change_state (GstElement *element);
-/* bufferpool functions */
-static GstBuffer* gst_v4lsrc_buffer_new (GstBufferPool *pool,
- guint64 offset,
- guint size,
- gpointer user_data);
-static void gst_v4lsrc_buffer_free (GstBufferPool *pool,
- GstBuffer *buf,
- gpointer user_data);
-
/* set_clock function for a/V sync */
static void gst_v4lsrc_set_clock (GstElement *element,
GstClock *clock);
@@ -200,14 +191,6 @@ gst_v4lsrc_init (GstV4lSrc *v4lsrc)
gst_pad_set_link_function (v4lsrc->srcpad, gst_v4lsrc_srcconnect);
gst_pad_set_convert_function (v4lsrc->srcpad, gst_v4lsrc_srcconvert);
- v4lsrc->bufferpool = gst_buffer_pool_new(
- NULL,
- NULL,
- (GstBufferPoolBufferNewFunction)gst_v4lsrc_buffer_new,
- NULL,
- (GstBufferPoolBufferFreeFunction)gst_v4lsrc_buffer_free,
- v4lsrc);
-
v4lsrc->buffer_size = 0;
/* no clock */
@@ -549,14 +532,6 @@ gst_v4lsrc_get (GstPad *pad)
(fps = gst_v4lsrc_get_fps(v4lsrc)) == 0)
return NULL;
- buf = gst_buffer_new_from_pool(v4lsrc->bufferpool, 0, 0);
- if (!buf)
- {
- gst_element_error(GST_ELEMENT(v4lsrc),
- "Failed to create a new GstBuffer");
- return NULL;
- }
-
if (v4lsrc->need_writes > 0) {
/* use last frame */
num = v4lsrc->last_frame;
@@ -614,6 +589,8 @@ gst_v4lsrc_get (GstPad *pad)
v4lsrc->use_num_times[num] = 1;
}
+ buf = gst_buffer_new ();
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_READONLY);
GST_BUFFER_DATA(buf) = gst_v4lsrc_get_buffer(v4lsrc, num);
GST_BUFFER_SIZE(buf) = v4lsrc->buffer_size;
if (v4lsrc->use_fixed_fps)
@@ -740,6 +717,7 @@ gst_v4lsrc_change_state (GstElement *element)
}
+#if 0
static GstBuffer*
gst_v4lsrc_buffer_new (GstBufferPool *pool,
guint64 offset,
@@ -763,8 +741,9 @@ gst_v4lsrc_buffer_new (GstBufferPool *pool,
return buffer;
}
+#endif
-
+#if 0
static void
gst_v4lsrc_buffer_free (GstBufferPool *pool, GstBuffer *buf, gpointer user_data)
{
@@ -791,6 +770,7 @@ gst_v4lsrc_buffer_free (GstBufferPool *pool, GstBuffer *buf, gpointer user_data)
/* free struct */
gst_buffer_default_free(buf);
}
+#endif
static void
diff --git a/sys/v4l/gstv4lsrc.h b/sys/v4l/gstv4lsrc.h
index 91e01a7c6..cc96206b3 100644
--- a/sys/v4l/gstv4lsrc.h
+++ b/sys/v4l/gstv4lsrc.h
@@ -44,9 +44,6 @@ struct _GstV4lSrc {
/* pads */
GstPad *srcpad;
- /* bufferpool for the buffers we're gonna use */
- GstBufferPool *bufferpool;
-
/* capture/buffer info */
struct video_mmap mmap;
struct video_mbuf mbuf;
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index e191cd742..81b8b7e8b 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -654,12 +654,14 @@ gst_ximagesink_chain (GstPad *pad, GstData *_data)
gst_clock_id_free (id);
}
+#if 0
/* If we have a pool and the image is from this pool, simply put it. */
if ( (ximagesink->bufferpool) &&
(GST_BUFFER_BUFFERPOOL (buf) == ximagesink->bufferpool) )
gst_ximagesink_ximage_put (ximagesink, GST_BUFFER_POOL_PRIVATE (buf));
else /* Else we have to copy the data into our private image, */
{ /* if we have one... */
+#endif
if (ximagesink->ximage)
{
memcpy (ximagesink->ximage->ximage->data,
@@ -673,13 +675,16 @@ gst_ximagesink_chain (GstPad *pad, GstData *_data)
gst_element_error (GST_ELEMENT (ximagesink), "no image to draw");
return;
}
+#if 0
}
+#endif
gst_buffer_unref (buf);
gst_ximagesink_handle_xevents (ximagesink, pad);
}
+#if 0
static GstBuffer*
gst_ximagesink_buffer_new (GstBufferPool *pool,
gint64 location, guint size, gpointer user_data)
@@ -761,6 +766,7 @@ gst_ximagesink_buffer_free (GstBufferPool *pool,
gst_buffer_default_free (buffer);
}
+#endif
static void
gst_ximagesink_imagepool_clear (GstXImageSink *ximagesink)
@@ -778,30 +784,6 @@ gst_ximagesink_imagepool_clear (GstXImageSink *ximagesink)
g_mutex_unlock(ximagesink->pool_lock);
}
-static GstBufferPool*
-gst_ximagesink_get_bufferpool (GstPad *pad)
-{
- GstXImageSink *ximagesink;
-
- ximagesink = GST_XIMAGESINK (gst_pad_get_parent (pad));
-
- if (!ximagesink->bufferpool) {
- ximagesink->bufferpool = gst_buffer_pool_new (
- NULL, /* free */
- NULL, /* copy */
- (GstBufferPoolBufferNewFunction) gst_ximagesink_buffer_new,
- NULL, /* buffer copy, the default is fine */
- (GstBufferPoolBufferFreeFunction) gst_ximagesink_buffer_free,
- ximagesink);
-
- ximagesink->image_pool = NULL;
- }
-
- gst_buffer_pool_ref (ximagesink->bufferpool);
-
- return ximagesink->bufferpool;
-}
-
/* Interfaces stuff */
static gboolean
@@ -942,9 +924,6 @@ gst_ximagesink_dispose (GObject *object)
g_mutex_free (ximagesink->x_lock);
g_mutex_free (ximagesink->pool_lock);
- if (ximagesink->bufferpool)
- gst_buffer_pool_free (ximagesink->bufferpool);
-
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -964,8 +943,6 @@ gst_ximagesink_init (GstXImageSink *ximagesink)
gst_ximagesink_sinkconnect);
gst_pad_set_getcaps_function (GST_VIDEOSINK_PAD (ximagesink),
gst_ximagesink_getcaps);
- gst_pad_set_bufferpool_function (GST_VIDEOSINK_PAD (ximagesink),
- gst_ximagesink_get_bufferpool);
ximagesink->xcontext = NULL;
ximagesink->xwindow = NULL;
diff --git a/sys/ximage/ximagesink.h b/sys/ximage/ximagesink.h
index b7d4e0301..31a22ef3b 100644
--- a/sys/ximage/ximagesink.h
+++ b/sys/ximage/ximagesink.h
@@ -113,7 +113,6 @@ struct _GstXImageSink {
/* Unused */
gint pixel_width, pixel_height;
- GstBufferPool *bufferpool;
GMutex *pool_lock;
GSList *image_pool;
};
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index a32e008be..565de1ccd 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -797,12 +797,14 @@ gst_xvimagesink_chain (GstPad *pad, GstData *data)
gst_clock_id_free (id);
}
+#if 0
/* If we have a pool and the image is from this pool, simply put it. */
if ( (xvimagesink->bufferpool) &&
(GST_BUFFER_BUFFERPOOL (buf) == xvimagesink->bufferpool) )
gst_xvimagesink_xvimage_put (xvimagesink, GST_BUFFER_POOL_PRIVATE (buf));
else /* Else we have to copy the data into our private image, */
{ /* if we have one... */
+#endif
if (xvimagesink->xvimage)
{
memcpy (xvimagesink->xvimage->xvimage->data,
@@ -816,7 +818,9 @@ gst_xvimagesink_chain (GstPad *pad, GstData *data)
gst_element_error (GST_ELEMENT (xvimagesink), "no image to draw");
return;
}
+#if 0
}
+#endif
/* set correct time for next buffer */
if (!GST_BUFFER_TIMESTAMP_IS_VALID (buf) && xvimagesink->framerate > 0) {
xvimagesink->time += GST_SECOND / xvimagesink->framerate;
@@ -827,6 +831,7 @@ gst_xvimagesink_chain (GstPad *pad, GstData *data)
gst_xvimagesink_handle_xevents (xvimagesink, pad);
}
+#if 0
static GstBuffer*
gst_xvimagesink_buffer_new (GstBufferPool *pool,
gint64 location, guint size, gpointer user_data)
@@ -909,6 +914,7 @@ gst_xvimagesink_buffer_free (GstBufferPool *pool,
gst_buffer_default_free (buffer);
}
+#endif
static void
gst_xvimagesink_imagepool_clear (GstXvImageSink *xvimagesink)
@@ -926,30 +932,6 @@ gst_xvimagesink_imagepool_clear (GstXvImageSink *xvimagesink)
g_mutex_unlock(xvimagesink->pool_lock);
}
-static GstBufferPool*
-gst_xvimagesink_get_bufferpool (GstPad *pad)
-{
- GstXvImageSink *xvimagesink;
-
- xvimagesink = GST_XVIMAGESINK (gst_pad_get_parent (pad));
-
- if (!xvimagesink->bufferpool) {
- xvimagesink->bufferpool = gst_buffer_pool_new (
- NULL, /* free */
- NULL, /* copy */
- (GstBufferPoolBufferNewFunction) gst_xvimagesink_buffer_new,
- NULL, /* buffer copy, the default is fine */
- (GstBufferPoolBufferFreeFunction) gst_xvimagesink_buffer_free,
- xvimagesink);
-
- xvimagesink->image_pool = NULL;
- }
-
- gst_buffer_pool_ref (xvimagesink->bufferpool);
-
- return xvimagesink->bufferpool;
-}
-
/* Interfaces stuff */
static gboolean
@@ -1083,9 +1065,6 @@ gst_xvimagesink_dispose (GObject *object)
g_mutex_free (xvimagesink->x_lock);
g_mutex_free (xvimagesink->pool_lock);
- if (xvimagesink->bufferpool)
- gst_buffer_pool_free (xvimagesink->bufferpool);
-
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -1105,8 +1084,6 @@ gst_xvimagesink_init (GstXvImageSink *xvimagesink)
gst_xvimagesink_sinkconnect);
gst_pad_set_getcaps_function (GST_VIDEOSINK_PAD (xvimagesink),
gst_xvimagesink_getcaps);
- gst_pad_set_bufferpool_function (GST_VIDEOSINK_PAD (xvimagesink),
- gst_xvimagesink_get_bufferpool);
xvimagesink->xcontext = NULL;
xvimagesink->xwindow = NULL;
diff --git a/sys/xvimage/xvimagesink.h b/sys/xvimage/xvimagesink.h
index 70fdadde3..bac1bedb5 100644
--- a/sys/xvimage/xvimagesink.h
+++ b/sys/xvimage/xvimagesink.h
@@ -130,7 +130,6 @@ struct _GstXvImageSink {
GstClockTime time;
- GstBufferPool *bufferpool;
GMutex *pool_lock;
GSList *image_pool;
};