From: Stéphane Cerveau Date: Tue, 16 Feb 2021 16:11:14 +0000 (+0100) Subject: goom: allow per feature registration X-Git-Tag: 1.19.3~509^2~192 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ebf9b886f75a6b81a1157fdc5d043e212705cc51;p=platform%2Fupstream%2Fgstreamer.git goom: 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/gst/goom/gstgoom.c b/gst/goom/gstgoom.c index 4942345..e40bfa7 100644 --- a/gst/goom/gstgoom.c +++ b/gst/goom/gstgoom.c @@ -99,8 +99,10 @@ static void gst_goom_finalize (GObject * object); static gboolean gst_goom_setup (GstAudioVisualizer * base); static gboolean gst_goom_render (GstAudioVisualizer * base, GstBuffer * audio, GstVideoFrame * video); +static gboolean goom_element_init (GstPlugin * plugin); G_DEFINE_TYPE (GstGoom, gst_goom, GST_TYPE_AUDIO_VISUALIZER); +GST_ELEMENT_REGISTER_DEFINE_CUSTOM (goom, goom_element_init); static void gst_goom_class_init (GstGoomClass * klass) @@ -192,7 +194,7 @@ gst_goom_render (GstAudioVisualizer * base, GstBuffer * audio, } static gboolean -plugin_init (GstPlugin * plugin) +goom_element_init (GstPlugin * plugin) { GST_DEBUG_CATEGORY_INIT (goom_debug, "goom", 0, "goom visualisation element"); @@ -203,6 +205,12 @@ plugin_init (GstPlugin * plugin) return gst_element_register (plugin, "goom", GST_RANK_NONE, GST_TYPE_GOOM); } +static gboolean +plugin_init (GstPlugin * plugin) +{ + return GST_ELEMENT_REGISTER (goom, plugin); +} + GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, goom, diff --git a/gst/goom/gstgoom.h b/gst/goom/gstgoom.h index 25975dd..d192460 100644 --- a/gst/goom/gstgoom.h +++ b/gst/goom/gstgoom.h @@ -59,7 +59,8 @@ struct _GstGoomClass }; GType gst_goom_get_type (void); -gboolean gst_goom_plugin_init (GstPlugin * plugin); + +GST_ELEMENT_REGISTER_DECLARE (goom); G_END_DECLS