From e993bde87350880be7cb9ceb2de1a188c46dd7e0 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 3 Mar 2011 18:39:38 +0100 Subject: [PATCH] ximagesink: implement buffer_alloc from the pool Use the bufferpool for pad_alloc when we are asked for the same caps as the bufferpool. --- sys/ximage/ximagepool.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/ximage/ximagepool.c b/sys/ximage/ximagepool.c index e31ed88..ca359db 100644 --- a/sys/ximage/ximagepool.c +++ b/sys/ximage/ximagepool.c @@ -420,6 +420,8 @@ ximage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config) !gst_structure_get_int (structure, "height", &height)) goto wrong_caps; + GST_LOG_OBJECT (pool, "%dx%d, caps %" GST_PTR_FORMAT, width, height, caps); + /* keep track of the width and height and caps */ if (priv->caps) gst_caps_unref (priv->caps); @@ -489,6 +491,8 @@ gst_ximage_buffer_pool_new (GstXImageSink * ximagesink) pool = g_object_new (GST_TYPE_XIMAGE_BUFFER_POOL, NULL); pool->sink = gst_object_ref (ximagesink); + GST_LOG_OBJECT (pool, "new XImage buffer pool %p", pool); + return GST_BUFFER_POOL_CAST (pool); } @@ -519,7 +523,7 @@ gst_ximage_buffer_pool_finalize (GObject * object) GstXImageBufferPool *pool = GST_XIMAGE_BUFFER_POOL_CAST (object); GstXImageBufferPoolPrivate *priv = pool->priv; - GST_LOG_OBJECT (pool->sink, "finalize XImage buffer pool"); + GST_LOG_OBJECT (pool, "finalize XImage buffer pool %p", pool); if (priv->caps) gst_caps_unref (priv->caps); -- 2.7.4