diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2021-02-18 10:41:53 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-03-23 14:19:17 +0000 |
commit | 3f1c8d930734f91b4c7786f746dce58f967f0ad3 (patch) | |
tree | 271f7979e299583fb94dc6c9910f546ffd64cecd /ext | |
parent | c2b1368b03fdbd7d01842e6545cd2adab3d6a853 (diff) | |
download | gstreamer-plugins-bad-3f1c8d930734f91b4c7786f746dce58f967f0ad3.tar.gz |
ofa: 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>
Diffstat (limited to 'ext')
-rw-r--r-- | ext/ofa/gstofa.c | 16 | ||||
-rw-r--r-- | ext/ofa/gstofa.h | 2 |
2 files changed, 15 insertions, 3 deletions
diff --git a/ext/ofa/gstofa.c b/ext/ofa/gstofa.c index 70d7ae685..77ad32e6b 100644 --- a/ext/ofa/gstofa.c +++ b/ext/ofa/gstofa.c @@ -42,8 +42,7 @@ enum PROP_FINGERPRINT, }; -#define parent_class gst_ofa_parent_class -G_DEFINE_TYPE (GstOFA, gst_ofa, GST_TYPE_AUDIO_FILTER); + static void gst_ofa_finalize (GObject * object); static void gst_ofa_get_property (GObject * object, guint prop_id, @@ -51,6 +50,11 @@ static void gst_ofa_get_property (GObject * object, guint prop_id, static GstFlowReturn gst_ofa_transform_ip (GstBaseTransform * trans, GstBuffer * buf); static gboolean gst_ofa_sink_event (GstBaseTransform * trans, GstEvent * event); +static gboolean ofa_element_init (GstPlugin * plugin); + +#define parent_class gst_ofa_parent_class +G_DEFINE_TYPE (GstOFA, gst_ofa, GST_TYPE_AUDIO_FILTER); +GST_ELEMENT_REGISTER_DEFINE_CUSTOM (ofa, ofa_element_init); static void gst_ofa_finalize (GObject * object) @@ -249,7 +253,7 @@ gst_ofa_get_property (GObject * object, guint prop_id, GValue * value, static gboolean -plugin_init (GstPlugin * plugin) +ofa_element_init (GstPlugin * plugin) { gboolean ret; int major, minor, rev; @@ -271,6 +275,12 @@ plugin_init (GstPlugin * plugin) return ret; } +static gboolean +plugin_init (GstPlugin * plugin) +{ + return GST_ELEMENT_REGISTER (ofa, plugin); +} + /* FIXME: someone write a libofa replacement with an LGPL or BSD license */ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, diff --git a/ext/ofa/gstofa.h b/ext/ofa/gstofa.h index e719df56e..47f6668b5 100644 --- a/ext/ofa/gstofa.h +++ b/ext/ofa/gstofa.h @@ -74,6 +74,8 @@ struct _GstOFAClass GType gst_ofa_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (ofa); + G_END_DECLS #endif /* __GST_OFA_H__ */ |