mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-06 11:51:13 +00:00
gsm: 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
bb51f78270
commit
e2268237f1
5 changed files with 13 additions and 7 deletions
|
@ -29,14 +29,12 @@
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_element_register (plugin, "gsmenc", GST_RANK_PRIMARY,
|
gboolean ret = FALSE;
|
||||||
GST_TYPE_GSMENC))
|
|
||||||
return FALSE;
|
|
||||||
if (!gst_element_register (plugin, "gsmdec", GST_RANK_PRIMARY,
|
|
||||||
GST_TYPE_GSMDEC))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
ret |= GST_ELEMENT_REGISTER (gsmenc, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (gsmdec, plugin);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -74,6 +74,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
);
|
);
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstGSMDec, gst_gsmdec, GST_TYPE_AUDIO_DECODER);
|
G_DEFINE_TYPE (GstGSMDec, gst_gsmdec, GST_TYPE_AUDIO_DECODER);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (gsmdec, "gsmdec", GST_RANK_PRIMARY,
|
||||||
|
GST_TYPE_GSMDEC);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_gsmdec_class_init (GstGSMDecClass * klass)
|
gst_gsmdec_class_init (GstGSMDecClass * klass)
|
||||||
|
|
|
@ -61,6 +61,8 @@ struct _GstGSMDecClass
|
||||||
|
|
||||||
GType gst_gsmdec_get_type (void);
|
GType gst_gsmdec_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (gsmdec);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_GSMDEC_H__ */
|
#endif /* __GST_GSMDEC_H__ */
|
||||||
|
|
|
@ -68,6 +68,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
);
|
);
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstGSMEnc, gst_gsmenc, GST_TYPE_AUDIO_ENCODER);
|
G_DEFINE_TYPE (GstGSMEnc, gst_gsmenc, GST_TYPE_AUDIO_ENCODER);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (gsmenc, "gsmenc", GST_RANK_PRIMARY,
|
||||||
|
GST_TYPE_GSMENC);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_gsmenc_class_init (GstGSMEncClass * klass)
|
gst_gsmenc_class_init (GstGSMEncClass * klass)
|
||||||
|
|
|
@ -59,6 +59,8 @@ struct _GstGSMEncClass
|
||||||
|
|
||||||
GType gst_gsmenc_get_type (void);
|
GType gst_gsmenc_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (gsmenc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_GSMENC_H__ */
|
#endif /* __GST_GSMENC_H__ */
|
||||||
|
|
Loading…
Reference in a new issue