mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
resindvd: Switch GST_BOILERPLATE to G_DEFINE_TYPE for no real reason.
This commit is contained in:
parent
8244a3d688
commit
15792ae809
2 changed files with 14 additions and 26 deletions
|
@ -60,7 +60,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
GST_STATIC_CAPS ("ANY")
|
||||
);
|
||||
|
||||
GST_BOILERPLATE (RsnAudioMunge, rsn_audiomunge, GstElement, GST_TYPE_ELEMENT);
|
||||
G_DEFINE_TYPE (RsnAudioMunge, rsn_audiomunge, GST_TYPE_ELEMENT);
|
||||
|
||||
static void rsn_audiomunge_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
|
@ -75,15 +75,16 @@ static GstStateChangeReturn
|
|||
rsn_audiomunge_change_state (GstElement * element, GstStateChange transition);
|
||||
|
||||
static void
|
||||
rsn_audiomunge_base_init (gpointer gclass)
|
||||
rsn_audiomunge_class_init (RsnAudioMungeClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class = (GObjectClass *) (klass);
|
||||
GstElementClass *element_class = (GstElementClass *) (klass);
|
||||
static GstElementDetails element_details = {
|
||||
"RsnAudioMunge",
|
||||
"Audio/Filter",
|
||||
"Resin DVD audio stream regulator",
|
||||
"Jan Schmidt <thaytan@noraisin.net>"
|
||||
};
|
||||
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (rsn_audiomunge_debug, "rsn_audiomunge",
|
||||
0, "Resin audio stream regulator");
|
||||
|
@ -94,25 +95,15 @@ rsn_audiomunge_base_init (gpointer gclass)
|
|||
gst_static_pad_template_get (&sink_template));
|
||||
|
||||
gst_element_class_set_details (element_class, &element_details);
|
||||
}
|
||||
|
||||
static void
|
||||
rsn_audiomunge_class_init (RsnAudioMungeClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GstElementClass *gstelement_class;
|
||||
|
||||
gobject_class = (GObjectClass *) klass;
|
||||
gstelement_class = (GstElementClass *) klass;
|
||||
|
||||
gobject_class->set_property = rsn_audiomunge_set_property;
|
||||
gobject_class->get_property = rsn_audiomunge_get_property;
|
||||
|
||||
gstelement_class->change_state = rsn_audiomunge_change_state;
|
||||
element_class->change_state = rsn_audiomunge_change_state;
|
||||
}
|
||||
|
||||
static void
|
||||
rsn_audiomunge_init (RsnAudioMunge * munge, RsnAudioMungeClass * gclass)
|
||||
rsn_audiomunge_init (RsnAudioMunge * munge)
|
||||
{
|
||||
munge->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
|
||||
gst_pad_set_setcaps_function (munge->sinkpad,
|
||||
|
@ -380,7 +371,9 @@ rsn_audiomunge_change_state (GstElement * element, GstStateChange transition)
|
|||
if (transition == GST_STATE_CHANGE_READY_TO_PAUSED)
|
||||
rsn_audiomunge_reset (munge);
|
||||
|
||||
ret = parent_class->change_state (element, transition);
|
||||
ret =
|
||||
GST_ELEMENT_CLASS (rsn_audiomunge_parent_class)->change_state (element,
|
||||
transition);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -26,19 +26,13 @@
|
|||
|
||||
#include "rsnwrappedbuffer.h"
|
||||
|
||||
GST_BOILERPLATE (RsnWrappedBuffer, rsn_wrappedbuffer,
|
||||
GstBuffer, GST_TYPE_BUFFER);
|
||||
G_DEFINE_TYPE (RsnWrappedBuffer, rsn_wrappedbuffer, GST_TYPE_BUFFER);
|
||||
|
||||
static gboolean
|
||||
rsn_wrapped_buffer_default_release (GstElement * owner, RsnWrappedBuffer * buf);
|
||||
|
||||
static void rsn_wrapped_buffer_finalize (RsnWrappedBuffer * wrap_buf);
|
||||
|
||||
static void
|
||||
rsn_wrappedbuffer_base_init (gpointer gclass)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
rsn_wrappedbuffer_class_init (RsnWrappedBufferClass * klass)
|
||||
{
|
||||
|
@ -49,9 +43,9 @@ rsn_wrappedbuffer_class_init (RsnWrappedBufferClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
rsn_wrappedbuffer_init (RsnWrappedBuffer * buf, RsnWrappedBufferClass * gclass)
|
||||
rsn_wrappedbuffer_init (RsnWrappedBuffer * self)
|
||||
{
|
||||
buf->release = rsn_wrapped_buffer_default_release;
|
||||
self->release = rsn_wrapped_buffer_default_release;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -64,7 +58,8 @@ rsn_wrapped_buffer_finalize (RsnWrappedBuffer * wrap_buf)
|
|||
return;
|
||||
}
|
||||
|
||||
GST_MINI_OBJECT_CLASS (parent_class)->finalize (GST_MINI_OBJECT (wrap_buf));
|
||||
GST_MINI_OBJECT_CLASS (rsn_wrappedbuffer_parent_class)->finalize
|
||||
(GST_MINI_OBJECT (wrap_buf));
|
||||
}
|
||||
|
||||
RsnWrappedBuffer *
|
||||
|
|
Loading…
Reference in a new issue