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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1089>
This commit is contained in:
Stéphane Cerveau 2021-03-29 14:06:00 +02:00
parent 6bcd6e1e66
commit bc75b81d7e
2 changed files with 5 additions and 5 deletions

View file

@ -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,

View file

@ -60,6 +60,7 @@ struct _GstAudioRate
/* we output TIME format on the src */
GstSegment src_segment;
};
GST_ELEMENT_REGISTER_DECLARE (audiorate);
G_END_DECLS