update for meta api change

This commit is contained in:
Wim Taymans 2011-10-31 02:24:04 +01:00
parent 0560ab53c0
commit b1ef7e8a86
7 changed files with 30 additions and 30 deletions

View file

@ -54,7 +54,7 @@
#include <math.h>
#include "gstwarp.h"
#include <gst/video/gstmetavideo.h>
#include <gst/video/gstvideometa.h>
#include <gst/video/gstvideopool.h>
#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;

View file

@ -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 */

View file

@ -22,7 +22,7 @@
#include <gst/gst.h>
#include <gst/video/video.h>
#include <gst/video/gstmetavideo.h>
#include <gst/video/gstvideometa.h>
#include <gst/video/gstvideopool.h>
#include <gst/rtp/gstbasertpdepayload.h>

View file

@ -31,7 +31,7 @@
#include <unistd.h>
#include "gst/video/video.h"
#include "gst/video/gstmetavideo.h"
#include "gst/video/gstvideometa.h"
#include "gst/video/gstvideopool.h"
#include <gstv4l2bufferpool.h>
@ -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))

View file

@ -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);

View file

@ -53,7 +53,7 @@
#include <config.h>
#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);

View file

@ -50,7 +50,7 @@
#include <sys/time.h>
#include <unistd.h>
#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);
}