Commit 353186ae authored by Sebastian Dröge's avatar Sebastian Dröge

ext: Use G_DEFINE_TYPE instead of GST_BOILERPLATE

parent 8336e202
......@@ -36,9 +36,10 @@ enum
};
static void gst_alsa_mixer_element_init_interfaces (GType type);
GST_BOILERPLATE_FULL (GstAlsaMixerElement, gst_alsa_mixer_element,
GstElement, GST_TYPE_ELEMENT, gst_alsa_mixer_element_init_interfaces);
#define gst_alsa_mixer_element_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstAlsaMixerElement, gst_alsa_mixer_element,
GST_TYPE_ELEMENT,
gst_alsa_mixer_element_init_interfaces (g_define_type_id));
/* massive macro that takes care of all the GstMixer stuff */
GST_IMPLEMENT_ALSA_MIXER_METHODS (GstAlsaMixerElement, gst_alsa_mixer_element);
......@@ -90,15 +91,6 @@ gst_alsa_mixer_element_init_interfaces (GType type)
gst_alsa_type_add_device_property_probe_interface (type);
}
static void
gst_alsa_mixer_element_base_init (gpointer klass)
{
gst_element_class_set_details_simple (GST_ELEMENT_CLASS (klass),
"Alsa mixer", "Generic/Audio",
"Control sound input and output levels with ALSA",
"Leif Johnson <leif@ambient.2y.net>");
}
static void
gst_alsa_mixer_element_class_init (GstAlsaMixerElementClass * klass)
{
......@@ -122,6 +114,11 @@ gst_alsa_mixer_element_class_init (GstAlsaMixerElementClass * klass)
"Human-readable name of the sound device",
DEFAULT_PROP_DEVICE_NAME, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_details_simple (element_class,
"Alsa mixer", "Generic/Audio",
"Control sound input and output levels with ALSA",
"Leif Johnson <leif@ambient.2y.net>");
element_class->change_state =
GST_DEBUG_FUNCPTR (gst_alsa_mixer_element_change_state);
}
......@@ -137,8 +134,7 @@ gst_alsa_mixer_element_finalize (GObject * obj)
}
static void
gst_alsa_mixer_element_init (GstAlsaMixerElement * this,
GstAlsaMixerElementClass * klass)
gst_alsa_mixer_element_init (GstAlsaMixerElement * this)
{
this->mixer = NULL;
this->device = g_strdup (DEFAULT_PROP_DEVICE);
......
......@@ -170,7 +170,8 @@ gst_alsa_mixer_track_new (snd_mixer_elem_t * element,
GST_LOG ("[%s] created new mixer track %p", name, track);
/* This reflects the assumptions used for GstAlsaMixerTrack */
if (!(!!(flags & GST_MIXER_TRACK_OUTPUT) ^ !!(flags & GST_MIXER_TRACK_INPUT))) {
if (!(! !(flags & GST_MIXER_TRACK_OUTPUT) ^ ! !(flags &
GST_MIXER_TRACK_INPUT))) {
GST_ERROR ("Mixer track must be either output or input!");
g_return_val_if_reached (NULL);
}
......@@ -302,7 +303,7 @@ gst_alsa_mixer_track_update (GstAlsaMixerTrack * alsa_track)
}
}
if (!!(audible) != !(track->flags & GST_MIXER_TRACK_MUTE)) {
if (! !(audible) != !(track->flags & GST_MIXER_TRACK_MUTE)) {
if (audible) {
track->flags &= ~GST_MIXER_TRACK_MUTE;
......
......@@ -69,9 +69,9 @@ enum
};
static void gst_alsasink_init_interfaces (GType type);
GST_BOILERPLATE_FULL (GstAlsaSink, gst_alsasink, GstAudioSink,
GST_TYPE_AUDIO_SINK, gst_alsasink_init_interfaces);
#define gst_alsasink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstAlsaSink, gst_alsasink,
GST_TYPE_AUDIO_SINK, gst_alsasink_init_interfaces (g_define_type_id));
static void gst_alsasink_finalise (GObject * object);
static void gst_alsasink_set_property (GObject * object,
......@@ -163,27 +163,16 @@ gst_alsasink_init_interfaces (GType type)
gst_alsa_type_add_device_property_probe_interface (type);
}
static void
gst_alsasink_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (element_class,
"Audio sink (ALSA)", "Sink/Audio",
"Output to a sound card via ALSA", "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&alsasink_sink_factory));
}
static void
gst_alsasink_class_init (GstAlsaSinkClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSinkClass *gstbasesink_class;
GstAudioSinkClass *gstaudiosink_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasesink_class = (GstBaseSinkClass *) klass;
gstaudiosink_class = (GstAudioSinkClass *) klass;
......@@ -193,6 +182,13 @@ gst_alsasink_class_init (GstAlsaSinkClass * klass)
gobject_class->get_property = gst_alsasink_get_property;
gobject_class->set_property = gst_alsasink_set_property;
gst_element_class_set_details_simple (gstelement_class,
"Audio sink (ALSA)", "Sink/Audio",
"Output to a sound card via ALSA", "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&alsasink_sink_factory));
gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_alsasink_getcaps);
gstaudiosink_class->open = GST_DEBUG_FUNCPTR (gst_alsasink_open);
......@@ -271,7 +267,7 @@ gst_alsasink_get_property (GObject * object, guint prop_id,
}
static void
gst_alsasink_init (GstAlsaSink * alsasink, GstAlsaSinkClass * g_class)
gst_alsasink_init (GstAlsaSink * alsasink)
{
GST_DEBUG_OBJECT (alsasink, "initializing alsasink");
......
......@@ -65,9 +65,9 @@ enum
};
static void gst_alsasrc_init_interfaces (GType type);
GST_BOILERPLATE_FULL (GstAlsaSrc, gst_alsasrc, GstAudioSrc,
GST_TYPE_AUDIO_SRC, gst_alsasrc_init_interfaces);
#define gst_alsasrc_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstAlsaSrc, gst_alsasrc,
GST_TYPE_AUDIO_SRC, gst_alsasrc_init_interfaces (g_define_type_id));
GST_IMPLEMENT_ALSA_MIXER_METHODS (GstAlsaSrc, gst_alsasrc_mixer);
......@@ -182,27 +182,16 @@ gst_alsasrc_init_interfaces (GType type)
gst_alsa_type_add_device_property_probe_interface (type);
}
static void
gst_alsasrc_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (element_class,
"Audio source (ALSA)", "Source/Audio",
"Read from a sound card via ALSA", "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&alsasrc_src_factory));
}
static void
gst_alsasrc_class_init (GstAlsaSrcClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSrcClass *gstbasesrc_class;
GstAudioSrcClass *gstaudiosrc_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasesrc_class = (GstBaseSrcClass *) klass;
gstaudiosrc_class = (GstAudioSrcClass *) klass;
......@@ -210,6 +199,13 @@ gst_alsasrc_class_init (GstAlsaSrcClass * klass)
gobject_class->get_property = gst_alsasrc_get_property;
gobject_class->set_property = gst_alsasrc_set_property;
gst_element_class_set_details_simple (gstelement_class,
"Audio source (ALSA)", "Source/Audio",
"Read from a sound card via ALSA", "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&alsasrc_src_factory));
gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_alsasrc_getcaps);
gstaudiosrc_class->open = GST_DEBUG_FUNCPTR (gst_alsasrc_open);
......@@ -287,7 +283,7 @@ gst_alsasrc_get_property (GObject * object, guint prop_id,
}
static void
gst_alsasrc_init (GstAlsaSrc * alsasrc, GstAlsaSrcClass * g_class)
gst_alsasrc_init (GstAlsaSrc * alsasrc)
{
GST_DEBUG_OBJECT (alsasrc, "initializing");
......
......@@ -56,8 +56,8 @@ enum
GST_DEBUG_CATEGORY_STATIC (gst_cd_paranoia_src_debug);
#define GST_CAT_DEFAULT gst_cd_paranoia_src_debug
GST_BOILERPLATE (GstCdParanoiaSrc, gst_cd_paranoia_src, GstCddaBaseSrc,
GST_TYPE_CDDA_BASE_SRC);
#define gst_cd_paranoia_src_parent_class parent_class
G_DEFINE_TYPE (GstCdParanoiaSrc, gst_cd_paranoia_src, GST_TYPE_CDDA_BASE_SRC);
static void gst_cd_paranoia_src_finalize (GObject * obj);
static void gst_cd_paranoia_src_get_property (GObject * object, guint prop_id,
......@@ -103,18 +103,7 @@ gst_cd_paranoia_mode_get_type (void)
}
static void
gst_cd_paranoia_src_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (element_class,
"CD Audio (cdda) Source, Paranoia IV", "Source/File",
"Read audio from CD in paranoid mode",
"Erik Walthinsen <omega@cse.ogi.edu>, Wim Taymans <wim@fluendo.com>");
}
static void
gst_cd_paranoia_src_init (GstCdParanoiaSrc * src, GstCdParanoiaSrcClass * klass)
gst_cd_paranoia_src_init (GstCdParanoiaSrc * src)
{
src->d = NULL;
src->p = NULL;
......@@ -131,12 +120,18 @@ static void
gst_cd_paranoia_src_class_init (GstCdParanoiaSrcClass * klass)
{
GstCddaBaseSrcClass *cddabasesrc_class = GST_CDDA_BASE_SRC_CLASS (klass);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = gst_cd_paranoia_src_set_property;
gobject_class->get_property = gst_cd_paranoia_src_get_property;
gobject_class->finalize = gst_cd_paranoia_src_finalize;
gst_element_class_set_details_simple (element_class,
"CD Audio (cdda) Source, Paranoia IV", "Source/File",
"Read audio from CD in paranoid mode",
"Erik Walthinsen <omega@cse.ogi.edu>, Wim Taymans <wim@fluendo.com>");
cddabasesrc_class->open = gst_cd_paranoia_src_open;
cddabasesrc_class->close = gst_cd_paranoia_src_close;
cddabasesrc_class->read_sector = gst_cd_paranoia_src_read_sector;
......
......@@ -33,8 +33,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
GST_BOILERPLATE (GstGioBaseSink, gst_gio_base_sink, GstBaseSink,
GST_TYPE_BASE_SINK);
#define gst_gio_base_sink_parent_class parent_class
G_DEFINE_TYPE (GstGioBaseSink, gst_gio_base_sink, GST_TYPE_BASE_SINK);
static void gst_gio_base_sink_finalize (GObject * object);
static gboolean gst_gio_base_sink_start (GstBaseSink * base_sink);
......@@ -47,26 +47,21 @@ static GstFlowReturn gst_gio_base_sink_render (GstBaseSink * base_sink,
GstBuffer * buffer);
static gboolean gst_gio_base_sink_query (GstPad * pad, GstQuery * query);
static void
gst_gio_base_sink_base_init (gpointer gclass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
GST_DEBUG_CATEGORY_INIT (gst_gio_base_sink_debug, "gio_base_sink", 0,
"GIO base sink");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_factory));
}
static void
gst_gio_base_sink_class_init (GstGioBaseSinkClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *gstelement_class = (GstElementClass *) klass;
GstBaseSinkClass *gstbasesink_class = (GstBaseSinkClass *) klass;
GST_DEBUG_CATEGORY_INIT (gst_gio_base_sink_debug, "gio_base_sink", 0,
"GIO base sink");
gobject_class->finalize = gst_gio_base_sink_finalize;
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sink_factory));
gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_gio_base_sink_start);
gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_gio_base_sink_stop);
gstbasesink_class->unlock = GST_DEBUG_FUNCPTR (gst_gio_base_sink_unlock);
......@@ -77,7 +72,7 @@ gst_gio_base_sink_class_init (GstGioBaseSinkClass * klass)
}
static void
gst_gio_base_sink_init (GstGioBaseSink * sink, GstGioBaseSinkClass * gclass)
gst_gio_base_sink_init (GstGioBaseSink * sink)
{
gst_pad_set_query_function (GST_BASE_SINK_PAD (sink),
GST_DEBUG_FUNCPTR (gst_gio_base_sink_query));
......
......@@ -35,8 +35,8 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
GST_BOILERPLATE (GstGioBaseSrc, gst_gio_base_src, GstBaseSrc,
GST_TYPE_BASE_SRC);
#define gst_gio_base_src_parent_class parent_class
G_DEFINE_TYPE (GstGioBaseSrc, gst_gio_base_src, GST_TYPE_BASE_SRC);
static void gst_gio_base_src_finalize (GObject * object);
......@@ -53,26 +53,21 @@ static GstFlowReturn gst_gio_base_src_create (GstBaseSrc * base_src,
static gboolean gst_gio_base_src_query (GstBaseSrc * base_src,
GstQuery * query);
static void
gst_gio_base_src_base_init (gpointer gclass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
GST_DEBUG_CATEGORY_INIT (gst_gio_base_src_debug, "gio_base_src", 0,
"GIO base source");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_factory));
}
static void
gst_gio_base_src_class_init (GstGioBaseSrcClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *gstelement_class = (GstElementClass *) klass;
GstBaseSrcClass *gstbasesrc_class = (GstBaseSrcClass *) klass;
GST_DEBUG_CATEGORY_INIT (gst_gio_base_src_debug, "gio_base_src", 0,
"GIO base source");
gobject_class->finalize = gst_gio_base_src_finalize;
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&src_factory));
gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_gio_base_src_start);
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_gio_base_src_stop);
gstbasesrc_class->get_size = GST_DEBUG_FUNCPTR (gst_gio_base_src_get_size);
......@@ -88,7 +83,7 @@ gst_gio_base_src_class_init (GstGioBaseSrcClass * klass)
}
static void
gst_gio_base_src_init (GstGioBaseSrc * src, GstGioBaseSrcClass * gclass)
gst_gio_base_src_init (GstGioBaseSrc * src)
{
src->cancel = g_cancellable_new ();
}
......
......@@ -92,8 +92,9 @@ enum
PROP_FILE
};
GST_BOILERPLATE_FULL (GstGioSink, gst_gio_sink, GstGioBaseSink,
GST_TYPE_GIO_BASE_SINK, gst_gio_uri_handler_do_init);
#define gst_gio_sink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstGioSink, gst_gio_sink, GST_TYPE_GIO_BASE_SINK,
gst_gio_uri_handler_do_init (g_define_type_id));
static void gst_gio_sink_finalize (GObject * object);
static void gst_gio_sink_set_property (GObject * object, guint prop_id,
......@@ -102,26 +103,15 @@ static void gst_gio_sink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static GOutputStream *gst_gio_sink_get_stream (GstGioBaseSink * base_sink);
static void
gst_gio_sink_base_init (gpointer gclass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
GST_DEBUG_CATEGORY_INIT (gst_gio_sink_debug, "gio_sink", 0, "GIO sink");
gst_element_class_set_details_simple (element_class, "GIO sink",
"Sink/File",
"Write to any GIO-supported location",
"Ren\xc3\xa9 Stadler <mail@renestadler.de>, "
"Sebastian Dröge <sebastian.droege@collabora.co.uk>");
}
static void
gst_gio_sink_class_init (GstGioSinkClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *gstelement_class = (GstElementClass *) klass;
GstGioBaseSinkClass *gstgiobasesink_class = (GstGioBaseSinkClass *) klass;
GST_DEBUG_CATEGORY_INIT (gst_gio_sink_debug, "gio_sink", 0, "GIO sink");
gobject_class->finalize = gst_gio_sink_finalize;
gobject_class->set_property = gst_gio_sink_set_property;
gobject_class->get_property = gst_gio_sink_get_property;
......@@ -141,13 +131,19 @@ gst_gio_sink_class_init (GstGioSinkClass * klass)
g_param_spec_object ("file", "File", "GFile to write to",
G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_details_simple (gstelement_class, "GIO sink",
"Sink/File",
"Write to any GIO-supported location",
"Ren\xc3\xa9 Stadler <mail@renestadler.de>, "
"Sebastian Dröge <sebastian.droege@collabora.co.uk>");
gstgiobasesink_class->get_stream =
GST_DEBUG_FUNCPTR (gst_gio_sink_get_stream);
gstgiobasesink_class->close_on_stop = TRUE;
}
static void
gst_gio_sink_init (GstGioSink * sink, GstGioSinkClass * gclass)
gst_gio_sink_init (GstGioSink * sink)
{
}
......
......@@ -83,8 +83,9 @@ enum
PROP_FILE
};
GST_BOILERPLATE_FULL (GstGioSrc, gst_gio_src, GstGioBaseSrc,
GST_TYPE_GIO_BASE_SRC, gst_gio_uri_handler_do_init);
#define gst_gio_src_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstGioSrc, gst_gio_src,
GST_TYPE_GIO_BASE_SRC, gst_gio_uri_handler_do_init (g_define_type_id));
static void gst_gio_src_finalize (GObject * object);
......@@ -97,27 +98,16 @@ static GInputStream *gst_gio_src_get_stream (GstGioBaseSrc * bsrc);
static gboolean gst_gio_src_check_get_range (GstBaseSrc * base_src);
static void
gst_gio_src_base_init (gpointer gclass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
GST_DEBUG_CATEGORY_INIT (gst_gio_src_debug, "gio_src", 0, "GIO source");
gst_element_class_set_details_simple (element_class, "GIO source",
"Source/File",
"Read from any GIO-supported location",
"Ren\xc3\xa9 Stadler <mail@renestadler.de>, "
"Sebastian Dröge <sebastian.droege@collabora.co.uk>");
}
static void
gst_gio_src_class_init (GstGioSrcClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *gstelement_class = (GstElementClass *) klass;
GstBaseSrcClass *gstbasesrc_class = (GstBaseSrcClass *) klass;
GstGioBaseSrcClass *gstgiobasesrc_class = (GstGioBaseSrcClass *) klass;
GST_DEBUG_CATEGORY_INIT (gst_gio_src_debug, "gio_src", 0, "GIO source");
gobject_class->finalize = gst_gio_src_finalize;
gobject_class->set_property = gst_gio_src_set_property;
gobject_class->get_property = gst_gio_src_get_property;
......@@ -137,6 +127,12 @@ gst_gio_src_class_init (GstGioSrcClass * klass)
g_param_spec_object ("file", "File", "GFile to read from",
G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_details_simple (gstelement_class, "GIO source",
"Source/File",
"Read from any GIO-supported location",
"Ren\xc3\xa9 Stadler <mail@renestadler.de>, "
"Sebastian Dröge <sebastian.droege@collabora.co.uk>");
gstbasesrc_class->check_get_range =
GST_DEBUG_FUNCPTR (gst_gio_src_check_get_range);
......@@ -145,7 +141,7 @@ gst_gio_src_class_init (GstGioSrcClass * klass)
}
static void
gst_gio_src_init (GstGioSrc * src, GstGioSrcClass * gclass)
gst_gio_src_init (GstGioSrc * src)
{
}
......
......@@ -83,8 +83,8 @@ enum
PROP_STREAM
};
GST_BOILERPLATE (GstGioStreamSink, gst_gio_stream_sink, GstGioBaseSink,
GST_TYPE_GIO_BASE_SINK);
#define gst_gio_stream_sink_parent_class parent_class
G_DEFINE_TYPE (GstGioStreamSink, gst_gio_stream_sink, GST_TYPE_GIO_BASE_SINK);
static void gst_gio_stream_sink_finalize (GObject * object);
static void gst_gio_stream_sink_set_property (GObject * object, guint prop_id,
......@@ -93,26 +93,16 @@ static void gst_gio_stream_sink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static GOutputStream *gst_gio_stream_sink_get_stream (GstGioBaseSink * bsink);
static void
gst_gio_stream_sink_base_init (gpointer gclass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
GST_DEBUG_CATEGORY_INIT (gst_gio_stream_sink_debug, "gio_stream_sink", 0,
"GIO stream sink");
gst_element_class_set_details_simple (element_class, "GIO stream sink",
"Sink",
"Write to any GIO stream",
"Sebastian Dröge <sebastian.droege@collabora.co.uk>");
}
static void
gst_gio_stream_sink_class_init (GstGioStreamSinkClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *gstelement_class = (GstElementClass *) klass;
GstGioBaseSinkClass *ggbsink_class = (GstGioBaseSinkClass *) klass;
GST_DEBUG_CATEGORY_INIT (gst_gio_stream_sink_debug, "gio_stream_sink", 0,
"GIO stream sink");
gobject_class->finalize = gst_gio_stream_sink_finalize;
gobject_class->set_property = gst_gio_stream_sink_set_property;
gobject_class->get_property = gst_gio_stream_sink_get_property;
......@@ -121,13 +111,17 @@ gst_gio_stream_sink_class_init (GstGioStreamSinkClass * klass)
g_param_spec_object ("stream", "Stream", "Stream to write to",
G_TYPE_OUTPUT_STREAM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_details_simple (gstelement_class, "GIO stream sink",
"Sink",
"Write to any GIO stream",
"Sebastian Dröge <sebastian.droege@collabora.co.uk>");
ggbsink_class->get_stream =
GST_DEBUG_FUNCPTR (gst_gio_stream_sink_get_stream);
}
static void
gst_gio_stream_sink_init (GstGioStreamSink * sink,
GstGioStreamSinkClass * gclass)
gst_gio_stream_sink_init (GstGioStreamSink * sink)
{
}
......
......@@ -77,8 +77,8 @@ enum
PROP_STREAM
};
GST_BOILERPLATE (GstGioStreamSrc, gst_gio_stream_src, GstGioBaseSrc,
GST_TYPE_GIO_BASE_SRC);
#define gst_gio_stream_src_parent_class parent_class
G_DEFINE_TYPE (GstGioStreamSrc, gst_gio_stream_src, GST_TYPE_GIO_BASE_SRC);
static void gst_gio_stream_src_finalize (GObject * object);
static void gst_gio_stream_src_set_property (GObject * object, guint prop_id,
......@@ -87,26 +87,16 @@ static void gst_gio_stream_src_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static GInputStream *gst_gio_stream_src_get_stream (GstGioBaseSrc * bsrc);
static void
gst_gio_stream_src_base_init (gpointer gclass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
GST_DEBUG_CATEGORY_INIT (gst_gio_stream_src_debug, "gio_stream_src", 0,
"GIO source");
gst_element_class_set_details_simple (element_class, "GIO stream source",
"Source",
"Read from any GIO stream",
"Sebastian Dröge <sebastian.droege@collabora.co.uk>");
}
static void
gst_gio_stream_src_class_init (GstGioStreamSrcClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *gstelement_class = (GstElementClass *) klass;
GstGioBaseSrcClass *gstgiobasesrc_class = (GstGioBaseSrcClass *) klass;
GST_DEBUG_CATEGORY_INIT (gst_gio_stream_src_debug, "gio_stream_src", 0,
"GIO source");
gobject_class->finalize = gst_gio_stream_src_finalize;
gobject_class->set_property = gst_gio_stream_src_set_property;
gobject_class->get_property = gst_gio_stream_src_get_property;
......@@ -115,12 +105,17 @@ gst_gio_stream_src_class_init (GstGioStreamSrcClass * klass)
g_param_spec_object ("stream", "Stream", "Stream to read from",
G_TYPE_INPUT_STREAM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_details_simple (gstelement_class, "GIO stream source",
"Source",
"Read from any GIO stream",
"Sebastian Dröge <sebastian.droege@collabora.co.uk>");
gstgiobasesrc_class->get_stream =
GST_DEBUG_FUNCPTR (gst_gio_stream_src_get_stream);
}
static void
gst_gio_stream_src_init (GstGioStreamSrc * src, GstGioStreamSrcClass * gclass)
gst_gio_stream_src_init (GstGioStreamSrc * src)
{
}
......
......@@ -123,21 +123,9 @@ gst_gnome_vfs_sink_do_init (GType type)
"Gnome VFS sink element");
}
GST_BOILERPLATE_FULL (GstGnomeVFSSink, gst_gnome_vfs_sink, GstBaseSink,
GST_TYPE_BASE_SINK, gst_gnome_vfs_sink_do_init);
static void
gst_gnome_vfs_sink_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sinktemplate));