openaptx: 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:
Stéphane Cerveau 2021-02-18 10:58:28 +01:00 committed by GStreamer Marge Bot
parent 9196e71f07
commit bc17c7ba3a
5 changed files with 11 additions and 4 deletions

View file

@ -54,6 +54,8 @@ GST_DEBUG_CATEGORY_STATIC (openaptx_dec_debug);
#define parent_class gst_openaptx_dec_parent_class
G_DEFINE_TYPE (GstOpenaptxDec, gst_openaptx_dec, GST_TYPE_AUDIO_DECODER);
GST_ELEMENT_REGISTER_DEFINE (openaptxdec, "openaptxdec", GST_RANK_NONE,
GST_TYPE_OPENAPTX_DEC);
static GstStaticPadTemplate openaptx_dec_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,

View file

@ -40,6 +40,8 @@ struct _GstOpenaptxDec {
struct aptx_context *aptx_c;
};
GST_ELEMENT_REGISTER_DECLARE (openaptxdec)
G_END_DECLS
#endif /* __GST_OPENAPTXDEC_H__ */

View file

@ -49,6 +49,8 @@ GST_DEBUG_CATEGORY_STATIC (openaptx_enc_debug);
#define gst_openaptx_enc_parent_class parent_class
G_DEFINE_TYPE (GstOpenaptxEnc, gst_openaptx_enc, GST_TYPE_AUDIO_ENCODER);
GST_ELEMENT_REGISTER_DEFINE (openaptxenc, "openaptxenc", GST_RANK_NONE,
GST_TYPE_OPENAPTX_ENC);
static GstStaticPadTemplate openaptx_enc_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,

View file

@ -39,6 +39,8 @@ struct _GstOpenaptxEnc {
struct aptx_context *aptx_c;
};
GST_ELEMENT_REGISTER_DECLARE(openaptxenc);
G_END_DECLS
#endif /* __GST_OPENAPTXENC_H__ */

View file

@ -30,10 +30,9 @@
static gboolean
plugin_init (GstPlugin * plugin)
{
gst_element_register (plugin, "openaptxdec", GST_RANK_NONE,
GST_TYPE_OPENAPTX_DEC);
gst_element_register (plugin, "openaptxenc", GST_RANK_NONE,
GST_TYPE_OPENAPTX_ENC);
gboolean ret = FALSE;
ret |= GST_ELEMENT_REGISTER (openaptxdec, plugin);
ret |= GST_ELEMENT_REGISTER (openaptxenc, plugin);
return TRUE;
}