diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-14 19:52:03 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-14 19:56:51 +0100 |
commit | 39d78762b9a59e035bf6777d4fb7ec62f9154d2b (patch) | |
tree | a1577fdac579bca371be08cab47d985ec346111d /sys | |
parent | 090a8b22737bf20f8b824e2292d8c52614b0538e (diff) |
take padding into account
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ximage/ximagepool.c | 3 | ||||
-rw-r--r-- | sys/ximage/ximagesink.c | 14 | ||||
-rw-r--r-- | sys/xvimage/xvimagepool.c | 3 | ||||
-rw-r--r-- | sys/xvimage/xvimagesink.c | 12 |
4 files changed, 21 insertions, 11 deletions
diff --git a/sys/ximage/ximagepool.c b/sys/ximage/ximagepool.c index 02c47a5f3..4c3f5937f 100644 --- a/sys/ximage/ximagepool.c +++ b/sys/ximage/ximagepool.c @@ -483,7 +483,8 @@ ximage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config) GstVideoInfo info; const GstCaps *caps; - if (!gst_buffer_pool_config_get (config, &caps, NULL, NULL, NULL, NULL, NULL)) + if (!gst_buffer_pool_config_get (config, &caps, NULL, NULL, NULL, NULL, NULL, + NULL)) goto wrong_config; if (caps == NULL) diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 916cd45ff..305169bd4 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -1148,12 +1148,16 @@ gst_ximagesink_setcaps (GstBaseSink * bsink, GstCaps * caps) newpool = gst_ximage_buffer_pool_new (ximagesink); structure = gst_buffer_pool_get_config (newpool); - gst_buffer_pool_config_set (structure, caps, size, 2, 0, 0, 15); + gst_buffer_pool_config_set (structure, caps, size, 2, 0, 0, 0, 15); if (!gst_buffer_pool_set_config (newpool, structure)) goto config_failed; oldpool = ximagesink->pool; + /* we don't activate the pool yet, this will be done by downstream after it + * has configured the pool. If downstream does not want our pool we will + * activate it when we render into it */ ximagesink->pool = newpool; + g_mutex_unlock (ximagesink->flow_lock); /* unref the old sink */ if (oldpool) { @@ -1161,7 +1165,6 @@ gst_ximagesink_setcaps (GstBaseSink * bsink, GstCaps * caps) * deactivated when the last ref is gone */ gst_object_unref (oldpool); } - g_mutex_unlock (ximagesink->flow_lock); return TRUE; @@ -1439,7 +1442,8 @@ gst_ximagesink_propose_allocation (GstBaseSink * bsink, GstQuery * query) /* we had a pool, check caps */ config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_get (config, &pcaps, &size, NULL, NULL, NULL, NULL); + gst_buffer_pool_config_get (config, &pcaps, &size, NULL, NULL, NULL, NULL, + NULL); GST_DEBUG_OBJECT (ximagesink, "we had a pool with caps %" GST_PTR_FORMAT, pcaps); @@ -1463,12 +1467,12 @@ gst_ximagesink_propose_allocation (GstBaseSink * bsink, GstQuery * query) size = info.size; config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set (config, caps, size, 0, 0, 0, 0); + gst_buffer_pool_config_set (config, caps, size, 0, 0, 0, 0, 0); if (!gst_buffer_pool_set_config (pool, config)) goto config_failed; } /* we need at least 2 buffer because we hold on to the last one */ - gst_query_set_allocation_params (query, size, 2, 0, 0, 0, pool); + gst_query_set_allocation_params (query, size, 2, 0, 0, 0, 0, pool); /* we also support various metadata */ gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE); diff --git a/sys/xvimage/xvimagepool.c b/sys/xvimage/xvimagepool.c index ad2a51d8f..eac9f2314 100644 --- a/sys/xvimage/xvimagepool.c +++ b/sys/xvimage/xvimagepool.c @@ -519,7 +519,8 @@ xvimage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config) GstVideoInfo info; const GstCaps *caps; - if (!gst_buffer_pool_config_get (config, &caps, NULL, NULL, NULL, NULL, NULL)) + if (!gst_buffer_pool_config_get (config, &caps, NULL, NULL, NULL, NULL, NULL, + NULL)) goto wrong_config; if (caps == NULL) diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 93d62d613..24609735d 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -1656,11 +1656,14 @@ gst_xvimagesink_setcaps (GstBaseSink * bsink, GstCaps * caps) newpool = gst_xvimage_buffer_pool_new (xvimagesink); structure = gst_buffer_pool_get_config (newpool); - gst_buffer_pool_config_set (structure, caps, size, 2, 0, 0, 15); + gst_buffer_pool_config_set (structure, caps, size, 2, 0, 0, 0, 15); if (!gst_buffer_pool_set_config (newpool, structure)) goto config_failed; oldpool = xvimagesink->pool; + /* we don't activate the pool yet, this will be done by downstream after it + * has configured the pool. If downstream does not want our pool we will + * activate it when we render into it */ xvimagesink->pool = newpool; g_mutex_unlock (xvimagesink->flow_lock); @@ -1954,7 +1957,8 @@ gst_xvimagesink_propose_allocation (GstBaseSink * bsink, GstQuery * query) /* we had a pool, check caps */ GST_DEBUG_OBJECT (xvimagesink, "check existing pool caps"); config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_get (config, &pcaps, &size, NULL, NULL, NULL, NULL); + gst_buffer_pool_config_get (config, &pcaps, &size, NULL, NULL, NULL, NULL, + NULL); if (!gst_caps_is_equal (caps, pcaps)) { GST_DEBUG_OBJECT (xvimagesink, "pool has different caps"); @@ -1977,12 +1981,12 @@ gst_xvimagesink_propose_allocation (GstBaseSink * bsink, GstQuery * query) size = info.size; config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set (config, caps, size, 0, 0, 0, 0); + gst_buffer_pool_config_set (config, caps, size, 0, 0, 0, 0, 0); if (!gst_buffer_pool_set_config (pool, config)) goto config_failed; } /* we need at least 2 buffer because we hold on to the last one */ - gst_query_set_allocation_params (query, size, 2, 0, 0, 0, pool); + gst_query_set_allocation_params (query, size, 2, 0, 0, 0, 0, pool); /* we also support various metadata */ gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE); |