From 4fd185be6f7ba8ce0b1527ac5e0986945e56c26b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 13 Dec 2011 10:17:41 +0100 Subject: [PATCH] basevideocodec: Don't use G_TYPE_REGISTER_BOXED() yet This would require GLib 2.26. --- omx/gstbasevideocodec.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/omx/gstbasevideocodec.c b/omx/gstbasevideocodec.c index 45e2a5cffc..a1dc91db46 100644 --- a/omx/gstbasevideocodec.c +++ b/omx/gstbasevideocodec.c @@ -45,9 +45,21 @@ static void gst_base_video_codec_finalize (GObject * object); static GstStateChangeReturn gst_base_video_codec_change_state (GstElement * element, GstStateChange transition); -G_DEFINE_BOXED_TYPE (GstVideoState, gst_video_frame, - (GBoxedCopyFunc) gst_video_frame_ref, - (GBoxedFreeFunc) gst_video_frame_unref); +GType +gst_video_frame_get_type (void) +{ + static volatile gsize type = 0; + + if (g_once_init_enter (&type)) { + GType _type; + + _type = g_boxed_type_register_static ("GstVideoFrame", + (GBoxedCopyFunc) gst_video_frame_ref, + (GBoxedFreeFunc) gst_video_frame_unref); + g_once_init_leave (&type, _type); + } + return (GType) type; +} GST_BOILERPLATE (GstBaseVideoCodec, gst_base_video_codec, GstElement, GST_TYPE_ELEMENT);