From: Stéphane Cerveau Date: Fri, 12 Feb 2021 08:56:36 +0000 (+0100) Subject: jack: allow per feature registration X-Git-Tag: 1.19.3~509^2~240 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a633f4b12e020d03a0df9a2dc5b2f0e43a7ff20d;p=platform%2Fupstream%2Fgstreamer.git jack: allow per feature registration Split plugin into features including dynamic types which can be indiviually registered during a static build. More details here: https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199 https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661 Part-of: --- diff --git a/ext/jack/gstjack.c b/ext/jack/gstjack.c index fdd507d..06c3ad0 100644 --- a/ext/jack/gstjack.c +++ b/ext/jack/gstjack.c @@ -22,8 +22,6 @@ #endif #include "gstjack.h" -#include "gstjackaudiosrc.h" -#include "gstjackaudiosink.h" GType gst_jack_connect_get_type (void) @@ -100,14 +98,12 @@ gst_jack_client_get_type (void) static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "jackaudiosrc", GST_RANK_PRIMARY, - GST_TYPE_JACK_AUDIO_SRC)) - return FALSE; - if (!gst_element_register (plugin, "jackaudiosink", GST_RANK_PRIMARY, - GST_TYPE_JACK_AUDIO_SINK)) - return FALSE; - - return TRUE; + gboolean ret = FALSE; + + ret |= GST_ELEMENT_REGISTER (jackaudiosrc, plugin); + ret |= GST_ELEMENT_REGISTER (jackaudiosink, plugin); + + return ret; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/jack/gstjack.h b/ext/jack/gstjack.h index 15b040e..ad238fd 100644 --- a/ext/jack/gstjack.h +++ b/ext/jack/gstjack.h @@ -25,6 +25,9 @@ #include #include +GST_ELEMENT_REGISTER_DECLARE (jackaudiosrc); +GST_ELEMENT_REGISTER_DECLARE (jackaudiosink); + /** * GstJackConnect: * @GST_JACK_CONNECT_NONE: Don't automatically connect to physical ports. diff --git a/ext/jack/gstjackaudiosink.c b/ext/jack/gstjackaudiosink.c index 6e8d04a..2e14ce9 100644 --- a/ext/jack/gstjackaudiosink.c +++ b/ext/jack/gstjackaudiosink.c @@ -700,6 +700,8 @@ enum #define gst_jack_audio_sink_parent_class parent_class G_DEFINE_TYPE (GstJackAudioSink, gst_jack_audio_sink, GST_TYPE_AUDIO_BASE_SINK); +GST_ELEMENT_REGISTER_DEFINE (jackaudiosink, "jackaudiosink", + GST_RANK_PRIMARY, GST_TYPE_JACK_AUDIO_SINK); static void gst_jack_audio_sink_dispose (GObject * object); static void gst_jack_audio_sink_set_property (GObject * object, guint prop_id, diff --git a/ext/jack/gstjackaudiosrc.c b/ext/jack/gstjackaudiosrc.c index d43a447..7c26854 100644 --- a/ext/jack/gstjackaudiosrc.c +++ b/ext/jack/gstjackaudiosrc.c @@ -715,6 +715,8 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", #define gst_jack_audio_src_parent_class parent_class G_DEFINE_TYPE (GstJackAudioSrc, gst_jack_audio_src, GST_TYPE_AUDIO_BASE_SRC); +GST_ELEMENT_REGISTER_DEFINE (jackaudiosrc, "jackaudiosrc", + GST_RANK_PRIMARY, GST_TYPE_JACK_AUDIO_SRC); static void gst_jack_audio_src_dispose (GObject * object); static void gst_jack_audio_src_set_property (GObject * object, guint prop_id,