From: Stéphane Cerveau Date: Fri, 11 Dec 2020 16:54:31 +0000 (+0100) Subject: audioconvert: allow per feature registration X-Git-Tag: 1.19.3~511^2~230 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cc37e706ccbf14a1a7775a8d3acd447657ebc9a;p=platform%2Fupstream%2Fgstreamer.git audioconvert: 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: --- diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c index 96855cf..a6601f4 100644 --- a/gst/audioconvert/gstaudioconvert.c +++ b/gst/audioconvert/gstaudioconvert.c @@ -165,7 +165,8 @@ enum #define gst_audio_convert_parent_class parent_class G_DEFINE_TYPE_WITH_CODE (GstAudioConvert, gst_audio_convert, GST_TYPE_BASE_TRANSFORM, DEBUG_INIT); - +GST_ELEMENT_REGISTER_DEFINE (audioconvert, "audioconvert", + GST_RANK_PRIMARY, GST_TYPE_AUDIO_CONVERT); /*** GSTREAMER PROTOTYPES *****************************************************/ #define STATIC_CAPS \ diff --git a/gst/audioconvert/gstaudioconvert.h b/gst/audioconvert/gstaudioconvert.h index 3853cfa..336bef2 100644 --- a/gst/audioconvert/gstaudioconvert.h +++ b/gst/audioconvert/gstaudioconvert.h @@ -28,7 +28,7 @@ #define GST_TYPE_AUDIO_CONVERT (gst_audio_convert_get_type()) G_DECLARE_FINAL_TYPE (GstAudioConvert, gst_audio_convert, - GST, AUDIO_CONVERT, GstBaseTransform) + GST, AUDIO_CONVERT, GstBaseTransform); /** * GstAudioConvert: @@ -50,4 +50,6 @@ struct _GstAudioConvert GstAudioConverter *convert; }; +GST_ELEMENT_REGISTER_DECLARE (audioconvert); + #endif /* __GST_AUDIO_CONVERT_H__ */ diff --git a/gst/audioconvert/plugin.c b/gst/audioconvert/plugin.c index f9ed4c3..e4e81cc 100644 --- a/gst/audioconvert/plugin.c +++ b/gst/audioconvert/plugin.c @@ -28,11 +28,7 @@ static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "audioconvert", - GST_RANK_PRIMARY, GST_TYPE_AUDIO_CONVERT)) - return FALSE; - - return TRUE; + return GST_ELEMENT_REGISTER (audioconvert, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,