static void gst_tag_demux_init (GstTagDemux * obj, GstTagDemuxClass * klass);
static gpointer parent_class; /* NULL */
+static gint private_offset = 0;
/* Cannot use boilerplate macros here because we want the abstract flag */
GType
object_type = g_type_register_static (GST_TYPE_ELEMENT,
"GstTagDemux", &object_info, G_TYPE_FLAG_ABSTRACT);
+
+ private_offset =
+ g_type_add_instance_private (object_type, sizeof (GstTagDemuxPrivate));
}
return object_type;
}
+static inline GstTagDemuxPrivate *
+gst_tag_demux_get_instance_private (GstTagDemux * self)
+{
+ return (G_STRUCT_MEMBER_P (self, private_offset));
+}
+
static void
gst_tag_demux_base_init (gpointer klass)
{
element_class->change_state = GST_DEBUG_FUNCPTR (gst_tag_demux_change_state);
- g_type_class_add_private (klass, sizeof (GstTagDemuxPrivate));
+ if (private_offset != 0)
+ g_type_class_adjust_private_offset (klass, &private_offset);
/* subclasses must set at least one of these */
tagdemux_class->min_start_size = 0;
GstElementClass *element_klass = GST_ELEMENT_CLASS (gclass);
GstPadTemplate *tmpl;
- demux->priv = g_type_instance_get_private ((GTypeInstance *) demux,
- GST_TYPE_TAG_DEMUX);
+ demux->priv = gst_tag_demux_get_instance_private (demux);
/* sink pad */
tmpl = gst_element_class_get_pad_template (element_klass, "sink");
#define GST_CAT_DEFAULT gst_tag_mux_debug
static GstElementClass *parent_class;
+static gint private_offset = 0;
static void gst_tag_mux_class_init (GstTagMuxClass * klass);
static void gst_tag_mux_init (GstTagMux * mux, GstTagMuxClass * mux_class);
(GClassInitFunc) gst_tag_mux_class_init, sizeof (GstTagMux),
(GInstanceInitFunc) gst_tag_mux_init, G_TYPE_FLAG_ABSTRACT);
+ private_offset =
+ g_type_add_instance_private (_type, sizeof (GstTagMuxPrivate));
+
g_type_add_interface_static (_type, GST_TYPE_TAG_SETTER, &interface_info);
g_once_init_leave (&tag_mux_type, _type);
return tag_mux_type;
}
+static inline GstTagMuxPrivate *
+gst_tag_mux_get_instance_private (GstTagMux * self)
+{
+ return (G_STRUCT_MEMBER_P (self, private_offset));
+}
+
static void
gst_tag_mux_finalize (GObject * obj)
{
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_tag_mux_finalize);
gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_tag_mux_change_state);
- g_type_class_add_private (klass, sizeof (GstTagMuxPrivate));
+ if (private_offset != 0)
+ g_type_class_adjust_private_offset (klass, &private_offset);
GST_DEBUG_CATEGORY_INIT (gst_tag_mux_debug, "tagmux", 0,
"tag muxer base class");
GstElementClass *element_klass = GST_ELEMENT_CLASS (mux_class);
GstPadTemplate *tmpl;
- mux->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (mux, GST_TYPE_TAG_MUX, GstTagMuxPrivate);
+ mux->priv = gst_tag_mux_get_instance_private (mux);
/* pad through which data comes in to the element */
tmpl = gst_element_class_get_pad_template (element_klass, "sink");