From e2816f2b85343cfc730ce28bd7cf37a4f36d16ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Wed, 17 Feb 2021 15:59:49 +0100 Subject: [PATCH] faad: 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: --- ext/faad/gstfaad.c | 4 ++-- ext/faad/gstfaad.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c index e7b11334b3..c5db9ed7c8 100644 --- a/ext/faad/gstfaad.c +++ b/ext/faad/gstfaad.c @@ -104,6 +104,7 @@ static void gst_faad_close_decoder (GstFaad * faad); #define gst_faad_parent_class parent_class G_DEFINE_TYPE (GstFaad, gst_faad, GST_TYPE_AUDIO_DECODER); +GST_ELEMENT_REGISTER_DEFINE (faad, "faad", GST_RANK_SECONDARY, GST_TYPE_FAAD); static void gst_faad_class_init (GstFaadClass * klass) @@ -840,8 +841,7 @@ gst_faad_close_decoder (GstFaad * faad) static gboolean plugin_init (GstPlugin * plugin) { - return gst_element_register (plugin, "faad", GST_RANK_SECONDARY, - GST_TYPE_FAAD); + return GST_ELEMENT_REGISTER (faad, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/faad/gstfaad.h b/ext/faad/gstfaad.h index 03bd6abc4a..01a30a4c9f 100644 --- a/ext/faad/gstfaad.h +++ b/ext/faad/gstfaad.h @@ -66,6 +66,8 @@ typedef struct _GstFaadClass { GType gst_faad_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (faad); + G_END_DECLS #endif /* __GST_FAAD_H__ */