Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
alsa: element_init returns void
no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
  • Loading branch information
Stéphane Cerveau authored and GStreamer Marge Bot committed Mar 16, 2021
1 parent 4f6af9e commit a06be2e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
3 changes: 1 addition & 2 deletions ext/alsa/gstalsaelement.c
Expand Up @@ -59,7 +59,7 @@ gst_alsa_error_wrapper (const char *file, int line, const char *function,
GST_DEVICE_PROVIDER_REGISTER_DEFINE (alsadeviceprovider, "alsadeviceprovider",
GST_RANK_SECONDARY, GST_TYPE_ALSA_DEVICE_PROVIDER);

gboolean
void
alsa_element_init (GstPlugin * plugin)
{
static gsize res = FALSE;
Expand All @@ -76,5 +76,4 @@ alsa_element_init (GstPlugin * plugin)
GST_WARNING ("failed to set alsa error handler");
g_once_init_leave (&res, TRUE);
}
return res;
}
2 changes: 1 addition & 1 deletion ext/alsa/gstalsaelements.h
Expand Up @@ -24,7 +24,7 @@

G_BEGIN_DECLS

G_GNUC_INTERNAL gboolean alsa_element_init (GstPlugin * plugin);
G_GNUC_INTERNAL void alsa_element_init (GstPlugin * plugin);

GST_ELEMENT_REGISTER_DECLARE (alsasrc);
GST_ELEMENT_REGISTER_DECLARE (alsasink);
Expand Down
9 changes: 3 additions & 6 deletions ext/alsa/gstalsamidisrc.c
Expand Up @@ -301,15 +301,12 @@ enum
PROP_LAST,
};

#define _do_init \
GST_DEBUG_CATEGORY_INIT (gst_alsa_midi_src_debug, "alsamidisrc", 0, "alsamidisrc element");
#define gst_alsa_midi_src_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstAlsaMidiSrc, gst_alsa_midi_src, GST_TYPE_PUSH_SRC,
_do_init);
#define _do_element_init \
alsa_element_init (plugin);
GST_DEBUG_CATEGORY_INIT (gst_alsa_midi_src_debug, "alsamidisrc", 0,
"alsamidisrc element"));
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (alsamidisrc, "alsamidisrc",
GST_RANK_PRIMARY, GST_TYPE_ALSA_MIDI_SRC, _do_element_init);
GST_RANK_PRIMARY, GST_TYPE_ALSA_MIDI_SRC, alsa_element_init (plugin));

static void gst_alsa_midi_src_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
Expand Down
4 changes: 1 addition & 3 deletions ext/alsa/gstalsasink.c
Expand Up @@ -73,12 +73,10 @@ enum
PROP_LAST
};

#define _do_init \
alsa_element_init (plugin);
#define gst_alsasink_parent_class parent_class
G_DEFINE_TYPE (GstAlsaSink, gst_alsasink, GST_TYPE_AUDIO_SINK);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (alsasink, "alsasink", GST_RANK_PRIMARY,
GST_TYPE_ALSA_SINK, _do_init);
GST_TYPE_ALSA_SINK, alsa_element_init (plugin));

static void gst_alsasink_finalise (GObject * object);
static void gst_alsasink_set_property (GObject * object,
Expand Down
4 changes: 1 addition & 3 deletions ext/alsa/gstalsasrc.c
Expand Up @@ -71,10 +71,8 @@ enum

#define gst_alsasrc_parent_class parent_class
G_DEFINE_TYPE (GstAlsaSrc, gst_alsasrc, GST_TYPE_AUDIO_SRC);
#define _do_init \
alsa_element_init (plugin);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (alsasrc, "alsasrc", GST_RANK_PRIMARY,
GST_TYPE_ALSA_SRC, _do_init);
GST_TYPE_ALSA_SRC, alsa_element_init (plugin));

static void gst_alsasrc_finalize (GObject * object);
static void gst_alsasrc_set_property (GObject * object,
Expand Down

0 comments on commit a06be2e

Please sign in to comment.