v4l: change for new API

This commit is contained in:
Wim Taymans 2011-07-29 17:21:03 +02:00
parent ab62599832
commit 752a6778b2
2 changed files with 6 additions and 2 deletions

View file

@ -32,6 +32,7 @@
#include "gst/video/video.h"
#include "gst/video/gstmetavideo.h"
#include "gst/video/gstvideopool.h"
#include <gstv4l2bufferpool.h>
@ -234,7 +235,8 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config)
GST_DEBUG_OBJECT (pool, "set config");
pool->add_videometa =
gst_buffer_pool_config_has_meta (config, GST_META_API_VIDEO);
gst_buffer_pool_config_has_option (config,
GST_BUFFER_POOL_OPTION_META_VIDEO);
if (!pool->add_videometa) {
gint stride;

View file

@ -51,6 +51,7 @@
#include <unistd.h>
#include "gst/video/gstmetavideo.h"
#include "gst/video/gstvideopool.h"
#include "gstv4l2src.h"
@ -584,7 +585,8 @@ gst_v4l2src_setup_allocation (GstBaseSrc * bsrc, GstQuery * query)
/* if downstream supports video metadata, add this to the pool config */
if (gst_query_has_allocation_meta (query, GST_META_API_VIDEO))
gst_buffer_pool_config_add_meta (config, GST_META_API_VIDEO);
gst_buffer_pool_config_add_option (config,
GST_BUFFER_POOL_OPTION_META_VIDEO);
gst_buffer_pool_set_config (pool, config);
}