spectrum: 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-good/-/merge_requests/876>
This commit is contained in:
Stéphane Cerveau 2021-02-16 17:27:24 +01:00
parent 7bfcfd660f
commit 41f7a88f6b
2 changed files with 6 additions and 2 deletions

View file

@ -98,6 +98,8 @@ enum
#define gst_spectrum_parent_class parent_class
G_DEFINE_TYPE (GstSpectrum, gst_spectrum, GST_TYPE_AUDIO_FILTER);
GST_ELEMENT_REGISTER_DEFINE (spectrum, "spectrum", GST_RANK_NONE,
GST_TYPE_SPECTRUM);
static void gst_spectrum_finalize (GObject * object);
static void gst_spectrum_set_property (GObject * object, guint prop_id,
@ -953,8 +955,8 @@ gst_spectrum_transform_ip (GstBaseTransform * trans, GstBuffer * buffer)
static gboolean
plugin_init (GstPlugin * plugin)
{
return gst_element_register (plugin, "spectrum", GST_RANK_NONE,
GST_TYPE_SPECTRUM);
return GST_ELEMENT_REGISTER (spectrum, plugin);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -90,6 +90,8 @@ struct _GstSpectrumClass
GType gst_spectrum_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (spectrum);
G_END_DECLS
#endif /* __GST_SPECTRUM_H__ */