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:
Hyunjun Ko 2015-07-06 20:16:38 +09:00 committed by Sebastian Dröge
parent a675e18935
commit c5c7e7e084

View file

@ -36,6 +36,15 @@ gst_meta_ximage_api_get_type (void)
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 *
gst_meta_ximage_get_info (void)
{
@ -45,7 +54,7 @@ gst_meta_ximage_get_info (void)
const GstMetaInfo *meta =
gst_meta_register (gst_meta_ximage_api_get_type (), "GstMetaXImageSrc",
sizeof (GstMetaXImage), (GstMetaInitFunction) NULL,
(GstMetaFreeFunction) NULL, (GstMetaTransformFunction) NULL);
(GstMetaFreeFunction) NULL, gst_meta_ximage_transform);
g_once_init_leave (&meta_ximage_info, meta);
}
return meta_ximage_info;