summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2011-12-13 10:17:41 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2011-12-13 10:18:24 +0100
commitc869b21b174b163055f3b22f77d97226be21b296 (patch)
tree1475c08ab467081bf3a11ae7ca8097d5968dbf5b /gst-libs
parent8973c6c6b897e6b4c00e3104c55e3316078ba3a8 (diff)
basevideocodec: Don't use G_TYPE_REGISTER_BOXED() yet
This would require GLib 2.26.
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/video/gstbasevideocodec.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/gst-libs/gst/video/gstbasevideocodec.c b/gst-libs/gst/video/gstbasevideocodec.c
index 45e2a5cff..a1dc91db4 100644
--- a/gst-libs/gst/video/gstbasevideocodec.c
+++ b/gst-libs/gst/video/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);