mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
ext/ogg/gstoggdemux.c: Use G_DEFINE_TYPE for the OggPad to get some threadsafe type init from glib.
Original commit message from CVS: * ext/ogg/gstoggdemux.c: (gst_ogg_pad_class_init), (gst_ogg_pad_dispose), (gst_ogg_pad_finalize): Use G_DEFINE_TYPE for the OggPad to get some threadsafe type init from glib.
This commit is contained in:
parent
a4493595a6
commit
1ab0f8da50
2 changed files with 10 additions and 29 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-12-10 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_class_init),
|
||||
(gst_ogg_pad_dispose), (gst_ogg_pad_finalize):
|
||||
Use G_DEFINE_TYPE for the OggPad to get some threadsafe type
|
||||
init from glib.
|
||||
|
||||
2008-12-10 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
Patch by: Luis Menina <liberforce at freeside dot fr>
|
||||
|
|
|
@ -128,31 +128,7 @@ static GstClockTime gst_annodex_granule_to_time (gint64 granulepos,
|
|||
static GstFlowReturn gst_ogg_demux_combine_flows (GstOggDemux * ogg,
|
||||
GstOggPad * pad, GstFlowReturn ret);
|
||||
|
||||
static GstPadClass *ogg_pad_parent_class = NULL;
|
||||
|
||||
static GType
|
||||
gst_ogg_pad_get_type (void)
|
||||
{
|
||||
static GType ogg_pad_type = 0;
|
||||
|
||||
if (!ogg_pad_type) {
|
||||
static const GTypeInfo ogg_pad_info = {
|
||||
sizeof (GstOggPadClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) gst_ogg_pad_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof (GstOggPad),
|
||||
0,
|
||||
(GInstanceInitFunc) gst_ogg_pad_init,
|
||||
};
|
||||
|
||||
ogg_pad_type =
|
||||
g_type_register_static (GST_TYPE_PAD, "GstOggPad", &ogg_pad_info, 0);
|
||||
}
|
||||
return ogg_pad_type;
|
||||
}
|
||||
G_DEFINE_TYPE (GstOggPad, gst_ogg_pad, GST_TYPE_PAD);
|
||||
|
||||
static void
|
||||
gst_ogg_pad_class_init (GstOggPadClass * klass)
|
||||
|
@ -161,8 +137,6 @@ gst_ogg_pad_class_init (GstOggPadClass * klass)
|
|||
|
||||
gobject_class = (GObjectClass *) klass;
|
||||
|
||||
ogg_pad_parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
gobject_class->dispose = gst_ogg_pad_dispose;
|
||||
gobject_class->finalize = gst_ogg_pad_finalize;
|
||||
}
|
||||
|
@ -224,7 +198,7 @@ gst_ogg_pad_dispose (GObject * object)
|
|||
|
||||
ogg_stream_reset (&pad->stream);
|
||||
|
||||
G_OBJECT_CLASS (ogg_pad_parent_class)->dispose (object);
|
||||
G_OBJECT_CLASS (gst_ogg_pad_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -234,7 +208,7 @@ gst_ogg_pad_finalize (GObject * object)
|
|||
|
||||
ogg_stream_clear (&pad->stream);
|
||||
|
||||
G_OBJECT_CLASS (ogg_pad_parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (gst_ogg_pad_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
Loading…
Reference in a new issue