mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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:
parent
6399179d7a
commit
a423f23fc7
2 changed files with 12 additions and 5 deletions
|
@ -92,8 +92,11 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
"rate = (int) [ 4000, 96000 ], " "channels = (int) [ 1, 6 ]")
|
"rate = (int) [ 4000, 96000 ], " "channels = (int) [ 1, 6 ]")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
static gboolean a52_element_init (GstPlugin * plugin);
|
||||||
|
|
||||||
#define gst_a52dec_parent_class parent_class
|
#define gst_a52dec_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstA52Dec, gst_a52dec, GST_TYPE_AUDIO_DECODER);
|
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_start (GstAudioDecoder * dec);
|
||||||
static gboolean gst_a52dec_stop (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
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
a52_element_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
#if HAVE_ORC
|
#if HAVE_ORC
|
||||||
orc_init ();
|
orc_init ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "a52dec", GST_RANK_SECONDARY,
|
return gst_element_register (plugin, "a52dec", GST_RANK_SECONDARY,
|
||||||
GST_TYPE_A52DEC))
|
GST_TYPE_A52DEC);
|
||||||
return FALSE;
|
}
|
||||||
|
|
||||||
return TRUE;
|
static gboolean
|
||||||
|
plugin_init (GstPlugin * plugin)
|
||||||
|
{
|
||||||
|
return GST_ELEMENT_REGISTER (a52dec, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -73,6 +73,7 @@ struct _GstA52DecClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_a52dec_get_type (void);
|
GType gst_a52dec_get_type (void);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (a52dec);
|
||||||
|
|
||||||
#ifndef A52_MONO
|
#ifndef A52_MONO
|
||||||
#define A52_MONO 1
|
#define A52_MONO 1
|
||||||
|
|
Loading…
Reference in a new issue