From 8dedf47997c86116d3ccdd17a63d231bde79a283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Tue, 16 Feb 2021 15:56:35 +0100 Subject: [PATCH] auparse: 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: --- gst/auparse/gstauparse.c | 6 +++--- gst/auparse/gstauparse.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index 8fbab097a9..83547be4a4 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -103,6 +103,8 @@ static gboolean gst_au_parse_src_convert (GstAuParse * auparse, #define gst_au_parse_parent_class parent_class G_DEFINE_TYPE (GstAuParse, gst_au_parse, GST_TYPE_ELEMENT); +GST_ELEMENT_REGISTER_DEFINE (auparse, "auparse", GST_RANK_SECONDARY, + GST_TYPE_AU_PARSE); static void gst_au_parse_class_init (GstAuParseClass * klass) @@ -797,10 +799,8 @@ gst_au_parse_change_state (GstElement * element, GstStateChange transition) static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "auparse", GST_RANK_SECONDARY, - GST_TYPE_AU_PARSE)) { + if (!GST_ELEMENT_REGISTER (auparse, plugin)) return FALSE; - } return TRUE; } diff --git a/gst/auparse/gstauparse.h b/gst/auparse/gstauparse.h index 97a099532a..7ac385352f 100644 --- a/gst/auparse/gstauparse.h +++ b/gst/auparse/gstauparse.h @@ -70,6 +70,8 @@ struct _GstAuParseClass { GType gst_au_parse_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (auparse); + G_END_DECLS #endif /* __GST_AU_PARSE_H__ */