From 9de8af0ac186ed6f143d6b5d80f633c0dc2553ee Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Cerveau?= Date: Wed, 24 Feb 2021 17:34:50 +0100 Subject: [PATCH] voamrwbenc: 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/voamrwbenc/gstvoamrwb.c | 4 +--- ext/voamrwbenc/gstvoamrwbenc.c | 2 ++ ext/voamrwbenc/gstvoamrwbenc.h | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/voamrwbenc/gstvoamrwb.c b/ext/voamrwbenc/gstvoamrwb.c index 48501c3..eb447a1 100644 --- a/ext/voamrwbenc/gstvoamrwb.c +++ b/ext/voamrwbenc/gstvoamrwb.c @@ -26,11 +26,9 @@ static gboolean plugin_init (GstPlugin * plugin) { - return gst_element_register (plugin, "voamrwbenc", - GST_RANK_SECONDARY, GST_TYPE_VOAMRWBENC); + return GST_ELEMENT_REGISTER (voamrwbenc, plugin); } - GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, voamrwbenc, diff --git a/ext/voamrwbenc/gstvoamrwbenc.c b/ext/voamrwbenc/gstvoamrwbenc.c index 3e4eff0..f48ac09 100644 --- a/ext/voamrwbenc/gstvoamrwbenc.c +++ b/ext/voamrwbenc/gstvoamrwbenc.c @@ -115,6 +115,8 @@ static GstFlowReturn gst_voamrwbenc_handle_frame (GstAudioEncoder * enc, GstBuffer * in_buf); G_DEFINE_TYPE (GstVoAmrWbEnc, gst_voamrwbenc, GST_TYPE_AUDIO_ENCODER); +GST_ELEMENT_REGISTER_DEFINE (voamrwbenc, "voamrwbenc", + GST_RANK_SECONDARY, GST_TYPE_VOAMRWBENC); static void gst_voamrwbenc_set_property (GObject * object, guint prop_id, diff --git a/ext/voamrwbenc/gstvoamrwbenc.h b/ext/voamrwbenc/gstvoamrwbenc.h index 2b71986..a5a19dd 100644 --- a/ext/voamrwbenc/gstvoamrwbenc.h +++ b/ext/voamrwbenc/gstvoamrwbenc.h @@ -58,6 +58,8 @@ struct _GstVoAmrWbEncClass { GType gst_voamrwbenc_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (voamrwbenc); + G_END_DECLS #endif /* __GST_VOAMRWBENC_H__ */ -- 2.7.4