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 */
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;
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))
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 */
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;
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))