mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
fluidsynth: 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
c1b47c0780
commit
08ea6d39a3
2 changed files with 11 additions and 2 deletions
|
@ -99,6 +99,7 @@ static void gst_fluid_dec_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_fluid_dec_get_property (GObject * object, guint prop_id,
|
static void gst_fluid_dec_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
static gboolean fluiddec_element_init (GstPlugin * plugin);
|
||||||
|
|
||||||
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
|
@ -116,6 +117,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
|
|
||||||
#define parent_class gst_fluid_dec_parent_class
|
#define parent_class gst_fluid_dec_parent_class
|
||||||
G_DEFINE_TYPE (GstFluidDec, gst_fluid_dec, GST_TYPE_ELEMENT);
|
G_DEFINE_TYPE (GstFluidDec, gst_fluid_dec, GST_TYPE_ELEMENT);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_CUSTOM (fluiddec, fluiddec_element_init);
|
||||||
|
|
||||||
/* initialize the plugin's class */
|
/* initialize the plugin's class */
|
||||||
static void
|
static void
|
||||||
|
@ -707,7 +709,7 @@ gst_fluid_synth_debug_log_function (int level, const char *message, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
fluiddec_element_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_fluid_dec_debug, "fluiddec",
|
GST_DEBUG_CATEGORY_INIT (gst_fluid_dec_debug, "fluiddec",
|
||||||
0, "Fluidsynth MIDI decoder plugin");
|
0, "Fluidsynth MIDI decoder plugin");
|
||||||
|
@ -744,11 +746,16 @@ plugin_init (GstPlugin * plugin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return gst_element_register (plugin, "fluiddec",
|
return gst_element_register (plugin, "fluiddec",
|
||||||
GST_RANK_SECONDARY, GST_TYPE_FLUID_DEC);
|
GST_RANK_SECONDARY, GST_TYPE_FLUID_DEC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
plugin_init (GstPlugin * plugin)
|
||||||
|
{
|
||||||
|
return GST_ELEMENT_REGISTER (fluiddec, plugin);
|
||||||
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
fluidsynthmidi,
|
fluidsynthmidi,
|
||||||
|
|
|
@ -73,6 +73,8 @@ struct _GstFluidDecClass
|
||||||
|
|
||||||
GType gst_fluid_dec_get_type (void);
|
GType gst_fluid_dec_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (fluiddec);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_FLUID_DEC_H__ */
|
#endif /* __GST_FLUID_DEC_H__ */
|
||||||
|
|
Loading…
Reference in a new issue