diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2021-02-19 12:41:41 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-03-23 14:19:17 +0000 |
commit | c8ef250fe22f89bdb85d725b02a7e805030741de (patch) | |
tree | 88ad1351a35aca0c4efff17eb013c19f475b4602 | |
parent | 1b30f6072a495af4a9443efaa0f062393ad8c652 (diff) | |
download | gstreamer-plugins-bad-c8ef250fe22f89bdb85d725b02a7e805030741de.tar.gz |
soundtouch: 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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2038>
-rw-r--r-- | ext/soundtouch/gstbpmdetect.cc | 2 | ||||
-rw-r--r-- | ext/soundtouch/gstbpmdetect.hh | 1 | ||||
-rw-r--r-- | ext/soundtouch/gstpitch.cc | 2 | ||||
-rw-r--r-- | ext/soundtouch/gstpitch.hh | 1 | ||||
-rw-r--r-- | ext/soundtouch/plugin.c | 9 |
5 files changed, 12 insertions, 3 deletions
diff --git a/ext/soundtouch/gstbpmdetect.cc b/ext/soundtouch/gstbpmdetect.cc index d4cc61926..d5eee0640 100644 --- a/ext/soundtouch/gstbpmdetect.cc +++ b/ext/soundtouch/gstbpmdetect.cc @@ -79,6 +79,8 @@ struct _GstBPMDetectPrivate #define gst_bpm_detect_parent_class parent_class G_DEFINE_TYPE_WITH_PRIVATE (GstBPMDetect, gst_bpm_detect, GST_TYPE_AUDIO_FILTER); +GST_ELEMENT_REGISTER_DEFINE (bpmdetect, "bpmdetect", GST_RANK_NONE, + GST_TYPE_BPM_DETECT); static void gst_bpm_detect_finalize (GObject * object); static gboolean gst_bpm_detect_stop (GstBaseTransform * trans); diff --git a/ext/soundtouch/gstbpmdetect.hh b/ext/soundtouch/gstbpmdetect.hh index 1c411dcc0..2c94920a3 100644 --- a/ext/soundtouch/gstbpmdetect.hh +++ b/ext/soundtouch/gstbpmdetect.hh @@ -51,6 +51,7 @@ struct _GstBPMDetectClass { }; GType gst_bpm_detect_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (bpmdetect); G_END_DECLS diff --git a/ext/soundtouch/gstpitch.cc b/ext/soundtouch/gstpitch.cc index 3853802a0..e15a6a6bc 100644 --- a/ext/soundtouch/gstpitch.cc +++ b/ext/soundtouch/gstpitch.cc @@ -118,6 +118,8 @@ static gboolean gst_pitch_src_query (GstPad * pad, GstObject * parent, #define gst_pitch_parent_class parent_class G_DEFINE_TYPE_WITH_PRIVATE (GstPitch, gst_pitch, GST_TYPE_ELEMENT); +GST_ELEMENT_REGISTER_DEFINE (pitch, "pitch", GST_RANK_NONE, + GST_TYPE_PITCH); static void gst_pitch_class_init (GstPitchClass * klass) diff --git a/ext/soundtouch/gstpitch.hh b/ext/soundtouch/gstpitch.hh index 1efb59b04..acfe803a9 100644 --- a/ext/soundtouch/gstpitch.hh +++ b/ext/soundtouch/gstpitch.hh @@ -89,6 +89,7 @@ struct _GstPitchClass }; GType gst_pitch_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (pitch); G_END_DECLS diff --git a/ext/soundtouch/plugin.c b/ext/soundtouch/plugin.c index 509204600..9dd7c1d01 100644 --- a/ext/soundtouch/plugin.c +++ b/ext/soundtouch/plugin.c @@ -28,9 +28,12 @@ static gboolean plugin_init (GstPlugin * plugin) { - return gst_element_register (plugin, "pitch", GST_RANK_NONE, GST_TYPE_PITCH) - && gst_element_register (plugin, "bpmdetect", GST_RANK_NONE, - GST_TYPE_BPM_DETECT); + gboolean ret = FALSE; + + ret |= GST_ELEMENT_REGISTER (pitch, plugin); + ret |= GST_ELEMENT_REGISTER (bpmdetect, plugin); + + return ret; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, |