rename meta* -> *meta
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 31 Oct 2011 01:23:21 +0000 (02:23 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 2 Nov 2011 08:04:27 +0000 (09:04 +0100)
16 files changed:
ext/theora/gsttheoradec.c
gst-libs/gst/video/Makefile.am
gst-libs/gst/video/gstvideometa.c [moved from gst-libs/gst/video/gstmetavideo.c with 74% similarity]
gst-libs/gst/video/gstvideometa.h [moved from gst-libs/gst/video/gstmetavideo.h with 65% similarity]
gst-libs/gst/video/gstvideopool.h
gst-libs/gst/video/video.c
gst/videoconvert/gstvideoconvert.c
gst/videoscale/gstvideoscale.c
gst/videotestsrc/gstvideotestsrc.c
gst/videotestsrc/gstvideotestsrc.h
sys/ximage/ximagepool.c
sys/ximage/ximagepool.h
sys/ximage/ximagesink.c
sys/xvimage/xvimagepool.c
sys/xvimage/xvimagepool.h
sys/xvimage/xvimagesink.c

index c1b22d3..a73a811 100644 (file)
@@ -44,7 +44,7 @@
 #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
@@ -830,11 +830,11 @@ theora_negotiate_pool (GstTheoraDec * dec, GstCaps * caps, GstVideoInfo * info)
   /* 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 */
@@ -1132,7 +1132,7 @@ theora_handle_image (GstTheoraDec * dec, th_ycbcr_buffer buf, GstBuffer ** out)
   int i, comp;
   guint8 *dest, *src;
   GstVideoFrame frame;
-  GstMetaVideoCrop *crop;
+  GstVideoCropMeta *crop;
   gint offset_x, offset_y;
 
   if (gst_pad_check_reconfigure (dec->srcpad)) {
@@ -1171,7 +1171,7 @@ theora_handle_image (GstTheoraDec * dec, th_ycbcr_buffer buf, GstBuffer ** out)
     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;
index 15b0c60..e2ec131 100644 (file)
@@ -13,12 +13,12 @@ lib_LTLIBRARIES = libgstvideo-@GST_MAJORMINOR@.la
 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)
similarity index 74%
rename from gst-libs/gst/video/gstmetavideo.c
rename to gst-libs/gst/video/gstvideometa.c
index 2946704..f6d5f0e 100644 (file)
  * 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;
     }
@@ -66,7 +66,7 @@ gst_buffer_get_meta_video_id (GstBuffer * buffer, gint id)
 }
 
 /**
- * gst_buffer_add_meta_video:
+ * gst_buffer_add_video_meta:
  * @buffer: a #GstBuffer
  * @flags: #GstVideoFlags
  * @format: a #GstVideoFormat
@@ -77,27 +77,27 @@ gst_buffer_get_meta_video_id (GstBuffer * buffer, gint id)
  * 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
@@ -109,19 +109,19 @@ gst_buffer_add_meta_video (GstBuffer * buffer, GstVideoFlags flags,
  *
  * 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;
@@ -162,7 +162,7 @@ find_mem_for_offset (GstBuffer * buffer, guint * offset, GstMapFlags flags)
 }
 
 /**
- * gst_meta_video_map:
+ * gst_video_meta_map:
  * @meta: a #GstVideoMeta
  * @plane: a plane
  * @stride: result stride
@@ -174,7 +174,7 @@ find_mem_for_offset (GstBuffer * buffer, guint * offset, GstMapFlags flags)
  * 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;
@@ -206,7 +206,7 @@ gst_meta_video_map (GstMetaVideo * meta, guint plane, gint * stride,
 }
 
 /**
- * gst_meta_video_unmap:
+ * gst_video_meta_unmap:
  * @meta: a #GstVideoMeta
  * @plane: a plane
  * @data: the data to unmap
@@ -216,7 +216,7 @@ gst_meta_video_map (GstMetaVideo * meta, guint plane, gint * stride,
  * 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;
@@ -239,16 +239,16 @@ gst_meta_video_unmap (GstMetaVideo * meta, guint plane, gpointer data)
 }
 
 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;
 }
similarity index 65%
rename from gst-libs/gst/video/gstmetavideo.h
rename to gst-libs/gst/video/gstvideometa.h
index 12c1ed1..b68b979 100644 (file)
@@ -17,8 +17,8 @@
  * 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
@@ -51,7 +51,7 @@ typedef struct _GstMetaVideoCrop GstMetaVideoCrop;
  *
  * Extra buffer metadata describing image properties
  */
-struct _GstMetaVideo {
+struct _GstVideoMeta {
   GstMeta            meta;
 
   GstBuffer         *buffer;
@@ -66,29 +66,29 @@ struct _GstMetaVideo {
   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
@@ -97,7 +97,7 @@ gboolean       gst_meta_video_unmap      (GstMetaVideo *meta, guint plane, gpoin
  *
  * Extra buffer metadata describing image cropping.
  */
-struct _GstMetaVideoCrop {
+struct _GstVideoCropMeta {
   GstMeta       meta;
 
   guint         x;
@@ -106,11 +106,11 @@ struct _GstMetaVideoCrop {
   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__ */
index 179c724..fdee5dc 100644 (file)
 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:
index 2efba19..786e2b0 100644 (file)
@@ -26,7 +26,7 @@
 #include <string.h>
 
 #include "video.h"
-#include "gstmetavideo.h"
+#include "gstvideometa.h"
 
 static int fill_planes (GstVideoInfo * info);
 
@@ -944,7 +944,7 @@ gst_video_info_to_caps (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.
@@ -955,7 +955,7 @@ gboolean
 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;
@@ -965,9 +965,9 @@ gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info,
   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;
@@ -981,7 +981,7 @@ gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info,
 
     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
@@ -1009,7 +1009,7 @@ gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info,
   /* ERRORS */
 no_metadata:
   {
-    GST_ERROR ("no GstMetaVideo for id", id);
+    GST_ERROR ("no GstVideoMeta for id", id);
     return FALSE;
   }
 invalid_size:
@@ -1052,7 +1052,7 @@ void
 gst_video_frame_unmap (GstVideoFrame * frame)
 {
   GstBuffer *buffer;
-  GstMetaVideo *meta;
+  GstVideoMeta *meta;
   gint i;
 
   g_return_if_fail (frame != NULL);
@@ -1062,7 +1062,7 @@ gst_video_frame_unmap (GstVideoFrame * frame)
 
   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;
index b920fdd..210b8e1 100644 (file)
@@ -39,7 +39,7 @@
 
 #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>
@@ -174,7 +174,7 @@ gst_video_convert_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;
index 416dc1d..e295e7b 100644 (file)
@@ -76,7 +76,7 @@
 
 #include <math.h>
 
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
 #include <gst/video/gstvideopool.h>
 
 #include "gstvideoscale.h"
@@ -461,7 +461,7 @@ gst_video_scale_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;
index 2015f5e..f7cd51c 100644 (file)
@@ -620,7 +620,7 @@ gst_video_test_src_decide_allocation (GstBaseSrc * bsrc, 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);
   }
   gst_query_set_allocation_params (query, size, min, max, prefix,
index 30d4904..d07c350 100644 (file)
@@ -24,7 +24,7 @@
 #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
index 06a5c72..3df7df1 100644 (file)
@@ -29,7 +29,7 @@
 
 /* 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);
@@ -46,22 +46,22 @@ struct _GstXImageBufferPoolPrivate
   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 */
@@ -78,14 +78,14 @@ gst_ximagesink_handle_xerror (Display * display, XErrorEvent * xevent)
   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;
 
@@ -97,7 +97,7 @@ gst_buffer_add_meta_ximage (GstBuffer * buffer, GstXImageBufferPool * xpool)
   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);
@@ -279,7 +279,7 @@ xattach_failed:
 }
 
 static void
-gst_meta_ximage_free (GstMetaXImage * meta, GstBuffer * buffer)
+gst_ximage_meta_free (GstXImageMeta * meta, GstBuffer * buffer)
 {
   GstXImageSink *ximagesink;
 
@@ -454,7 +454,7 @@ G_DEFINE_TYPE (GstXImageBufferPool, gst_ximage_buffer_pool,
 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
   };
 
@@ -492,7 +492,7 @@ ximage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
   /* 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,
@@ -547,22 +547,22 @@ ximage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
   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) {
index ec88c27..4027b6f 100644 (file)
@@ -39,7 +39,7 @@
 
 G_BEGIN_DECLS
 
-typedef struct _GstMetaXImage GstMetaXImage;
+typedef struct _GstXImageMeta GstXImageMeta;
 
 typedef struct _GstXImageBufferPool GstXImageBufferPool;
 typedef struct _GstXImageBufferPoolClass GstXImageBufferPoolClass;
@@ -47,13 +47,13 @@ typedef struct _GstXImageBufferPoolPrivate GstXImageBufferPoolPrivate;
 
 #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
@@ -62,7 +62,7 @@ const GstMetaInfo * gst_meta_ximage_get_info (void);
  *
  * Subclass of #GstMeta containing additional information about an XImage.
  */
-struct _GstMetaXImage
+struct _GstXImageMeta
 {
   GstMeta meta;
 
index dd6bd17..f9420e3 100644 (file)
 #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"
@@ -225,8 +225,8 @@ gst_ximagesink_xwindow_draw_borders (GstXImageSink * ximagesink,
 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;
 
@@ -266,8 +266,8 @@ gst_ximagesink_ximage_put (GstXImageSink * ximagesink, GstBuffer * ximage)
     }
   }
 
-  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;
@@ -1288,12 +1288,12 @@ gst_ximagesink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
 {
   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
@@ -1483,8 +1483,8 @@ gst_ximagesink_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);
 
   gst_object_unref (pool);
 
index 855d877..8cd632a 100644 (file)
@@ -29,7 +29,7 @@
 
 /* Helper functions */
 #include <gst/video/video.h>
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
 #include <gst/video/gstvideopool.h>
 
 
@@ -49,22 +49,22 @@ struct _GstXvImageBufferPoolPrivate
   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 */
@@ -81,14 +81,14 @@ gst_xvimagesink_handle_xerror (Display * display, XErrorEvent * xevent)
   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;
 
@@ -101,7 +101,7 @@ gst_buffer_add_meta_xvimage (GstBuffer * buffer, GstXvImageBufferPool * xvpool)
   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);
@@ -313,7 +313,7 @@ xattach_failed:
 }
 
 static void
-gst_meta_xvimage_free (GstMetaXvImage * meta, GstBuffer * buffer)
+gst_xvimage_meta_free (GstXvImageMeta * meta, GstBuffer * buffer)
 {
   GstXvImageSink *xvimagesink;
 
@@ -488,7 +488,7 @@ G_DEFINE_TYPE (GstXvImageBufferPool, gst_xvimage_buffer_pool,
 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
   };
 
@@ -528,7 +528,7 @@ xvimage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
   /* 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,
@@ -592,25 +592,25 @@ xvimage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
   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) {
index 7136498..0f2a95d 100644 (file)
@@ -39,7 +39,7 @@
 
 G_BEGIN_DECLS
 
-typedef struct _GstMetaXvImage GstMetaXvImage;
+typedef struct _GstXvImageMeta GstXvImageMeta;
 
 typedef struct _GstXvImageBufferPool GstXvImageBufferPool;
 typedef struct _GstXvImageBufferPoolClass GstXvImageBufferPoolClass;
@@ -47,13 +47,13 @@ typedef struct _GstXvImageBufferPoolPrivate GstXvImageBufferPoolPrivate;
 
 #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
@@ -63,7 +63,7 @@ const GstMetaInfo * gst_meta_xvimage_get_info (void);
  *
  * Subclass of #GstMeta containing additional information about an XvImage.
  */
-struct _GstMetaXvImage
+struct _GstXvImageMeta
 {
   GstMeta meta;
 
index 167ac75..a876f57 100644 (file)
 #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"
@@ -269,8 +269,8 @@ gst_xvimagesink_xwindow_draw_borders (GstXvImageSink * xvimagesink,
 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;
@@ -311,9 +311,9 @@ gst_xvimagesink_xvimage_put (GstXvImageSink * xvimagesink, GstBuffer * xvimage)
     }
   }
 
-  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;
@@ -1803,12 +1803,12 @@ gst_xvimagesink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
 {
   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
@@ -1998,8 +1998,8 @@ gst_xvimagesink_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);
 
   gst_object_unref (pool);