/* check if downstream supports cropping */
dec->has_cropping =
- gst_query_has_allocation_meta (query, GST_VIDEO_CROP_META_API);
+ gst_query_has_allocation_meta (query, GST_VIDEO_CROP_META_API_TYPE);
GST_DEBUG_OBJECT (dec, "downstream cropping %d", dec->has_cropping);
return meta;
}
+GType
+gst_audio_downmix_meta_api_get_type (void)
+{
+ static volatile GType type;
+ static const gchar *tags[] = { NULL };
+
+ if (g_once_init_enter (&type)) {
+ GType _type = gst_meta_api_type_register ("GstAudioDownmixMetaAPI", tags);
+ g_once_init_leave (&type, _type);
+ }
+ return type;
+}
+
const GstMetaInfo *
gst_audio_downmix_meta_get_info (void)
{
static const GstMetaInfo *audio_downmix_meta_info = NULL;
- static const gchar *tags[] = { NULL };
if (audio_downmix_meta_info == NULL) {
audio_downmix_meta_info =
- gst_meta_register (GST_AUDIO_DOWNMIX_META_API, "GstAudioDownmixMeta",
- sizeof (GstAudioDownmixMeta),
- gst_audio_downmix_meta_init,
- gst_audio_downmix_meta_free, gst_audio_downmix_meta_transform, tags);
+ gst_meta_register (GST_AUDIO_DOWNMIX_META_API_TYPE,
+ "GstAudioDownmixMeta", sizeof (GstAudioDownmixMeta),
+ gst_audio_downmix_meta_init, gst_audio_downmix_meta_free,
+ gst_audio_downmix_meta_transform);
}
return audio_downmix_meta_info;
}
G_BEGIN_DECLS
-#define GST_AUDIO_DOWNMIX_META_API "GstAudioDownmixMeta"
+#define GST_AUDIO_DOWNMIX_META_API_TYPE (gst_audio_downmix_meta_api_get_type())
#define GST_AUDIO_DOWNMIX_META_INFO (gst_audio_downmix_meta_get_info())
+
typedef struct _GstAudioDownmixMeta GstAudioDownmixMeta;
/**
gfloat **matrix;
};
+GType gst_audio_downmix_meta_api_get_type (void);
const GstMetaInfo * gst_audio_downmix_meta_get_info (void);
#define gst_buffer_get_audio_downmix_meta(b) ((GstAudioDownmixMeta*)gst_buffer_get_meta((b),GST_AUDIO_DOWNMIX_META_INFO))
gst_query_set_allocation_params (query, size, 0, 0, 0, 15, pool);
gst_object_unref (pool);
- gst_query_add_allocation_meta (query, GST_VIDEO_META_API);
+ gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE);
return TRUE;
return TRUE;
}
+GType
+gst_video_meta_api_get_type (void)
+{
+ static volatile GType type = 0;
+ static const gchar *tags[] = { "memory", "colorspace", "size", NULL };
+
+ if (g_once_init_enter (&type)) {
+ GType _type = gst_meta_api_type_register ("GstVideoMetaAPI", tags);
+ g_once_init_leave (&type, _type);
+ }
+ return type;
+}
+
/* video metadata */
const GstMetaInfo *
gst_video_meta_get_info (void)
{
static const GstMetaInfo *video_meta_info = NULL;
- static const gchar *tags[] = { "memory", "colorspace", "size", NULL };
if (video_meta_info == NULL) {
- video_meta_info = gst_meta_register (GST_VIDEO_META_API, "GstVideoMeta",
- sizeof (GstVideoMeta),
- (GstMetaInitFunction) NULL,
- (GstMetaFreeFunction) NULL, gst_video_meta_transform, tags);
+ video_meta_info =
+ gst_meta_register (GST_VIDEO_META_API_TYPE, "GstVideoMeta",
+ sizeof (GstVideoMeta), (GstMetaInitFunction) NULL,
+ (GstMetaFreeFunction) NULL, gst_video_meta_transform);
}
return video_meta_info;
}
return TRUE;
}
+GType
+gst_video_crop_meta_api_get_type (void)
+{
+ static volatile GType type = 0;
+ static const gchar *tags[] = { "size", "orientation", NULL };
+
+ if (g_once_init_enter (&type)) {
+ GType _type = gst_meta_api_type_register ("GstVideoCropMetaAPI", tags);
+ g_once_init_leave (&type, _type);
+ }
+ return type;
+}
+
const GstMetaInfo *
gst_video_crop_meta_get_info (void)
{
static const GstMetaInfo *video_crop_meta_info = NULL;
- static const gchar *tags[] = { "size", "orientation", NULL };
if (video_crop_meta_info == NULL) {
video_crop_meta_info =
- gst_meta_register (GST_VIDEO_CROP_META_API, "GstVideoCropMeta",
+ gst_meta_register (GST_VIDEO_CROP_META_API_TYPE, "GstVideoCropMeta",
sizeof (GstVideoCropMeta), (GstMetaInitFunction) NULL,
- (GstMetaFreeFunction) NULL, gst_video_crop_meta_transform, tags);
+ (GstMetaFreeFunction) NULL, gst_video_crop_meta_transform);
}
return video_crop_meta_info;
}
G_BEGIN_DECLS
-#define GST_VIDEO_META_API "GstVideoMeta"
+#define GST_VIDEO_META_API_TYPE (gst_video_meta_api_get_type())
#define GST_VIDEO_META_INFO (gst_video_meta_get_info())
typedef struct _GstVideoMeta GstVideoMeta;
-#define GST_VIDEO_CROP_META_API "GstVideoCropMeta"
+#define GST_VIDEO_CROP_META_API_TYPE (gst_video_crop_meta_api_get_type())
#define GST_VIDEO_CROP_META_INFO (gst_video_crop_meta_get_info())
typedef struct _GstVideoCropMeta GstVideoCropMeta;
gboolean (*unmap) (GstVideoMeta *meta, guint plane, GstMapInfo *info);
};
+GType gst_video_meta_api_get_type (void);
const GstMetaInfo * gst_video_meta_get_info (void);
-#define gst_buffer_get_video_meta(b) ((GstVideoMeta*)gst_buffer_get_meta((b),GST_VIDEO_META_INFO))
+#define gst_buffer_get_video_meta(b) ((GstVideoMeta*)gst_buffer_get_meta((b),GST_VIDEO_META_API_TYPE))
GstVideoMeta * gst_buffer_get_video_meta_id (GstBuffer *buffer, gint id);
GstVideoMeta * gst_buffer_add_video_meta (GstBuffer *buffer, GstVideoFlags flags,
guint height;
};
+GType gst_video_crop_meta_api_get_type (void);
const GstMetaInfo * gst_video_crop_meta_get_info (void);
-#define gst_buffer_get_video_crop_meta(b) ((GstVideoCropMeta*)gst_buffer_get_meta((b),GST_VIDEO_CROP_META_INFO))
+#define gst_buffer_get_video_crop_meta(b) ((GstVideoCropMeta*)gst_buffer_get_meta((b),GST_VIDEO_CROP_META_API_TYPE))
#define gst_buffer_add_video_crop_meta(b) ((GstVideoCropMeta*)gst_buffer_add_meta((b),GST_VIDEO_CROP_META_INFO, NULL))
G_END_DECLS
static void gst_ximage_meta_free (GstXImageMeta * meta, GstBuffer * buffer);
/* ximage metadata */
+GType
+gst_ximage_meta_api_get_type (void)
+{
+ static volatile GType type;
+ static const gchar *tags[] =
+ { "memory", "size", "colorspace", "orientation", NULL };
+
+ if (g_once_init_enter (&type)) {
+ GType _type = gst_meta_api_type_register ("GstXImageMetaAPI", tags);
+ g_once_init_leave (&type, _type);
+ }
+ return type;
+}
+
const GstMetaInfo *
gst_ximage_meta_get_info (void)
{
static const GstMetaInfo *ximage_meta_info = NULL;
- static const gchar *tags[] =
- { "memory", "size", "colorspace", "orientation", NULL };
if (ximage_meta_info == NULL) {
- ximage_meta_info = gst_meta_register ("GstXImageMeta", "GstXImageMeta",
- sizeof (GstXImageMeta),
- (GstMetaInitFunction) NULL,
+ ximage_meta_info =
+ gst_meta_register (GST_XIMAGE_META_API_TYPE, "GstXImageMeta",
+ sizeof (GstXImageMeta), (GstMetaInitFunction) NULL,
(GstMetaFreeFunction) gst_ximage_meta_free,
- (GstMetaTransformFunction) NULL, tags);
+ (GstMetaTransformFunction) NULL);
}
return ximage_meta_info;
}
typedef struct _GstXImageBufferPoolPrivate GstXImageBufferPoolPrivate;
#include "ximagesink.h"
-
+GType gst_ximage_meta_api_get_type (void);
+#define GST_XIMAGE_META_API_TYPE (gst_ximage_meta_api_get_type())
const GstMetaInfo * gst_ximage_meta_get_info (void);
#define GST_XIMAGE_META_INFO (gst_ximage_meta_get_info())
-#define gst_buffer_get_ximage_meta(b) ((GstXImageMeta*)gst_buffer_get_meta((b),GST_XIMAGE_META_INFO))
+#define gst_buffer_get_ximage_meta(b) ((GstXImageMeta*)gst_buffer_get_meta((b),GST_XIMAGE_META_API_TYPE))
/**
* GstXImageMeta:
gst_query_set_allocation_params (query, size, 2, 0, 0, 0, pool);
/* we also support various metadata */
- gst_query_add_allocation_meta (query, GST_VIDEO_META_API);
- gst_query_add_allocation_meta (query, GST_VIDEO_CROP_META_API);
+ gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE);
+ gst_query_add_allocation_meta (query, GST_VIDEO_CROP_META_API_TYPE);
gst_object_unref (pool);
static void gst_xvimage_meta_free (GstXvImageMeta * meta, GstBuffer * buffer);
/* xvimage metadata */
+GType
+gst_xvimage_meta_api_get_type (void)
+{
+ static volatile GType type;
+ static const gchar *tags[] =
+ { "memory", "size", "colorspace", "orientation", NULL };
+
+ if (g_once_init_enter (&type)) {
+ GType _type = gst_meta_api_type_register ("GstXvImageMetaAPI", tags);
+ g_once_init_leave (&type, _type);
+ }
+ return type;
+}
+
const GstMetaInfo *
gst_xvimage_meta_get_info (void)
{
static const GstMetaInfo *xvimage_meta_info = NULL;
- static const gchar *tags[] =
- { "memory", "size", "colorspace", "orientation", NULL };
if (xvimage_meta_info == NULL) {
- xvimage_meta_info = gst_meta_register ("GstXvImageMeta", "GstXvImageMeta",
- sizeof (GstXvImageMeta),
- (GstMetaInitFunction) NULL,
+ xvimage_meta_info =
+ gst_meta_register (GST_XVIMAGE_META_API_TYPE, "GstXvImageMeta",
+ sizeof (GstXvImageMeta), (GstMetaInitFunction) NULL,
(GstMetaFreeFunction) gst_xvimage_meta_free,
- (GstMetaTransformFunction) NULL, tags);
+ (GstMetaTransformFunction) NULL);
}
return xvimage_meta_info;
}
#include "xvimagesink.h"
+GType gst_xvimage_meta_api_get_type (void);
+#define GST_XVIMAGE_META_API_TYPE (gst_xvimage_meta_api_get_type())
const GstMetaInfo * gst_xvimage_meta_get_info (void);
#define GST_XVIMAGE_META_INFO (gst_xvimage_meta_get_info())
-#define gst_buffer_get_xvimage_meta(b) ((GstXvImageMeta*)gst_buffer_get_meta((b),GST_XVIMAGE_META_INFO))
+#define gst_buffer_get_xvimage_meta(b) ((GstXvImageMeta*)gst_buffer_get_meta((b),GST_XVIMAGE_META_API_TYPE))
/**
* GstXvImageMeta:
gst_query_set_allocation_params (query, size, 2, 0, 0, 0, pool);
/* we also support various metadata */
- gst_query_add_allocation_meta (query, GST_VIDEO_META_API);
- gst_query_add_allocation_meta (query, GST_VIDEO_CROP_META_API);
+ gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE);
+ gst_query_add_allocation_meta (query, GST_VIDEO_CROP_META_API_TYPE);
gst_object_unref (pool);