From b1ef7e8a862212f79f31161d5b5c560b232b9733 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 31 Oct 2011 02:24:04 +0100 Subject: [PATCH] update for meta api change --- gst/effectv/gstwarp.c | 4 ++-- gst/rtp/gstrtpvrawdepay.c | 2 +- gst/rtp/gstrtpvrawdepay.h | 2 +- sys/v4l2/gstv4l2bufferpool.c | 30 +++++++++++++++--------------- sys/v4l2/gstv4l2bufferpool.h | 10 +++++----- sys/v4l2/gstv4l2sink.c | 6 +++--- sys/v4l2/gstv4l2src.c | 6 +++--- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/gst/effectv/gstwarp.c b/gst/effectv/gstwarp.c index 72a45c0..c4d7a73 100644 --- a/gst/effectv/gstwarp.c +++ b/gst/effectv/gstwarp.c @@ -54,7 +54,7 @@ #include #include "gstwarp.h" -#include +#include #include #ifndef M_PI @@ -256,7 +256,7 @@ gst_wraptv_decide_allocation (GstBaseTransform * trans, GstQuery * query) config = gst_buffer_pool_get_config (pool); gst_buffer_pool_config_add_option (config, - GST_BUFFER_POOL_OPTION_META_VIDEO); + GST_BUFFER_POOL_OPTION_VIDEO_META); gst_buffer_pool_set_config (pool, config); } return TRUE; diff --git a/gst/rtp/gstrtpvrawdepay.c b/gst/rtp/gstrtpvrawdepay.c index e32f450..aff0a1b 100644 --- a/gst/rtp/gstrtpvrawdepay.c +++ b/gst/rtp/gstrtpvrawdepay.c @@ -151,7 +151,7 @@ gst_rtp_vraw_depay_negotiate_pool (GstRtpVRawDepay * depay, GstCaps * caps, /* 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_option (config, GST_BUFFER_POOL_OPTION_META_VIDEO); + gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META); gst_buffer_pool_set_config (pool, config); /* and activate */ diff --git a/gst/rtp/gstrtpvrawdepay.h b/gst/rtp/gstrtpvrawdepay.h index 46d3695..899c9fd 100644 --- a/gst/rtp/gstrtpvrawdepay.h +++ b/gst/rtp/gstrtpvrawdepay.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index b38541d..7b2ee76 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -31,7 +31,7 @@ #include #include "gst/video/video.h" -#include "gst/video/gstmetavideo.h" +#include "gst/video/gstvideometa.h" #include "gst/video/gstvideopool.h" #include @@ -57,14 +57,14 @@ GST_DEBUG_CATEGORY_EXTERN (v4l2_debug); * GstV4l2Buffer: */ const GstMetaInfo * -gst_meta_v4l2_get_info (void) +gst_v4l2_meta_get_info (void) { static const GstMetaInfo *meta_info = NULL; if (meta_info == NULL) { meta_info = - gst_meta_register ("GstMetaV4l2", "GstMetaV4l2", - sizeof (GstMetaV4l2), (GstMetaInitFunction) NULL, + gst_meta_register ("GstV4l2Meta", "GstV4l2Meta", + sizeof (GstV4l2Meta), (GstMetaInitFunction) NULL, (GstMetaFreeFunction) NULL, (GstMetaCopyFunction) NULL, (GstMetaTransformFunction) NULL); } @@ -93,10 +93,10 @@ gst_v4l2_buffer_pool_free_buffer (GstBufferPool * bpool, GstBuffer * buffer) break; case GST_V4L2_IO_MMAP: { - GstMetaV4l2 *meta; + GstV4l2Meta *meta; gint index; - meta = GST_META_V4L2_GET (buffer); + meta = GST_V4L2_META_GET (buffer); g_assert (meta != NULL); index = meta->vbuffer.index; @@ -122,7 +122,7 @@ gst_v4l2_buffer_pool_alloc_buffer (GstBufferPool * bpool, GstBuffer ** buffer, { GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL (bpool); GstBuffer *newbuf; - GstMetaV4l2 *meta; + GstV4l2Meta *meta; GstV4l2Object *obj; GstVideoInfo *info; guint index; @@ -140,7 +140,7 @@ gst_v4l2_buffer_pool_alloc_buffer (GstBufferPool * bpool, GstBuffer ** buffer, case GST_V4L2_IO_MMAP: { newbuf = gst_buffer_new (); - meta = GST_META_V4L2_ADD (newbuf); + meta = GST_V4L2_META_ADD (newbuf); index = pool->num_allocated; @@ -183,7 +183,7 @@ gst_v4l2_buffer_pool_alloc_buffer (GstBufferPool * bpool, GstBuffer ** buffer, stride[0] = obj->bytesperline; GST_DEBUG_OBJECT (pool, "adding video meta, stride %d", stride[0]); - gst_buffer_add_meta_video_full (newbuf, info->flags, + gst_buffer_add_video_meta_full (newbuf, info->flags, GST_VIDEO_INFO_FORMAT (info), GST_VIDEO_INFO_WIDTH (info), GST_VIDEO_INFO_HEIGHT (info), GST_VIDEO_INFO_N_PLANES (info), offset, stride); @@ -236,7 +236,7 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config) pool->add_videometa = gst_buffer_pool_config_has_option (config, - GST_BUFFER_POOL_OPTION_META_VIDEO); + GST_BUFFER_POOL_OPTION_VIDEO_META); if (!pool->add_videometa) { gint stride; @@ -513,10 +513,10 @@ select_error: static GstFlowReturn gst_v4l2_buffer_pool_qbuf (GstV4l2BufferPool * pool, GstBuffer * buf) { - GstMetaV4l2 *meta; + GstV4l2Meta *meta; gint index; - meta = GST_META_V4L2_GET (buf); + meta = GST_V4L2_META_GET (buf); g_assert (meta != NULL); index = meta->vbuffer.index; @@ -779,9 +779,9 @@ gst_v4l2_buffer_pool_release_buffer (GstBufferPool * bpool, GstBuffer * buffer) case GST_V4L2_IO_MMAP: { - GstMetaV4l2 *meta; + GstV4l2Meta *meta; - meta = GST_META_V4L2_GET (buffer); + meta = GST_V4L2_META_GET (buffer); g_assert (meta != NULL); if (pool->buffers[meta->vbuffer.index] == NULL) { @@ -1024,7 +1024,7 @@ gst_v4l2_buffer_pool_process (GstV4l2BufferPool * pool, GstBuffer * buf) config = gst_buffer_pool_get_config (bpool); gst_buffer_pool_config_add_option (config, - GST_BUFFER_POOL_OPTION_META_VIDEO); + GST_BUFFER_POOL_OPTION_VIDEO_META); gst_buffer_pool_set_config (bpool, config); if (!gst_buffer_pool_set_active (bpool, TRUE)) diff --git a/sys/v4l2/gstv4l2bufferpool.h b/sys/v4l2/gstv4l2bufferpool.h index 17e04e3..12d3ccc 100644 --- a/sys/v4l2/gstv4l2bufferpool.h +++ b/sys/v4l2/gstv4l2bufferpool.h @@ -29,7 +29,7 @@ typedef struct _GstV4l2BufferPool GstV4l2BufferPool; typedef struct _GstV4l2BufferPoolClass GstV4l2BufferPoolClass; -typedef struct _GstMetaV4l2 GstMetaV4l2; +typedef struct _GstV4l2Meta GstV4l2Meta; #include "gstv4l2object.h" //#include "v4l2_calls.h" @@ -72,16 +72,16 @@ struct _GstV4l2BufferPoolClass GstBufferPoolClass parent_class; }; -struct _GstMetaV4l2 { +struct _GstV4l2Meta { GstMeta meta; gpointer mem; struct v4l2_buffer vbuffer; }; -const GstMetaInfo * gst_meta_v4l2_get_info (void); -#define GST_META_V4L2_GET(buf) ((GstMetaV4l2 *)gst_buffer_get_meta(buf,gst_meta_v4l2_get_info())) -#define GST_META_V4L2_ADD(buf) ((GstMetaV4l2 *)gst_buffer_add_meta(buf,gst_meta_v4l2_get_info(),NULL)) +const GstMetaInfo * gst_v4l2_meta_get_info (void); +#define GST_V4L2_META_GET(buf) ((GstV4l2Meta *)gst_buffer_get_meta(buf,gst_v4l2_meta_get_info())) +#define GST_V4L2_META_ADD(buf) ((GstV4l2Meta *)gst_buffer_add_meta(buf,gst_v4l2_meta_get_info(),NULL)) GType gst_v4l2_buffer_pool_get_type (void); diff --git a/sys/v4l2/gstv4l2sink.c b/sys/v4l2/gstv4l2sink.c index 5ad4a18..e80f5b9 100644 --- a/sys/v4l2/gstv4l2sink.c +++ b/sys/v4l2/gstv4l2sink.c @@ -53,7 +53,7 @@ #include #endif -#include "gst/video/gstmetavideo.h" +#include "gst/video/gstvideometa.h" #include "gstv4l2colorbalance.h" #include "gstv4l2tuner.h" @@ -656,8 +656,8 @@ gst_v4l2sink_propose_allocation (GstBaseSink * bsink, GstQuery * query) gst_query_set_allocation_params (query, size, 2, 0, 0, 0, pool); /* we also support various metadata */ - gst_query_add_allocation_meta (query, GST_META_API_VIDEO); - gst_query_add_allocation_meta (query, GST_META_API_VIDEO_CROP); + gst_query_add_allocation_meta (query, GST_VIDEO_META_API); + gst_query_add_allocation_meta (query, GST_VIDEO_CROP_META_API); if (pool) gst_object_unref (pool); diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 4e01c62..9775ab9 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -50,7 +50,7 @@ #include #include -#include "gst/video/gstmetavideo.h" +#include "gst/video/gstvideometa.h" #include "gst/video/gstvideopool.h" #include "gstv4l2src.h" @@ -573,9 +573,9 @@ gst_v4l2src_decide_allocation (GstBaseSrc * bsrc, GstQuery * query) alignment); /* if downstream supports video metadata, add this to the pool config */ - if (gst_query_has_allocation_meta (query, GST_META_API_VIDEO)) + if (gst_query_has_allocation_meta (query, GST_VIDEO_META_API)) gst_buffer_pool_config_add_option (config, - GST_BUFFER_POOL_OPTION_META_VIDEO); + GST_BUFFER_POOL_OPTION_VIDEO_META); gst_buffer_pool_set_config (pool, config); } -- 2.7.4