mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
applemedia: update corevideobuffer after buffer meta API change
This commit is contained in:
parent
13334dfa8f
commit
d36fe4593d
2 changed files with 19 additions and 1 deletions
|
@ -33,13 +33,26 @@ gst_core_video_meta_free (GstCoreVideoMeta * meta, GstBuffer * buf)
|
|||
g_object_unref (meta->ctx);
|
||||
}
|
||||
|
||||
GType
|
||||
gst_core_video_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 ("GstCoreVideoMetaAPI", tags);
|
||||
g_once_init_leave (&type, _type);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static const GstMetaInfo *
|
||||
gst_core_video_meta_get_info (void)
|
||||
{
|
||||
static const GstMetaInfo *core_video_meta_info = NULL;
|
||||
|
||||
if (core_video_meta_info == NULL) {
|
||||
core_video_meta_info = gst_meta_register ("GstCoreVideoeMeta",
|
||||
core_video_meta_info = gst_meta_register (GST_CORE_VIDEO_META_API_TYPE,
|
||||
"GstCoreVideoMeta", sizeof (GstCoreVideoMeta),
|
||||
(GstMetaInitFunction) NULL,
|
||||
(GstMetaFreeFunction) gst_core_video_meta_free,
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_CORE_VIDEO_META_API_TYPE (gst_core_video_meta_api_get_type())
|
||||
#define gst_buffer_get_core_video_meta(b) \
|
||||
((GstCoreVideoMeta*)gst_buffer_get_meta((b),GST_CORE_VIDEO_META_API_TYPE))
|
||||
|
||||
typedef struct _GstCoreVideoMeta
|
||||
{
|
||||
GstMeta meta;
|
||||
|
@ -40,6 +44,7 @@ typedef struct _GstCoreVideoMeta
|
|||
GstBuffer * gst_core_video_buffer_new (GstCoreMediaCtx * ctx,
|
||||
CVBufferRef cvbuf,
|
||||
GstVideoInfo *info);
|
||||
GType gst_core_video_meta_api_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue