diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2021-02-25 15:22:15 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-04-11 16:16:55 +0000 |
commit | 891be511057dbcdf1f38740e55cbd376c4b25894 (patch) | |
tree | b077e8cd0b584ebe2a10950ef2398ab3f60b48b4 /gst/accurip | |
parent | 7f60138ef68e2a1fef8ccd4ff3710dfccd243314 (diff) | |
download | gstreamer-plugins-bad-891be511057dbcdf1f38740e55cbd376c4b25894.tar.gz |
gst-plugins: 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/2110>
Diffstat (limited to 'gst/accurip')
-rw-r--r-- | gst/accurip/gstaccurip.c | 15 | ||||
-rw-r--r-- | gst/accurip/gstaccurip.h | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/gst/accurip/gstaccurip.c b/gst/accurip/gstaccurip.c index e69c3f4df..efc299564 100644 --- a/gst/accurip/gstaccurip.c +++ b/gst/accurip/gstaccurip.c @@ -72,8 +72,6 @@ enum PROP_LAST_TRACK }; -#define parent_class gst_accurip_parent_class -G_DEFINE_TYPE (GstAccurip, gst_accurip, GST_TYPE_AUDIO_FILTER); @@ -86,6 +84,11 @@ static GstFlowReturn gst_accurip_transform_ip (GstBaseTransform * trans, GstBuffer * buf); static gboolean gst_accurip_sink_event (GstBaseTransform * trans, GstEvent * event); +static gboolean accurip_element_init (GstPlugin * plugin); + +#define parent_class gst_accurip_parent_class +G_DEFINE_TYPE (GstAccurip, gst_accurip, GST_TYPE_AUDIO_FILTER); +GST_ELEMENT_REGISTER_DEFINE_CUSTOM (accurip, accurip_element_init); static void gst_accurip_class_init (GstAccuripClass * klass) @@ -342,7 +345,7 @@ gst_accurip_get_property (GObject * object, guint prop_id, } static gboolean -plugin_init (GstPlugin * plugin) +accurip_element_init (GstPlugin * plugin) { gboolean ret; @@ -362,6 +365,12 @@ plugin_init (GstPlugin * plugin) return ret; } +static gboolean +plugin_init (GstPlugin * plugin) +{ + return GST_ELEMENT_REGISTER (accurip, plugin); +} + GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, accurip, diff --git a/gst/accurip/gstaccurip.h b/gst/accurip/gstaccurip.h index e9ecba5b8..88cc101eb 100644 --- a/gst/accurip/gstaccurip.h +++ b/gst/accurip/gstaccurip.h @@ -80,6 +80,8 @@ struct _GstAccuripClass GType gst_accurip_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (accurip); + G_END_DECLS #endif /* __GST_ACCURIP_H__ */ |