From: Wim Taymans Date: Mon, 20 Jun 2011 11:30:07 +0000 (+0200) Subject: theoradec: enable video metadata in the bufferpool X-Git-Tag: 1.19.3~511^2~7466 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0530b609aafcf7672ff1a8531efa845bfab9456b;p=platform%2Fupstream%2Fgstreamer.git theoradec: enable video metadata in the bufferpool Enable the video metadata in the bufferpool. --- diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c index 6d8980f..198fbdd 100644 --- a/ext/theora/gsttheoradec.c +++ b/ext/theora/gsttheoradec.c @@ -44,6 +44,7 @@ #include "gsttheoradec.h" #include #include +#include #define GST_CAT_DEFAULT theoradec_debug GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); @@ -795,6 +796,7 @@ theora_negotiate_pool (GstTheoraDec * dec, GstCaps * caps, GstVideoInfo * info) GstQuery *query; GstBufferPool *pool = NULL; guint size, min, max, prefix, alignment; + GstStructure *config; /* find a pool for the negotiated caps now */ query = gst_query_new_allocation (caps, TRUE); @@ -813,23 +815,23 @@ theora_negotiate_pool (GstTheoraDec * dec, GstCaps * caps, GstVideoInfo * info) } if (pool == NULL) { - GstStructure *config; - /* we did not get a pool, make one ourselves then */ pool = gst_buffer_pool_new (); - - config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set (config, caps, size, min, max, prefix, - alignment); - gst_buffer_pool_set_config (pool, config); } if (dec->pool) gst_object_unref (dec->pool); dec->pool = pool; - /* FIXME, we can check if downstream supports clipping and/or video - * metadata. */ + config = gst_buffer_pool_get_config (pool); + gst_buffer_pool_config_set (config, caps, size, min, max, prefix, alignment); + /* just set the metadata, if the pool can support it we will transparently use + * it through the video info API. We could also see if the pool support this + * metadata and only activate it then. */ + gst_buffer_pool_config_add_meta (config, GST_META_API_VIDEO); + /* FIXME, we can check if downstream supports clipping metadata */ + + gst_buffer_pool_set_config (pool, config); /* and activate */ gst_buffer_pool_set_active (pool, TRUE);