replaygain: 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:
parent
237aca0f53
commit
0438b199c8
@ -125,6 +125,8 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
|||||||
|
|
||||||
#define gst_rg_analysis_parent_class parent_class
|
#define gst_rg_analysis_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstRgAnalysis, gst_rg_analysis, GST_TYPE_BASE_TRANSFORM);
|
G_DEFINE_TYPE (GstRgAnalysis, gst_rg_analysis, GST_TYPE_BASE_TRANSFORM);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (rganalysis, "rganalysis", GST_RANK_NONE,
|
||||||
|
GST_TYPE_RG_ANALYSIS);
|
||||||
|
|
||||||
static void gst_rg_analysis_set_property (GObject * object, guint prop_id,
|
static void gst_rg_analysis_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
|
@ -76,6 +76,8 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
|||||||
|
|
||||||
#define gst_rg_limiter_parent_class parent_class
|
#define gst_rg_limiter_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstRgLimiter, gst_rg_limiter, GST_TYPE_BASE_TRANSFORM);
|
G_DEFINE_TYPE (GstRgLimiter, gst_rg_limiter, GST_TYPE_BASE_TRANSFORM);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (rglimiter, "rglimiter", GST_RANK_NONE,
|
||||||
|
GST_TYPE_RG_LIMITER);
|
||||||
|
|
||||||
static void gst_rg_limiter_set_property (GObject * object, guint prop_id,
|
static void gst_rg_limiter_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
|
@ -61,4 +61,6 @@ struct _GstRgLimiterClass
|
|||||||
|
|
||||||
GType gst_rg_limiter_get_type (void);
|
GType gst_rg_limiter_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (rglimiter);
|
||||||
|
|
||||||
#endif /* __GST_RG_LIMITER_H__ */
|
#endif /* __GST_RG_LIMITER_H__ */
|
||||||
|
@ -118,6 +118,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
|||||||
|
|
||||||
#define gst_rg_volume_parent_class parent_class
|
#define gst_rg_volume_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstRgVolume, gst_rg_volume, GST_TYPE_BIN);
|
G_DEFINE_TYPE (GstRgVolume, gst_rg_volume, GST_TYPE_BIN);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (rgvolume, "rgvolume", GST_RANK_NONE,
|
||||||
|
GST_TYPE_RG_VOLUME);
|
||||||
|
|
||||||
static void gst_rg_volume_set_property (GObject * object, guint prop_id,
|
static void gst_rg_volume_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
|
@ -83,6 +83,8 @@ struct _GstRgVolumeClass
|
|||||||
|
|
||||||
GType gst_rg_volume_get_type (void);
|
GType gst_rg_volume_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (rgvolume);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_RG_VOLUME_H__ */
|
#endif /* __GST_RG_VOLUME_H__ */
|
||||||
|
@ -33,19 +33,13 @@
|
|||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_element_register (plugin, "rganalysis", GST_RANK_NONE,
|
gboolean ret = FALSE;
|
||||||
GST_TYPE_RG_ANALYSIS))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "rglimiter", GST_RANK_NONE,
|
ret |= GST_ELEMENT_REGISTER (rganalysis, plugin);
|
||||||
GST_TYPE_RG_LIMITER))
|
ret |= GST_ELEMENT_REGISTER (rglimiter, plugin);
|
||||||
return FALSE;
|
ret |= GST_ELEMENT_REGISTER (rgvolume, plugin);
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "rgvolume", GST_RANK_NONE,
|
return ret;
|
||||||
GST_TYPE_RG_VOLUME))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, replaygain,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, replaygain,
|
||||||
|
@ -58,6 +58,8 @@ void rg_analysis_reset_album (RgAnalysisCtx * ctx);
|
|||||||
void rg_analysis_reset (RgAnalysisCtx * ctx);
|
void rg_analysis_reset (RgAnalysisCtx * ctx);
|
||||||
void rg_analysis_destroy (RgAnalysisCtx * ctx);
|
void rg_analysis_destroy (RgAnalysisCtx * ctx);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (rganalysis);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __RG_ANALYSIS_H__ */
|
#endif /* __RG_ANALYSIS_H__ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user