mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
ximagesrc: add meta transform function
ximage metadata can't be transformed or copied, but provide an empty transformation function instead of NULL to allow unconditional calling of metas' transform functions. https://bugzilla.gnome.org/show_bug.cgi?id=751778
This commit is contained in:
parent
a675e18935
commit
c5c7e7e084
1 changed files with 10 additions and 1 deletions
|
@ -36,6 +36,15 @@ gst_meta_ximage_api_get_type (void)
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gst_meta_ximage_transform (GstBuffer * dest, GstMeta * meta,
|
||||||
|
GstBuffer * buffer, GQuark type, gpointer data)
|
||||||
|
{
|
||||||
|
/* ximage metadata can't be transformed or copied */
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
const GstMetaInfo *
|
const GstMetaInfo *
|
||||||
gst_meta_ximage_get_info (void)
|
gst_meta_ximage_get_info (void)
|
||||||
{
|
{
|
||||||
|
@ -45,7 +54,7 @@ gst_meta_ximage_get_info (void)
|
||||||
const GstMetaInfo *meta =
|
const GstMetaInfo *meta =
|
||||||
gst_meta_register (gst_meta_ximage_api_get_type (), "GstMetaXImageSrc",
|
gst_meta_register (gst_meta_ximage_api_get_type (), "GstMetaXImageSrc",
|
||||||
sizeof (GstMetaXImage), (GstMetaInitFunction) NULL,
|
sizeof (GstMetaXImage), (GstMetaInitFunction) NULL,
|
||||||
(GstMetaFreeFunction) NULL, (GstMetaTransformFunction) NULL);
|
(GstMetaFreeFunction) NULL, gst_meta_ximage_transform);
|
||||||
g_once_init_leave (&meta_ximage_info, meta);
|
g_once_init_leave (&meta_ximage_info, meta);
|
||||||
}
|
}
|
||||||
return meta_ximage_info;
|
return meta_ximage_info;
|
||||||
|
|
Loading…
Reference in a new issue