diff options
author | Edgard Lima <edgard.lima@indt.org.br> | 2006-01-11 14:41:24 +0000 |
---|---|---|
committer | Edgard Lima <edgard.lima@indt.org.br> | 2006-01-11 14:41:24 +0000 |
commit | 7c8d38fbc9fa7ffb7ee2dc40e7c298497ecd6355 (patch) | |
tree | 2a2acbc0bb33888faae1af8e31854aa8f47b7808 /ext/sdl | |
parent | 404d40d1ddfbe993f42868517f05666baed5b43b (diff) | |
download | gstreamer-plugins-bad-7c8d38fbc9fa7ffb7ee2dc40e7c298497ecd6355.tar.gz |
Replaced wrong style code by GST_BOILERPLATE.
Original commit message from CVS:
Replaced wrong style code by GST_BOILERPLATE.
Diffstat (limited to 'ext/sdl')
-rw-r--r-- | ext/sdl/sdlaudiosink.c | 43 |
1 files changed, 6 insertions, 37 deletions
diff --git a/ext/sdl/sdlaudiosink.c b/ext/sdl/sdlaudiosink.c index 4465a529e..dce28ef03 100644 --- a/ext/sdl/sdlaudiosink.c +++ b/ext/sdl/sdlaudiosink.c @@ -33,9 +33,6 @@ GST_ELEMENT_DETAILS ("Audio Sink (SDLAUDIO)", "Output to a sound card via SDLAUDIO", "Edgard Lima <edgard.lima@indt.org.br>"); -static void gst_sdlaudio_sink_base_init (gpointer g_class); -static void gst_sdlaudio_sink_class_init (GstSDLAudioSinkClass * klass); -static void gst_sdlaudio_sink_init (GstSDLAudioSink * sdlaudiosink); static void gst_sdlaudio_sink_dispose (GObject * object); static void gst_sdlaudio_sink_get_property (GObject * object, guint prop_id, @@ -134,36 +131,10 @@ static GstStaticPadTemplate sdlaudiosink_sink_factory = "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]") ); -static GstElementClass *parent_class = NULL; +GST_BOILERPLATE (GstSDLAudioSink, gst_sdlaudio_sink, GstAudioSink, + GST_TYPE_AUDIO_SINK) -GType -gst_sdlaudio_sink_get_type (void) -{ - static GType sdlaudiosink_type = 0; - - if (!sdlaudiosink_type) { - static const GTypeInfo sdlaudiosink_info = { - sizeof (GstSDLAudioSinkClass), - gst_sdlaudio_sink_base_init, - NULL, - (GClassInitFunc) gst_sdlaudio_sink_class_init, - NULL, - NULL, - sizeof (GstSDLAudioSink), - 0, - (GInstanceInitFunc) gst_sdlaudio_sink_init, - }; - - sdlaudiosink_type = - g_type_register_static (GST_TYPE_AUDIO_SINK, "GstSDLAudioSink", - &sdlaudiosink_info, 0); - } - - return sdlaudiosink_type; -} - -static void -gst_sdlaudio_sink_dispose (GObject * object) + static void gst_sdlaudio_sink_dispose (GObject * object) { GstSDLAudioSink *sdlaudiosink = GST_SDLAUDIOSINK (object); @@ -175,7 +146,6 @@ gst_sdlaudio_sink_dispose (GObject * object) g_free (sdlaudiosink->buffer); } - G_OBJECT_CLASS (parent_class)->dispose (object); } static void @@ -203,8 +173,6 @@ gst_sdlaudio_sink_class_init (GstSDLAudioSinkClass * klass) gstbaseaudiosink_class = (GstBaseAudioSinkClass *) klass; gstaudiosink_class = (GstAudioSinkClass *) klass; - parent_class = g_type_class_ref (GST_TYPE_BASE_AUDIO_SINK); - gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_sdlaudio_sink_dispose); gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_sdlaudio_sink_getcaps); @@ -224,7 +192,8 @@ gst_sdlaudio_sink_class_init (GstSDLAudioSinkClass * klass) } static void -gst_sdlaudio_sink_init (GstSDLAudioSink * sdlaudiosink) +gst_sdlaudio_sink_init (GstSDLAudioSink * sdlaudiosink, + GstSDLAudioSinkClass * g_class) { GST_DEBUG ("initializing sdlaudiosink"); @@ -235,7 +204,7 @@ gst_sdlaudio_sink_init (GstSDLAudioSink * sdlaudiosink) SEMAPHORE_INIT (sdlaudiosink->semA, TRUE); - SEMAPHORE_INIT (sdlaudiosink->semB, TRUE); + SEMAPHORE_INIT (sdlaudiosink->semB, FALSE); } |