mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
matroska-mux: Use G_DEFINE_TYPE() to register the pad instead of manually registering it
This commit is contained in:
parent
ec05d3b6d8
commit
7a909917b5
1 changed files with 4 additions and 16 deletions
|
@ -358,22 +358,10 @@ typedef struct
|
||||||
gboolean frame_duration_user;
|
gboolean frame_duration_user;
|
||||||
} GstMatroskamuxPad;
|
} GstMatroskamuxPad;
|
||||||
|
|
||||||
static void gst_matroskamux_pad_class_init (GstPadClass * klass);
|
typedef GstPadClass GstMatroskamuxPadClass;
|
||||||
|
|
||||||
static GType
|
GType gst_matroskamux_pad_get_type (void);
|
||||||
gst_matroskamux_pad_get_type (void)
|
G_DEFINE_TYPE (GstMatroskamuxPad, gst_matroskamux_pad, GST_TYPE_PAD);
|
||||||
{
|
|
||||||
static GType type = 0;
|
|
||||||
|
|
||||||
if (g_once_init_enter (&type)) {
|
|
||||||
GType tmp = g_type_register_static_simple (GST_TYPE_PAD,
|
|
||||||
g_intern_static_string ("GstMatroskamuxPad"), sizeof (GstPadClass),
|
|
||||||
(GClassInitFunc) gst_matroskamux_pad_class_init,
|
|
||||||
sizeof (GstMatroskamuxPad), NULL, 0);
|
|
||||||
g_once_init_leave (&type, tmp);
|
|
||||||
}
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define GST_TYPE_MATROSKAMUX_PAD (gst_matroskamux_pad_get_type())
|
#define GST_TYPE_MATROSKAMUX_PAD (gst_matroskamux_pad_get_type())
|
||||||
#define GST_MATROSKAMUX_PAD(pad) (G_TYPE_CHECK_INSTANCE_CAST((pad),GST_TYPE_MATROSKAMUX_PAD,GstMatroskamuxPad))
|
#define GST_MATROSKAMUX_PAD(pad) (G_TYPE_CHECK_INSTANCE_CAST((pad),GST_TYPE_MATROSKAMUX_PAD,GstMatroskamuxPad))
|
||||||
|
@ -414,7 +402,7 @@ gst_matroskamux_pad_set_property (GObject * object, guint prop_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_matroskamux_pad_class_init (GstPadClass * klass)
|
gst_matroskamux_pad_class_init (GstMatroskamuxPadClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class = (GObjectClass *) klass;
|
GObjectClass *gobject_class = (GObjectClass *) klass;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue