From: Stéphane Cerveau Date: Mon, 29 Mar 2021 12:06:00 +0000 (+0200) Subject: audiorate: allow per feature registration X-Git-Tag: 1.19.3~511^2~203 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc75b81d7e86281364a99ad835b6a2280fc9b06b;p=platform%2Fupstream%2Fgstreamer.git audiorate: 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/audiorate/gstaudiorate.c b/gst/audiorate/gstaudiorate.c index e3d218f..bcb35f0 100644 --- a/gst/audiorate/gstaudiorate.c +++ b/gst/audiorate/gstaudiorate.c @@ -138,6 +138,9 @@ static GParamSpec *pspec_add = NULL; #define gst_audio_rate_parent_class parent_class G_DEFINE_TYPE (GstAudioRate, gst_audio_rate, GST_TYPE_ELEMENT); +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (audiorate, "audiorate", GST_RANK_NONE, + GST_TYPE_AUDIO_RATE, GST_DEBUG_CATEGORY_INIT (audio_rate_debug, "audiorate", + 0, "AudioRate stream fixer")); static void gst_audio_rate_class_init (GstAudioRateClass * klass) @@ -782,11 +785,7 @@ gst_audio_rate_change_state (GstElement * element, GstStateChange transition) static gboolean plugin_init (GstPlugin * plugin) { - GST_DEBUG_CATEGORY_INIT (audio_rate_debug, "audiorate", 0, - "AudioRate stream fixer"); - - return gst_element_register (plugin, "audiorate", GST_RANK_NONE, - GST_TYPE_AUDIO_RATE); + return GST_ELEMENT_REGISTER (audiorate, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/audiorate/gstaudiorate.h b/gst/audiorate/gstaudiorate.h index 84e401b..1c8fd16 100644 --- a/gst/audiorate/gstaudiorate.h +++ b/gst/audiorate/gstaudiorate.h @@ -60,6 +60,7 @@ struct _GstAudioRate /* we output TIME format on the src */ GstSegment src_segment; }; +GST_ELEMENT_REGISTER_DECLARE (audiorate); G_END_DECLS