mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
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:
parent
b7c1810aa3
commit
1682161355
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue