a52dec: 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-ugly/-/merge_requests/79>
This commit is contained in:
Stéphane Cerveau 2021-03-29 10:37:26 +02:00 committed by GStreamer Marge Bot
parent 6399179d7a
commit a423f23fc7
2 changed files with 12 additions and 5 deletions

View file

@ -92,8 +92,11 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
"rate = (int) [ 4000, 96000 ], " "channels = (int) [ 1, 6 ]")
);
static gboolean a52_element_init (GstPlugin * plugin);
#define gst_a52dec_parent_class parent_class
G_DEFINE_TYPE (GstA52Dec, gst_a52dec, GST_TYPE_AUDIO_DECODER);
GST_ELEMENT_REGISTER_DEFINE_CUSTOM (a52dec, a52_element_init);
static gboolean gst_a52dec_start (GstAudioDecoder * dec);
static gboolean gst_a52dec_stop (GstAudioDecoder * dec);
@ -822,17 +825,20 @@ gst_a52dec_get_property (GObject * object, guint prop_id, GValue * value,
}
static gboolean
plugin_init (GstPlugin * plugin)
a52_element_init (GstPlugin * plugin)
{
#if HAVE_ORC
orc_init ();
#endif
if (!gst_element_register (plugin, "a52dec", GST_RANK_SECONDARY,
GST_TYPE_A52DEC))
return FALSE;
return gst_element_register (plugin, "a52dec", GST_RANK_SECONDARY,
GST_TYPE_A52DEC);
}
return TRUE;
static gboolean
plugin_init (GstPlugin * plugin)
{
return GST_ELEMENT_REGISTER (a52dec, plugin);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -73,6 +73,7 @@ struct _GstA52DecClass {
};
GType gst_a52dec_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (a52dec);
#ifndef A52_MONO
#define A52_MONO 1