mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
dts: 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-bad/-/merge_requests/2038>
This commit is contained in:
parent
a216a1f2cf
commit
2cf00e75b1
2 changed files with 15 additions and 6 deletions
|
@ -126,7 +126,7 @@ 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 ]")
|
||||||
);
|
);
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstDtsDec, gst_dtsdec, GST_TYPE_AUDIO_DECODER);
|
|
||||||
|
|
||||||
static gboolean gst_dtsdec_start (GstAudioDecoder * dec);
|
static gboolean gst_dtsdec_start (GstAudioDecoder * dec);
|
||||||
static gboolean gst_dtsdec_stop (GstAudioDecoder * dec);
|
static gboolean gst_dtsdec_stop (GstAudioDecoder * dec);
|
||||||
|
@ -143,6 +143,10 @@ static void gst_dtsdec_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_dtsdec_get_property (GObject * object, guint prop_id,
|
static void gst_dtsdec_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
static gboolean dtsdec_element_init (GstPlugin * plugin);
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (GstDtsDec, gst_dtsdec, GST_TYPE_AUDIO_DECODER);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_CUSTOM (dtsdec, dtsdec_element_init);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_dtsdec_class_init (GstDtsDecClass * klass)
|
gst_dtsdec_class_init (GstDtsDecClass * klass)
|
||||||
|
@ -784,7 +788,7 @@ gst_dtsdec_get_property (GObject * object, guint prop_id, GValue * value,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
dtsdec_element_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (dtsdec_debug, "dtsdec", 0, "DTS/DCA audio decoder");
|
GST_DEBUG_CATEGORY_INIT (dtsdec_debug, "dtsdec", 0, "DTS/DCA audio decoder");
|
||||||
|
|
||||||
|
@ -792,11 +796,14 @@ plugin_init (GstPlugin * plugin)
|
||||||
orc_init ();
|
orc_init ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "dtsdec", GST_RANK_PRIMARY,
|
return gst_element_register (plugin, "dtsdec", GST_RANK_PRIMARY,
|
||||||
GST_TYPE_DTSDEC))
|
GST_TYPE_DTSDEC);
|
||||||
return FALSE;
|
}
|
||||||
|
|
||||||
return TRUE;
|
static gboolean
|
||||||
|
plugin_init (GstPlugin * plugin)
|
||||||
|
{
|
||||||
|
return GST_ELEMENT_REGISTER (dtsdec, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -78,6 +78,8 @@ struct _GstDtsDecClass {
|
||||||
|
|
||||||
GType gst_dtsdec_get_type(void);
|
GType gst_dtsdec_get_type(void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (dtsdec);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_DTSDEC_H__ */
|
#endif /* __GST_DTSDEC_H__ */
|
||||||
|
|
Loading…
Reference in a new issue