x11: make function static

Don't export buffer creation function, we need to use the bufferpool
now.
This commit is contained in:
Wim Taymans 2011-06-17 17:27:22 +02:00
parent 20d8d3050c
commit 0d75dc5a0b
4 changed files with 16 additions and 46 deletions

View file

@ -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;

View file

@ -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))

View file

@ -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;

View file

@ -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))