From: Sebastian Dröge Date: Tue, 13 Dec 2011 09:17:41 +0000 (+0100) Subject: basevideocodec: Don't use G_TYPE_REGISTER_BOXED() yet X-Git-Tag: 1.0.0~206 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fd185be6f7ba8ce0b1527ac5e0986945e56c26b;p=platform%2Fupstream%2Fgst-omx.git basevideocodec: Don't use G_TYPE_REGISTER_BOXED() yet This would require GLib 2.26. --- diff --git a/omx/gstbasevideocodec.c b/omx/gstbasevideocodec.c index 45e2a5c..a1dc91d 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);