alsa: remove useless ret test

Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>
This commit is contained in:
Stéphane Cerveau 2021-03-08 10:44:42 +01:00
parent b7c1810aa3
commit 1682161355
3 changed files with 3 additions and 3 deletions

View file

@ -307,7 +307,7 @@ enum
G_DEFINE_TYPE_WITH_CODE (GstAlsaMidiSrc, gst_alsa_midi_src, GST_TYPE_PUSH_SRC,
_do_init);
#define _do_element_init \
ret |= alsa_element_init (plugin);
alsa_element_init (plugin);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (alsamidisrc, "alsamidisrc",
GST_RANK_PRIMARY, GST_TYPE_ALSA_MIDI_SRC, _do_element_init);

View file

@ -74,7 +74,7 @@ enum
};
#define _do_init \
ret |= alsa_element_init (plugin);
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,

View file

@ -72,7 +72,7 @@ enum
#define gst_alsasrc_parent_class parent_class
G_DEFINE_TYPE (GstAlsaSrc, gst_alsasrc, GST_TYPE_AUDIO_SRC);
#define _do_init \
ret |= alsa_element_init (plugin);
alsa_element_init (plugin);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (alsasrc, "alsasrc", GST_RANK_PRIMARY,
GST_TYPE_ALSA_SRC, _do_init);