mpeg123: 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-good/-/merge_requests/876>
This commit is contained in:
Stéphane Cerveau 2021-02-12 10:41:29 +01:00
parent fb29c4b07f
commit 65e0bc21a5
2 changed files with 5 additions and 2 deletions

View file

@ -83,6 +83,8 @@ static gboolean gst_mpg123_audio_dec_set_format (GstAudioDecoder * dec,
static void gst_mpg123_audio_dec_flush (GstAudioDecoder * dec, gboolean hard);
G_DEFINE_TYPE (GstMpg123AudioDec, gst_mpg123_audio_dec, GST_TYPE_AUDIO_DECODER);
GST_ELEMENT_REGISTER_DEFINE (mpg123audiodec, "mpg123audiodec",
GST_RANK_MARGINAL, GST_TYPE_MPG123_AUDIO_DEC);
static void
gst_mpg123_audio_dec_class_init (GstMpg123AudioDecClass * klass)
@ -623,8 +625,7 @@ gst_mpg123_audio_dec_flush (GstAudioDecoder * dec, gboolean hard)
static gboolean
plugin_init (GstPlugin * plugin)
{
return gst_element_register (plugin, "mpg123audiodec",
GST_RANK_MARGINAL, gst_mpg123_audio_dec_get_type ());
return GST_ELEMENT_REGISTER (mpg123audiodec, plugin);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -42,6 +42,8 @@ struct _GstMpg123AudioDec
off_t frame_offset;
};
GST_ELEMENT_REGISTER_DECLARE (mpg123audiodec);
G_END_DECLS
#endif