/* check if downstream supports cropping */
base_video_decoder->use_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_buffer_pool_set_config (pool, config);
/* and activate */
* </note>
*/
+GType
+gst_surface_meta_api_get_type (void)
+{
+ static volatile GType type;
+ static const gchar *tags[] = { "memory", NULL };
+
+ if (g_once_init_enter (&type)) {
+ GType _type = gst_meta_api_type_register ("GstSurfaceMetaAPI", tags);
+ g_once_init_leave (&type, _type);
+ }
+ return type;
+}
const GstMetaInfo *
gst_surface_meta_get_info (void)
{
static const GstMetaInfo *meta_info = NULL;
- static const gchar *tags[] = { "memory" };
if (meta_info == NULL) {
- meta_info = gst_meta_register ("GstSurfaceMeta", "GstSurfaceMeta",
+ meta_info = gst_meta_register (GST_SURFACE_META_API_TYPE, "GstSurfaceMeta",
sizeof (GstSurfaceMeta),
(GstMetaInitFunction) NULL,
- (GstMetaFreeFunction) NULL, (GstMetaTransformFunction) NULL, tags);
+ (GstMetaFreeFunction) NULL, (GstMetaTransformFunction) NULL);
}
return meta_info;
}
GValue *dest);
};
+GType gst_surface_meta_api_get_type (void);
+#define GST_SURFACE_META_API_TYPE (gst_surface_meta_api_get_type())
+
const GstMetaInfo *gst_surface_meta_get_info (void);
#define GST_SURFACE_META_INFO (gst_surface_meta_get_info())
#define gst_buffer_get_surface_meta(b) \
- ((GstSurfaceMeta*)gst_buffer_get_meta((b),GST_SURFACE_META_INFO))
+ ((GstSurfaceMeta*)gst_buffer_get_meta((b),GST_SURFACE_META_API_TYPE))
#define gst_buffer_add_surface_meta(b) \
((GstSurfaceMeta*)gst_buffer_add_meta((b),GST_SURFACE_META_INFO,NULL))