#include "gsttheoradec.h"
#include <gst/tag/tag.h>
#include <gst/video/video.h>
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
#include <gst/video/gstvideopool.h>
#define GST_CAT_DEFAULT theoradec_debug
/* just set the option, 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
* option 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);
/* check if downstream supports cropping */
dec->use_cropping =
- gst_query_has_allocation_meta (query, GST_META_API_VIDEO_CROP);
+ gst_query_has_allocation_meta (query, GST_VIDEO_CROP_META_API);
gst_buffer_pool_set_config (pool, config);
/* and activate */
int i, comp;
guint8 *dest, *src;
GstVideoFrame frame;
- GstMetaVideoCrop *crop;
+ GstVideoCropMeta *crop;
gint offset_x, offset_y;
if (gst_pad_check_reconfigure (dec->srcpad)) {
pic_height = dec->info.frame_height;
if (dec->use_cropping) {
- crop = gst_buffer_add_meta_video_crop (*out);
+ crop = gst_buffer_add_video_crop_meta (*out);
/* we can do things slightly more efficient when we know that
* downstream understands clipping */
crop->x = dec->info.pic_x;
CLEANFILES = $(BUILT_SOURCES)
libgstvideo_@GST_MAJORMINOR@_la_SOURCES = \
- video.c gstvideosink.c gstvideofilter.c convertframe.c gstmetavideo.c gstvideopool.c
+ video.c gstvideosink.c gstvideofilter.c convertframe.c gstvideometa.c gstvideopool.c
nodist_libgstvideo_@GST_MAJORMINOR@_la_SOURCES = $(BUILT_SOURCES)
libgstvideo_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/video
libgstvideo_@GST_MAJORMINOR@include_HEADERS = \
- video.h gstvideosink.h gstvideofilter.h gstmetavideo.h gstvideopool.h
+ video.h gstvideosink.h gstvideofilter.h gstvideometa.h gstvideopool.h
nodist_libgstvideo_@GST_MAJORMINOR@include_HEADERS = $(built_headers)
libgstvideo_@GST_MAJORMINOR@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
* Boston, MA 02111-1307, USA.
*/
-#include "gstmetavideo.h"
+#include "gstvideometa.h"
/* video metadata */
const GstMetaInfo *
-gst_meta_video_get_info (void)
+gst_video_meta_get_info (void)
{
- static const GstMetaInfo *meta_video_info = NULL;
+ static const GstMetaInfo *video_meta_info = NULL;
- if (meta_video_info == NULL) {
- meta_video_info = gst_meta_register (GST_META_API_VIDEO, "GstMetaVideo",
- sizeof (GstMetaVideo),
+ if (video_meta_info == NULL) {
+ video_meta_info = gst_meta_register (GST_VIDEO_META_API, "GstVideoMeta",
+ sizeof (GstVideoMeta),
(GstMetaInitFunction) NULL,
(GstMetaFreeFunction) NULL,
(GstMetaCopyFunction) NULL, (GstMetaTransformFunction) NULL);
}
- return meta_video_info;
+ return video_meta_info;
}
/**
- * gst_buffer_get_meta_video_id:
+ * gst_buffer_get_video_meta_id:
* @buffer: a #GstBuffer
* @id: a metadata id
*
- * Find the #GstMetaVideo on @buffer with the given @id.
+ * Find the #GstVideoMeta on @buffer with the given @id.
*
- * Buffers can contain multiple #GstMetaVideo metadata items when dealing with
+ * Buffers can contain multiple #GstVideoMeta metadata items when dealing with
* multiview buffers.
*
- * Returns: the #GstMetaVideo with @id or %NULL when there is no such metadata
+ * Returns: the #GstVideoMeta with @id or %NULL when there is no such metadata
* on @buffer.
*/
-GstMetaVideo *
-gst_buffer_get_meta_video_id (GstBuffer * buffer, gint id)
+GstVideoMeta *
+gst_buffer_get_video_meta_id (GstBuffer * buffer, gint id)
{
gpointer state = NULL;
GstMeta *meta;
- const GstMetaInfo *info = GST_META_INFO_VIDEO;
+ const GstMetaInfo *info = GST_VIDEO_META_INFO;
while ((meta = gst_buffer_iterate_meta (buffer, &state))) {
if (meta->info->api == info->api) {
- GstMetaVideo *vmeta = (GstMetaVideo *) meta;
+ GstVideoMeta *vmeta = (GstVideoMeta *) meta;
if (vmeta->id == id)
return vmeta;
}
}
/**
- * gst_buffer_add_meta_video:
+ * gst_buffer_add_video_meta:
* @buffer: a #GstBuffer
* @flags: #GstVideoFlags
* @format: a #GstVideoFormat
* default offsets and strides for @format and @width x @height.
*
* This function calculates the default offsets and strides and then calls
- * gst_buffer_add_meta_video_full() with them.
+ * gst_buffer_add_video_meta_full() with them.
*
- * Returns: the #GstMetaVideo on @buffer.
+ * Returns: the #GstVideoMeta on @buffer.
*/
-GstMetaVideo *
-gst_buffer_add_meta_video (GstBuffer * buffer, GstVideoFlags flags,
+GstVideoMeta *
+gst_buffer_add_video_meta (GstBuffer * buffer, GstVideoFlags flags,
GstVideoFormat format, guint width, guint height)
{
- GstMetaVideo *meta;
+ GstVideoMeta *meta;
GstVideoInfo info;
gst_video_info_set_format (&info, format, width, height);
- meta = gst_buffer_add_meta_video_full (buffer, flags, format, width, height,
+ meta = gst_buffer_add_video_meta_full (buffer, flags, format, width, height,
info.finfo->n_planes, info.offset, info.stride);
return meta;
}
/**
- * gst_buffer_add_meta_video_full:
+ * gst_buffer_add_video_meta_full:
* @buffer: a #GstBuffer
* @flags: #GstVideoFlags
* @format: a #GstVideoFormat
*
* Attaches GstVideoMeta metadata to @buffer with the given parameters.
*
- * Returns: the #GstMetaVideo on @buffer.
+ * Returns: the #GstVideoMeta on @buffer.
*/
-GstMetaVideo *
-gst_buffer_add_meta_video_full (GstBuffer * buffer, GstVideoFlags flags,
+GstVideoMeta *
+gst_buffer_add_video_meta_full (GstBuffer * buffer, GstVideoFlags flags,
GstVideoFormat format, guint width, guint height,
guint n_planes, gsize offset[GST_VIDEO_MAX_PLANES],
gint stride[GST_VIDEO_MAX_PLANES])
{
- GstMetaVideo *meta;
+ GstVideoMeta *meta;
guint i;
meta =
- (GstMetaVideo *) gst_buffer_add_meta (buffer, GST_META_INFO_VIDEO, NULL);
+ (GstVideoMeta *) gst_buffer_add_meta (buffer, GST_VIDEO_META_INFO, NULL);
meta->flags = flags;
meta->format = format;
}
/**
- * gst_meta_video_map:
+ * gst_video_meta_map:
* @meta: a #GstVideoMeta
* @plane: a plane
* @stride: result stride
* Returns: a pointer to the first byte of the plane data
*/
gpointer
-gst_meta_video_map (GstMetaVideo * meta, guint plane, gint * stride,
+gst_video_meta_map (GstVideoMeta * meta, guint plane, gint * stride,
GstMapFlags flags)
{
guint offset;
}
/**
- * gst_meta_video_unmap:
+ * gst_video_meta_unmap:
* @meta: a #GstVideoMeta
* @plane: a plane
* @data: the data to unmap
* Returns: TRUE if the memory was successfully unmapped.
*/
gboolean
-gst_meta_video_unmap (GstMetaVideo * meta, guint plane, gpointer data)
+gst_video_meta_unmap (GstVideoMeta * meta, guint plane, gpointer data)
{
guint offset;
GstBuffer *buffer;
}
const GstMetaInfo *
-gst_meta_video_crop_get_info (void)
+gst_video_crop_meta_get_info (void)
{
- static const GstMetaInfo *meta_video_crop_info = NULL;
+ static const GstMetaInfo *video_crop_meta_info = NULL;
- if (meta_video_crop_info == NULL) {
- meta_video_crop_info =
- gst_meta_register (GST_META_API_VIDEO_CROP, "GstMetaVideoCrop",
- sizeof (GstMetaVideoCrop), (GstMetaInitFunction) NULL,
+ if (video_crop_meta_info == NULL) {
+ video_crop_meta_info =
+ gst_meta_register (GST_VIDEO_CROP_META_API, "GstVideoCropMeta",
+ sizeof (GstVideoCropMeta), (GstMetaInitFunction) NULL,
(GstMetaFreeFunction) NULL, (GstMetaCopyFunction) NULL,
(GstMetaTransformFunction) NULL);
}
- return meta_video_crop_info;
+ return video_crop_meta_info;
}
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GST_META_VIDEO_H__
-#define __GST_META_VIDEO_H__
+#ifndef __GST_VIDEO_META_H__
+#define __GST_VIDEO_META_H__
#include <gst/gst.h>
G_BEGIN_DECLS
-#define GST_META_API_VIDEO "GstMetaVideo"
-#define GST_META_INFO_VIDEO (gst_meta_video_get_info())
-typedef struct _GstMetaVideo GstMetaVideo;
+#define GST_VIDEO_META_API "GstVideoMeta"
+#define GST_VIDEO_META_INFO (gst_video_meta_get_info())
+typedef struct _GstVideoMeta GstVideoMeta;
-#define GST_META_API_VIDEO_CROP "GstMetaVideoCrop"
-#define GST_META_INFO_VIDEO_CROP (gst_meta_video_crop_get_info())
-typedef struct _GstMetaVideoCrop GstMetaVideoCrop;
+#define GST_VIDEO_CROP_META_API "GstVideoCropMeta"
+#define GST_VIDEO_CROP_META_INFO (gst_video_crop_meta_get_info())
+typedef struct _GstVideoCropMeta GstVideoCropMeta;
/**
- * GstMetaVideo:
+ * GstVideoMeta:
* @meta: parent #GstMeta
* @buffer: the buffer this metadata belongs to
* @flags: additional video flags
*
* Extra buffer metadata describing image properties
*/
-struct _GstMetaVideo {
+struct _GstVideoMeta {
GstMeta meta;
GstBuffer *buffer;
gsize offset[GST_VIDEO_MAX_PLANES];
gint stride[GST_VIDEO_MAX_PLANES];
- gpointer (*map) (GstMetaVideo *meta, guint plane, gint *stride,
+ gpointer (*map) (GstVideoMeta *meta, guint plane, gint *stride,
GstMapFlags flags);
- gboolean (*unmap) (GstMetaVideo *meta, guint plane, gpointer data);
+ gboolean (*unmap) (GstVideoMeta *meta, guint plane, gpointer data);
};
-const GstMetaInfo * gst_meta_video_get_info (void);
+const GstMetaInfo * gst_video_meta_get_info (void);
-#define gst_buffer_get_meta_video(b) ((GstMetaVideo*)gst_buffer_get_meta((b),GST_META_INFO_VIDEO))
-GstMetaVideo * gst_buffer_get_meta_video_id (GstBuffer *buffer, gint id);
+#define gst_buffer_get_video_meta(b) ((GstVideoMeta*)gst_buffer_get_meta((b),GST_VIDEO_META_INFO))
+GstVideoMeta * gst_buffer_get_video_meta_id (GstBuffer *buffer, gint id);
-GstMetaVideo * gst_buffer_add_meta_video (GstBuffer *buffer, GstVideoFlags flags,
+GstVideoMeta * gst_buffer_add_video_meta (GstBuffer *buffer, GstVideoFlags flags,
GstVideoFormat format, guint width, guint height);
-GstMetaVideo * gst_buffer_add_meta_video_full (GstBuffer *buffer, GstVideoFlags flags,
+GstVideoMeta * gst_buffer_add_video_meta_full (GstBuffer *buffer, GstVideoFlags flags,
GstVideoFormat format, guint width, guint height,
guint n_planes, gsize offset[GST_VIDEO_MAX_PLANES],
gint stride[GST_VIDEO_MAX_PLANES]);
-gpointer gst_meta_video_map (GstMetaVideo *meta, guint plane, gint *stride,
+gpointer gst_video_meta_map (GstVideoMeta *meta, guint plane, gint *stride,
GstMapFlags flags);
-gboolean gst_meta_video_unmap (GstMetaVideo *meta, guint plane, gpointer data);
+gboolean gst_video_meta_unmap (GstVideoMeta *meta, guint plane, gpointer data);
/**
- * GstMetaVideoCrop:
+ * GstVideoCropMeta:
* @meta: parent #GstMeta
* @x: the horizontal offset
* @y: the vertical offset
*
* Extra buffer metadata describing image cropping.
*/
-struct _GstMetaVideoCrop {
+struct _GstVideoCropMeta {
GstMeta meta;
guint x;
guint height;
};
-const GstMetaInfo * gst_meta_video_crop_get_info (void);
+const GstMetaInfo * gst_video_crop_meta_get_info (void);
-#define gst_buffer_get_meta_video_crop(b) ((GstMetaVideoCrop*)gst_buffer_get_meta((b),GST_META_INFO_VIDEO_CROP))
-#define gst_buffer_add_meta_video_crop(b) ((GstMetaVideoCrop*)gst_buffer_add_meta((b),GST_META_INFO_VIDEO_CROP, NULL))
+#define gst_buffer_get_video_crop_meta(b) ((GstVideoCropMeta*)gst_buffer_get_meta((b),GST_VIDEO_CROP_META_INFO))
+#define gst_buffer_add_video_crop_meta(b) ((GstVideoCropMeta*)gst_buffer_add_meta((b),GST_VIDEO_CROP_META_INFO, NULL))
G_END_DECLS
-#endif /* __GST_META_VIDEO_H__ */
+#endif /* __GST_VIDEO_META_H__ */
G_BEGIN_DECLS
/**
- * GST_BUFFER_POOL_OPTION_META_VIDEO:
+ * GST_BUFFER_POOL_OPTION_VIDEO_META:
*
* An option that can be activated on bufferpool to request video metadata
* on buffers from the pool.
*/
-#define GST_BUFFER_POOL_OPTION_META_VIDEO "GstBufferPoolOptionMetaVideo"
+#define GST_BUFFER_POOL_OPTION_VIDEO_META "GstBufferPoolOptionVideoMeta"
/**
* GST_BUFFER_POOL_OPTION_VIDEO_LAYOUT:
#include <string.h>
#include "video.h"
-#include "gstmetavideo.h"
+#include "gstvideometa.h"
static int fill_planes (GstVideoInfo * info);
* information of frame @id.
*
* When @id is -1, the default frame is mapped. When @id != -1, this function
- * will return %FALSE when there is no GstMetaVideo with that id.
+ * will return %FALSE when there is no GstVideoMeta with that id.
*
* All video planes of @buffer will be mapped and the pointers will be set in
* @frame->data.
gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info,
GstBuffer * buffer, gint id, GstMapFlags flags)
{
- GstMetaVideo *meta;
+ GstVideoMeta *meta;
guint8 *data;
gsize size;
gint i;
g_return_val_if_fail (GST_IS_BUFFER (buffer), FALSE);
if (id == -1)
- meta = gst_buffer_get_meta_video (buffer);
+ meta = gst_buffer_get_video_meta (buffer);
else
- meta = gst_buffer_get_meta_video_id (buffer, id);
+ meta = gst_buffer_get_video_meta_id (buffer, id);
frame->buffer = buffer;
frame->meta = meta;
for (i = 0; i < info->finfo->n_planes; i++) {
frame->data[i] =
- gst_meta_video_map (meta, i, &frame->info.stride[i], flags);
+ gst_video_meta_map (meta, i, &frame->info.stride[i], flags);
}
} else {
/* no metadata, we really need to have the metadata when the id is
/* ERRORS */
no_metadata:
{
- GST_ERROR ("no GstMetaVideo for id", id);
+ GST_ERROR ("no GstVideoMeta for id", id);
return FALSE;
}
invalid_size:
gst_video_frame_unmap (GstVideoFrame * frame)
{
GstBuffer *buffer;
- GstMetaVideo *meta;
+ GstVideoMeta *meta;
gint i;
g_return_if_fail (frame != NULL);
if (meta) {
for (i = 0; i < frame->info.finfo->n_planes; i++) {
- gst_meta_video_unmap (meta, i, frame->data[i]);
+ gst_video_meta_unmap (meta, i, frame->data[i]);
}
} else {
guint8 *data;
#include "gstvideoconvert.h"
#include <gst/video/video.h>
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
#include <gst/video/gstvideopool.h>
#include <string.h>
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;
#include <math.h>
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
#include <gst/video/gstvideopool.h>
#include "gstvideoscale.h"
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;
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);
}
gst_query_set_allocation_params (query, size, min, max, prefix,
#include <gst/gst.h>
#include <gst/base/gstpushsrc.h>
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
#include <gst/video/gstvideopool.h>
G_BEGIN_DECLS
/* Helper functions */
#include <gst/video/video.h>
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
#include <gst/video/gstvideopool.h>
GST_DEBUG_CATEGORY_EXTERN (gst_debug_ximagepool);
gboolean need_alignment;
};
-static void gst_meta_ximage_free (GstMetaXImage * meta, GstBuffer * buffer);
+static void gst_ximage_meta_free (GstXImageMeta * meta, GstBuffer * buffer);
/* ximage metadata */
const GstMetaInfo *
-gst_meta_ximage_get_info (void)
+gst_ximage_meta_get_info (void)
{
- static const GstMetaInfo *meta_ximage_info = NULL;
+ static const GstMetaInfo *ximage_meta_info = NULL;
- if (meta_ximage_info == NULL) {
- meta_ximage_info = gst_meta_register ("GstMetaXImage", "GstMetaXImage",
- sizeof (GstMetaXImage),
+ if (ximage_meta_info == NULL) {
+ ximage_meta_info = gst_meta_register ("GstXImageMeta", "GstXImageMeta",
+ sizeof (GstXImageMeta),
(GstMetaInitFunction) NULL,
- (GstMetaFreeFunction) gst_meta_ximage_free,
+ (GstMetaFreeFunction) gst_ximage_meta_free,
(GstMetaCopyFunction) NULL, (GstMetaTransformFunction) NULL);
}
- return meta_ximage_info;
+ return ximage_meta_info;
}
/* X11 stuff */
return 0;
}
-static GstMetaXImage *
-gst_buffer_add_meta_ximage (GstBuffer * buffer, GstXImageBufferPool * xpool)
+static GstXImageMeta *
+gst_buffer_add_ximage_meta (GstBuffer * buffer, GstXImageBufferPool * xpool)
{
GstXImageSink *ximagesink;
int (*handler) (Display *, XErrorEvent *);
gboolean success = FALSE;
GstXContext *xcontext;
- GstMetaXImage *meta;
+ GstXImageMeta *meta;
gint width, height;
GstXImageBufferPoolPrivate *priv;
height = priv->padded_height;
meta =
- (GstMetaXImage *) gst_buffer_add_meta (buffer, GST_META_INFO_XIMAGE,
+ (GstXImageMeta *) gst_buffer_add_meta (buffer, GST_XIMAGE_META_INFO,
NULL);
#ifdef HAVE_XSHM
meta->SHMInfo.shmaddr = ((void *) -1);
}
static void
-gst_meta_ximage_free (GstMetaXImage * meta, GstBuffer * buffer)
+gst_ximage_meta_free (GstXImageMeta * meta, GstBuffer * buffer)
{
GstXImageSink *ximagesink;
static const gchar **
ximage_buffer_pool_get_options (GstBufferPool * pool)
{
- static const gchar *options[] = { GST_BUFFER_POOL_OPTION_META_VIDEO,
+ static const gchar *options[] = { GST_BUFFER_POOL_OPTION_VIDEO_META,
GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT, NULL
};
/* check for the configured metadata */
priv->add_metavideo =
gst_buffer_pool_config_has_option (config,
- GST_BUFFER_POOL_OPTION_META_VIDEO);
+ GST_BUFFER_POOL_OPTION_VIDEO_META);
/* parse extra alignment info */
priv->need_alignment = gst_buffer_pool_config_has_option (config,
GstXImageBufferPoolPrivate *priv = xpool->priv;
GstVideoInfo *info;
GstBuffer *ximage;
- GstMetaXImage *meta;
+ GstXImageMeta *meta;
info = &priv->info;
ximage = gst_buffer_new ();
- meta = gst_buffer_add_meta_ximage (ximage, xpool);
+ meta = gst_buffer_add_ximage_meta (ximage, xpool);
if (meta == NULL) {
gst_buffer_unref (ximage);
goto no_buffer;
}
if (priv->add_metavideo) {
- GstMetaVideo *meta;
+ GstVideoMeta *meta;
- GST_DEBUG_OBJECT (pool, "adding GstMetaVideo");
+ GST_DEBUG_OBJECT (pool, "adding GstVideoMeta");
/* these are just the defaults for now */
- meta = gst_buffer_add_meta_video (ximage, 0, GST_VIDEO_INFO_FORMAT (info),
+ meta = gst_buffer_add_video_meta (ximage, 0, GST_VIDEO_INFO_FORMAT (info),
priv->padded_width, priv->padded_height);
if (priv->need_alignment) {
G_BEGIN_DECLS
-typedef struct _GstMetaXImage GstMetaXImage;
+typedef struct _GstXImageMeta GstXImageMeta;
typedef struct _GstXImageBufferPool GstXImageBufferPool;
typedef struct _GstXImageBufferPoolClass GstXImageBufferPoolClass;
#include "ximagesink.h"
-const GstMetaInfo * gst_meta_ximage_get_info (void);
-#define GST_META_INFO_XIMAGE (gst_meta_ximage_get_info())
+const GstMetaInfo * gst_ximage_meta_get_info (void);
+#define GST_XIMAGE_META_INFO (gst_ximage_meta_get_info())
-#define gst_buffer_get_meta_ximage(b) ((GstMetaXImage*)gst_buffer_get_meta((b),GST_META_INFO_XIMAGE))
+#define gst_buffer_get_ximage_meta(b) ((GstXImageMeta*)gst_buffer_get_meta((b),GST_XIMAGE_META_INFO))
/**
- * GstMetaXImage:
+ * GstXImageMeta:
* @simagesink: a reference to the our #GstXImageSink
* @ximage: the XImage of this buffer
* @width: the width in pixels of XImage @ximage
*
* Subclass of #GstMeta containing additional information about an XImage.
*/
-struct _GstMetaXImage
+struct _GstXImageMeta
{
GstMeta meta;
#include <gst/interfaces/navigation.h>
#include <gst/interfaces/videooverlay.h>
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
/* Object header */
#include "ximagesink.h"
static gboolean
gst_ximagesink_ximage_put (GstXImageSink * ximagesink, GstBuffer * ximage)
{
- GstMetaXImage *meta;
- GstMetaVideoCrop *crop;
+ GstXImageMeta *meta;
+ GstVideoCropMeta *crop;
GstVideoRectangle src, dst, result;
gboolean draw_border = FALSE;
}
}
- meta = gst_buffer_get_meta_ximage (ximage);
- crop = gst_buffer_get_meta_video_crop (ximage);
+ meta = gst_buffer_get_ximage_meta (ximage);
+ crop = gst_buffer_get_video_crop_meta (ximage);
if (crop) {
src.x = crop->x + meta->x;
{
GstFlowReturn res;
GstXImageSink *ximagesink;
- GstMetaXImage *meta;
+ GstXImageMeta *meta;
GstBuffer *to_put = NULL;
ximagesink = GST_XIMAGESINK (vsink);
- meta = gst_buffer_get_meta_ximage (buf);
+ meta = gst_buffer_get_ximage_meta (buf);
if (meta && meta->sink == ximagesink) {
/* If this buffer has been allocated using our buffer management we simply
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);
gst_object_unref (pool);
/* Helper functions */
#include <gst/video/video.h>
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
#include <gst/video/gstvideopool.h>
gboolean need_alignment;
};
-static void gst_meta_xvimage_free (GstMetaXvImage * meta, GstBuffer * buffer);
+static void gst_xvimage_meta_free (GstXvImageMeta * meta, GstBuffer * buffer);
/* xvimage metadata */
const GstMetaInfo *
-gst_meta_xvimage_get_info (void)
+gst_xvimage_meta_get_info (void)
{
- static const GstMetaInfo *meta_xvimage_info = NULL;
+ static const GstMetaInfo *xvimage_meta_info = NULL;
- if (meta_xvimage_info == NULL) {
- meta_xvimage_info = gst_meta_register ("GstMetaXvImage", "GstMetaXvImage",
- sizeof (GstMetaXvImage),
+ if (xvimage_meta_info == NULL) {
+ xvimage_meta_info = gst_meta_register ("GstXvImageMeta", "GstXvImageMeta",
+ sizeof (GstXvImageMeta),
(GstMetaInitFunction) NULL,
- (GstMetaFreeFunction) gst_meta_xvimage_free,
+ (GstMetaFreeFunction) gst_xvimage_meta_free,
(GstMetaCopyFunction) NULL, (GstMetaTransformFunction) NULL);
}
- return meta_xvimage_info;
+ return xvimage_meta_info;
}
/* X11 stuff */
return 0;
}
-static GstMetaXvImage *
-gst_buffer_add_meta_xvimage (GstBuffer * buffer, GstXvImageBufferPool * xvpool)
+static GstXvImageMeta *
+gst_buffer_add_xvimage_meta (GstBuffer * buffer, GstXvImageBufferPool * xvpool)
{
GstXvImageSink *xvimagesink;
int (*handler) (Display *, XErrorEvent *);
gboolean success = FALSE;
GstXContext *xcontext;
- GstMetaXvImage *meta;
+ GstXvImageMeta *meta;
gint width, height, im_format;
GstXvImageBufferPoolPrivate *priv;
im_format = priv->im_format;
meta =
- (GstMetaXvImage *) gst_buffer_add_meta (buffer, GST_META_INFO_XVIMAGE,
+ (GstXvImageMeta *) gst_buffer_add_meta (buffer, GST_XVIMAGE_META_INFO,
NULL);
#ifdef HAVE_XSHM
meta->SHMInfo.shmaddr = ((void *) -1);
}
static void
-gst_meta_xvimage_free (GstMetaXvImage * meta, GstBuffer * buffer)
+gst_xvimage_meta_free (GstXvImageMeta * meta, GstBuffer * buffer)
{
GstXvImageSink *xvimagesink;
static const gchar **
xvimage_buffer_pool_get_options (GstBufferPool * pool)
{
- static const gchar *options[] = { GST_BUFFER_POOL_OPTION_META_VIDEO,
+ static const gchar *options[] = { GST_BUFFER_POOL_OPTION_VIDEO_META,
GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT, NULL
};
/* enable metadata based on config of the pool */
priv->add_metavideo =
gst_buffer_pool_config_has_option (config,
- GST_BUFFER_POOL_OPTION_META_VIDEO);
+ GST_BUFFER_POOL_OPTION_VIDEO_META);
/* parse extra alignment info */
priv->need_alignment = gst_buffer_pool_config_has_option (config,
GstXvImageBufferPoolPrivate *priv = xvpool->priv;
GstVideoInfo *info;
GstBuffer *xvimage;
- GstMetaXvImage *meta;
+ GstXvImageMeta *meta;
info = &priv->info;
xvimage = gst_buffer_new ();
- meta = gst_buffer_add_meta_xvimage (xvimage, xvpool);
+ meta = gst_buffer_add_xvimage_meta (xvimage, xvpool);
if (meta == NULL) {
gst_buffer_unref (xvimage);
goto no_buffer;
}
if (priv->add_metavideo) {
- GstMetaVideo *meta;
+ GstVideoMeta *meta;
const GstVideoFormatInfo *vinfo = info->finfo;
gint i;
- GST_DEBUG_OBJECT (pool, "adding GstMetaVideo");
+ GST_DEBUG_OBJECT (pool, "adding GstVideoMeta");
/* these are just the defaults for now */
- meta = gst_buffer_add_meta_video (xvimage, 0, GST_VIDEO_INFO_FORMAT (info),
+ meta = gst_buffer_add_video_meta (xvimage, 0, GST_VIDEO_INFO_FORMAT (info),
priv->padded_width, priv->padded_height);
if (priv->need_alignment) {
G_BEGIN_DECLS
-typedef struct _GstMetaXvImage GstMetaXvImage;
+typedef struct _GstXvImageMeta GstXvImageMeta;
typedef struct _GstXvImageBufferPool GstXvImageBufferPool;
typedef struct _GstXvImageBufferPoolClass GstXvImageBufferPoolClass;
#include "xvimagesink.h"
-const GstMetaInfo * gst_meta_xvimage_get_info (void);
-#define GST_META_INFO_XVIMAGE (gst_meta_xvimage_get_info())
+const GstMetaInfo * gst_xvimage_meta_get_info (void);
+#define GST_XVIMAGE_META_INFO (gst_xvimage_meta_get_info())
-#define gst_buffer_get_meta_xvimage(b) ((GstMetaXvImage*)gst_buffer_get_meta((b),GST_META_INFO_XVIMAGE))
+#define gst_buffer_get_xvimage_meta(b) ((GstXvImageMeta*)gst_buffer_get_meta((b),GST_XVIMAGE_META_INFO))
/**
- * GstMetaXvImage:
+ * GstXvImageMeta:
* @sink: a reference to the our #GstXvImageSink
* @xvimage: the XvImage of this buffer
* @width: the width in pixels of XvImage @xvimage
*
* Subclass of #GstMeta containing additional information about an XvImage.
*/
-struct _GstMetaXvImage
+struct _GstXvImageMeta
{
GstMeta meta;
#include <gst/interfaces/colorbalance.h>
#include <gst/interfaces/propertyprobe.h>
/* Helper functions */
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
/* Object header */
#include "xvimagesink.h"
static gboolean
gst_xvimagesink_xvimage_put (GstXvImageSink * xvimagesink, GstBuffer * xvimage)
{
- GstMetaXvImage *meta;
- GstMetaVideoCrop *crop;
+ GstXvImageMeta *meta;
+ GstVideoCropMeta *crop;
GstVideoRectangle result;
gboolean draw_border = FALSE;
GstVideoRectangle src, dst;
}
}
- meta = gst_buffer_get_meta_xvimage (xvimage);
+ meta = gst_buffer_get_xvimage_meta (xvimage);
- crop = gst_buffer_get_meta_video_crop (xvimage);
+ crop = gst_buffer_get_video_crop_meta (xvimage);
if (crop) {
src.x = crop->x + meta->x;
{
GstFlowReturn res;
GstXvImageSink *xvimagesink;
- GstMetaXvImage *meta;
+ GstXvImageMeta *meta;
GstBuffer *to_put;
xvimagesink = GST_XVIMAGESINK (vsink);
- meta = gst_buffer_get_meta_xvimage (buf);
+ meta = gst_buffer_get_xvimage_meta (buf);
if (meta && meta->sink == xvimagesink) {
/* If this buffer has been allocated using our buffer management we simply
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);
gst_object_unref (pool);