From c5c7e7e084e9d6d8b5c2ff446c0fcb07739a19bc Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Mon, 6 Jul 2015 20:16:38 +0900 Subject: [PATCH] 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 --- sys/ximage/ximageutil.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/ximage/ximageutil.c b/sys/ximage/ximageutil.c index add04225b8..ac2fd49f0c 100644 --- a/sys/ximage/ximageutil.c +++ b/sys/ximage/ximageutil.c @@ -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;