From 0d75dc5a0b1fead8ce6df76d378124936471cd21 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 17 Jun 2011 17:27:22 +0200 Subject: [PATCH] x11: make function static Don't export buffer creation function, we need to use the bufferpool now. --- sys/ximage/ximagepool.c | 26 ++++++++------------------ sys/ximage/ximagepool.h | 2 -- sys/xvimage/xvimagepool.c | 31 ++++++++----------------------- sys/xvimage/xvimagepool.h | 3 --- 4 files changed, 16 insertions(+), 46 deletions(-) diff --git a/sys/ximage/ximagepool.c b/sys/ximage/ximagepool.c index 1745034441..9e3dc63333 100644 --- a/sys/ximage/ximagepool.c +++ b/sys/ximage/ximagepool.c @@ -313,21 +313,6 @@ beach: gst_object_unref (meta->sink); } -GstBuffer * -gst_ximage_buffer_new (GstXImageSink * ximagesink, gint width, gint height) -{ - GstBuffer *buffer; - GstMetaXImage *meta; - - buffer = gst_buffer_new (); - meta = gst_buffer_add_meta_ximage (buffer, ximagesink, width, height); - if (meta == NULL) { - gst_buffer_unref (buffer); - buffer = NULL; - } - return buffer; -} - #ifdef HAVE_XSHM /* This function checks that it is actually really possible to create an image using XShm */ @@ -510,11 +495,16 @@ ximage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer, GstXImageBufferPool *xpool = GST_XIMAGE_BUFFER_POOL_CAST (pool); GstXImageBufferPoolPrivate *priv = xpool->priv; GstBuffer *ximage; + GstMetaXImage *meta; - ximage = gst_ximage_buffer_new (xpool->sink, priv->width, priv->height); - if (ximage == NULL) + ximage = gst_buffer_new (); + meta = + gst_buffer_add_meta_ximage (ximage, xpool->sink, priv->width, + priv->height); + if (meta == NULL) { + gst_buffer_unref (ximage); goto no_buffer; - + } *buffer = ximage; return GST_FLOW_OK; diff --git a/sys/ximage/ximagepool.h b/sys/ximage/ximagepool.h index 7f12bdc206..7a8df6f933 100644 --- a/sys/ximage/ximagepool.h +++ b/sys/ximage/ximagepool.h @@ -81,8 +81,6 @@ struct _GstMetaXImage size_t size; }; -GstBuffer * gst_ximage_buffer_new (GstXImageSink *ximagesink, gint width, gint height); - /* buffer pool functions */ #define GST_TYPE_XIMAGE_BUFFER_POOL (gst_ximage_buffer_pool_get_type()) #define GST_IS_XIMAGE_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_XIMAGE_BUFFER_POOL)) diff --git a/sys/xvimage/xvimagepool.c b/sys/xvimage/xvimagepool.c index ac87c3884c..4b2f1ec8ca 100644 --- a/sys/xvimage/xvimagepool.c +++ b/sys/xvimage/xvimagepool.c @@ -346,24 +346,6 @@ beach: gst_object_unref (meta->sink); } -GstBuffer * -gst_xvimage_buffer_new (GstXvImageSink * xvimagesink, gint width, gint height, - gint im_format) -{ - GstBuffer *buffer; - GstMetaXvImage *meta; - - buffer = gst_buffer_new (); - meta = - gst_buffer_add_meta_xvimage (buffer, xvimagesink, width, height, - im_format); - if (meta == NULL) { - gst_buffer_unref (buffer); - buffer = NULL; - } - return buffer; -} - #ifdef HAVE_XSHM /* This function checks that it is actually really possible to create an image using XShm */ @@ -557,13 +539,16 @@ xvimage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer, GstXvImageBufferPool *xvpool = GST_XVIMAGE_BUFFER_POOL_CAST (pool); GstXvImageBufferPoolPrivate *priv = xvpool->priv; GstBuffer *xvimage; + GstMetaXvImage *meta; - xvimage = - gst_xvimage_buffer_new (xvpool->sink, priv->width, priv->height, - priv->im_format); - if (xvimage == NULL) + xvimage = gst_buffer_new (); + meta = + gst_buffer_add_meta_xvimage (xvimage, xvpool->sink, priv->width, + priv->height, priv->im_format); + if (meta == NULL) { + gst_buffer_unref (xvimage); goto no_buffer; - + } *buffer = xvimage; return GST_FLOW_OK; diff --git a/sys/xvimage/xvimagepool.h b/sys/xvimage/xvimagepool.h index d927251f6f..465c41befb 100644 --- a/sys/xvimage/xvimagepool.h +++ b/sys/xvimage/xvimagepool.h @@ -82,9 +82,6 @@ struct _GstMetaXvImage size_t size; }; -GstBuffer *gst_xvimage_buffer_new (GstXvImageSink *xvimagesink, gint width, gint height, - gint in_format); - /* buffer pool functions */ #define GST_TYPE_XVIMAGE_BUFFER_POOL (gst_xvimage_buffer_pool_get_type()) #define GST_IS_XVIMAGE_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_XVIMAGE_BUFFER_POOL))