#include <math.h>
#include "gstwarp.h"
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
#include <gst/video/gstvideopool.h>
#ifndef M_PI
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;
/* 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 */
#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>
#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>
* 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);
}
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;
{
GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL (bpool);
GstBuffer *newbuf;
- GstMetaV4l2 *meta;
+ GstV4l2Meta *meta;
GstV4l2Object *obj;
GstVideoInfo *info;
guint index;
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;
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);
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;
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;
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) {
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))
typedef struct _GstV4l2BufferPool GstV4l2BufferPool;
typedef struct _GstV4l2BufferPoolClass GstV4l2BufferPoolClass;
-typedef struct _GstMetaV4l2 GstMetaV4l2;
+typedef struct _GstV4l2Meta GstV4l2Meta;
#include "gstv4l2object.h"
//#include "v4l2_calls.h"
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);
#include <config.h>
#endif
-#include "gst/video/gstmetavideo.h"
+#include "gst/video/gstvideometa.h"
#include "gstv4l2colorbalance.h"
#include "gstv4l2tuner.h"
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);
#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"
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);
}