diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-15 22:11:17 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-15 22:11:17 +0100 |
commit | ced47580b705a176e94bf84c2c5c85812fc66516 (patch) | |
tree | c0a88b05ad3bd531e1580abf14782644a76e9ef0 | |
parent | f3a770a20c1ab8a91548cb3bd5c33c25ef75146e (diff) |
update for bufferpool changes
-rw-r--r-- | ext/dv/gstdvdec.c | 2 | ||||
-rw-r--r-- | ext/gdk_pixbuf/gstgdkpixbuf.c | 2 | ||||
-rw-r--r-- | ext/jpeg/gstjpegdec.c | 4 | ||||
-rw-r--r-- | ext/libpng/gstpngdec.c | 2 | ||||
-rw-r--r-- | gst/goom/gstgoom.c | 2 | ||||
-rw-r--r-- | gst/goom2k1/gstgoom.c | 2 | ||||
-rw-r--r-- | gst/rtp/gstrtpvrawdepay.c | 2 | ||||
-rw-r--r-- | sys/v4l2/gstv4l2bufferpool.c | 21 | ||||
-rw-r--r-- | sys/v4l2/gstv4l2sink.c | 3 | ||||
-rw-r--r-- | sys/v4l2/gstv4l2src.c | 5 |
10 files changed, 23 insertions, 22 deletions
diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c index 71fc8afa2..9e895d7e6 100644 --- a/ext/dv/gstdvdec.c +++ b/ext/dv/gstdvdec.c @@ -286,7 +286,7 @@ gst_dvdec_negotiate_pool (GstDVDec * dec, GstCaps * caps, GstVideoInfo * info) dec->pool = pool; config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set (config, caps, size, min, max, 0, 0, 0); + gst_buffer_pool_config_set_params (config, caps, size, min, max); if (gst_query_has_allocation_meta (query, GST_VIDEO_META_API_TYPE)) { /* just set the option, if the pool can support it we will transparently use diff --git a/ext/gdk_pixbuf/gstgdkpixbuf.c b/ext/gdk_pixbuf/gstgdkpixbuf.c index 3952888f7..588e1656c 100644 --- a/ext/gdk_pixbuf/gstgdkpixbuf.c +++ b/ext/gdk_pixbuf/gstgdkpixbuf.c @@ -255,7 +255,7 @@ gst_gdk_pixbuf_setup_pool (GstGdkPixbuf * filter, GstVideoInfo * info) /* and configure */ config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set (config, target, size, min, max, 0, 0, 0); + gst_buffer_pool_config_set_params (config, target, size, min, max); gst_buffer_pool_set_config (pool, config); if (filter->pool) { diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c index b5d6f44ce..eeb44a2fe 100644 --- a/ext/jpeg/gstjpegdec.c +++ b/ext/jpeg/gstjpegdec.c @@ -1166,6 +1166,7 @@ gst_jpeg_dec_buffer_pool (GstJpegDec * dec, GstCaps * caps) GstBufferPool *pool; guint size, min, max; GstStructure *config; + static GstAllocationParams params = { 0, 0, 0, 15, }; GST_DEBUG_OBJECT (dec, "setting up bufferpool"); @@ -1193,7 +1194,8 @@ gst_jpeg_dec_buffer_pool (GstJpegDec * dec, GstCaps * caps) } config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set (config, caps, size, min, max, 0, 0, 15); + gst_buffer_pool_config_set_params (config, caps, size, min, max); + gst_buffer_pool_config_set_allocator (config, NULL, ¶ms); /* and store */ gst_buffer_pool_set_config (pool, config); diff --git a/ext/libpng/gstpngdec.c b/ext/libpng/gstpngdec.c index 7c569ed97..aae356fca 100644 --- a/ext/libpng/gstpngdec.c +++ b/ext/libpng/gstpngdec.c @@ -372,7 +372,7 @@ gst_pngdec_negotiate_pool (GstPngDec * dec, GstCaps * caps, GstVideoInfo * info) dec->pool = pool; config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set (config, caps, size, min, max, 0, 0, 0); + gst_buffer_pool_config_set_params (config, caps, size, min, max); if (gst_query_has_allocation_meta (query, GST_VIDEO_META_API_TYPE)) { /* just set the option, if the pool can support it we will transparently use diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c index 20d2445b6..caf8ce932 100644 --- a/gst/goom/gstgoom.c +++ b/gst/goom/gstgoom.c @@ -309,7 +309,7 @@ gst_goom_src_negotiate (GstGoom * goom) } config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set (config, target, size, min, max, 0, 0, 0); + gst_buffer_pool_config_set_params (config, target, size, min, max); gst_buffer_pool_set_config (pool, config); if (goom->pool) { diff --git a/gst/goom2k1/gstgoom.c b/gst/goom2k1/gstgoom.c index 8917c958f..42737d2eb 100644 --- a/gst/goom2k1/gstgoom.c +++ b/gst/goom2k1/gstgoom.c @@ -305,7 +305,7 @@ gst_goom_src_negotiate (GstGoom * goom) } config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set (config, target, size, min, max, 0, 0, 0); + gst_buffer_pool_config_set_params (config, target, size, min, max); gst_buffer_pool_set_config (pool, config); if (goom->pool) { diff --git a/gst/rtp/gstrtpvrawdepay.c b/gst/rtp/gstrtpvrawdepay.c index c19ea4d4a..1d49cd19c 100644 --- a/gst/rtp/gstrtpvrawdepay.c +++ b/gst/rtp/gstrtpvrawdepay.c @@ -148,7 +148,7 @@ gst_rtp_vraw_depay_negotiate_pool (GstRtpVRawDepay * depay, GstCaps * caps, depay->pool = pool; config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set (config, caps, size, min, max, 0, 0, 0); + gst_buffer_pool_config_set_params (config, caps, size, min, max); if (gst_query_has_allocation_meta (query, GST_VIDEO_META_API_TYPE)) { /* 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 diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index 651879268..306814717 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -244,7 +244,8 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config) GstV4l2Object *obj = pool->obj; const GstCaps *caps; guint size, min_buffers, max_buffers; - guint prefix, padding, align; + GstAllocator *allocator; + GstAllocationParams params; GST_DEBUG_OBJECT (pool, "set config"); @@ -266,8 +267,11 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config) } /* parse the config and keep around */ - if (!gst_buffer_pool_config_get (config, &caps, &size, &min_buffers, - &max_buffers, &prefix, &padding, &align)) + if (!gst_buffer_pool_config_get_params (config, &caps, &size, &min_buffers, + &max_buffers)) + goto wrong_config; + + if (!gst_buffer_pool_config_get_allocator (config, &allocator, ¶ms)) goto wrong_config; GST_DEBUG_OBJECT (pool, "config %" GST_PTR_FORMAT, config); @@ -275,13 +279,10 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config) pool->size = size; pool->max_buffers = MAX (min_buffers, max_buffers); pool->min_buffers = MIN (pool->max_buffers, min_buffers); - gst_allocation_params_init (&pool->params); - pool->params.prefix = prefix; - pool->params.padding = padding; - pool->params.align = align; + pool->params = params; - gst_buffer_pool_config_set (config, caps, size, min_buffers, - max_buffers, prefix, padding, align); + gst_buffer_pool_config_set_params (config, caps, size, min_buffers, + max_buffers); return GST_BUFFER_POOL_CLASS (parent_class)->set_config (bpool, config); @@ -890,7 +891,7 @@ gst_v4l2_buffer_pool_new (GstV4l2Object * obj, GstCaps * caps) pool->obj = obj; s = gst_buffer_pool_get_config (GST_BUFFER_POOL_CAST (pool)); - gst_buffer_pool_config_set (s, caps, obj->sizeimage, 2, 0, 0, 0, 0); + gst_buffer_pool_config_set_params (s, caps, obj->sizeimage, 2, 0); gst_buffer_pool_set_config (GST_BUFFER_POOL_CAST (pool), s); return GST_BUFFER_POOL (pool); diff --git a/sys/v4l2/gstv4l2sink.c b/sys/v4l2/gstv4l2sink.c index 4df872934..a2e2fe5d2 100644 --- a/sys/v4l2/gstv4l2sink.c +++ b/sys/v4l2/gstv4l2sink.c @@ -640,8 +640,7 @@ gst_v4l2sink_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, - NULL); + gst_buffer_pool_config_get_params (config, &pcaps, &size, NULL, NULL); GST_DEBUG_OBJECT (v4l2sink, "we had a pool with caps %" GST_PTR_FORMAT, pcaps); diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index e8f30da2d..a27ad3a71 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -576,9 +576,8 @@ gst_v4l2src_decide_allocation (GstBaseSrc * bsrc, GstQuery * query) const GstCaps *caps; config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_get (config, &caps, NULL, NULL, NULL, NULL, NULL, - NULL); - gst_buffer_pool_config_set (config, caps, size, min, max, 0, 0, 0); + gst_buffer_pool_config_get_params (config, &caps, NULL, NULL, NULL); + gst_buffer_pool_config_set_params (config, caps, size, min, max); /* if downstream supports video metadata, add this to the pool config */ if (gst_query_has_allocation_meta (query, GST_VIDEO_META_API_TYPE)) |