mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-13 03:46:34 +00:00
basevideocodec: Don't use G_TYPE_REGISTER_BOXED() yet
This would require GLib 2.26.
This commit is contained in:
parent
887d43c290
commit
4fd185be6f
1 changed files with 15 additions and 3 deletions
|
@ -45,9 +45,21 @@ static void gst_base_video_codec_finalize (GObject * object);
|
||||||
static GstStateChangeReturn gst_base_video_codec_change_state (GstElement *
|
static GstStateChangeReturn gst_base_video_codec_change_state (GstElement *
|
||||||
element, GstStateChange transition);
|
element, GstStateChange transition);
|
||||||
|
|
||||||
G_DEFINE_BOXED_TYPE (GstVideoState, gst_video_frame,
|
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,
|
(GBoxedCopyFunc) gst_video_frame_ref,
|
||||||
(GBoxedFreeFunc) gst_video_frame_unref);
|
(GBoxedFreeFunc) gst_video_frame_unref);
|
||||||
|
g_once_init_leave (&type, _type);
|
||||||
|
}
|
||||||
|
return (GType) type;
|
||||||
|
}
|
||||||
|
|
||||||
GST_BOILERPLATE (GstBaseVideoCodec, gst_base_video_codec, GstElement,
|
GST_BOILERPLATE (GstBaseVideoCodec, gst_base_video_codec, GstElement,
|
||||||
GST_TYPE_ELEMENT);
|
GST_TYPE_ELEMENT);
|
||||||
|
|
Loading…
Reference in a new issue