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>
This commit is contained in:
Stéphane Cerveau 2021-03-16 12:55:55 +01:00 committed by GStreamer Marge Bot
parent 4f6af9e57a
commit a06be2e81a
5 changed files with 7 additions and 15 deletions

View file

@ -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;
@ -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;
}

View file

@ -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);

View file

@ -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);

View file

@ -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,

View file

@ -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,