isac: 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-17 18:26:42 +01:00 committed by GStreamer Marge Bot
parent 72de78f62f
commit f7d1e607b5
5 changed files with 13 additions and 7 deletions

View file

@ -39,14 +39,12 @@
static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_element_register (plugin, "isacenc", GST_RANK_PRIMARY,
GST_TYPE_ISACENC))
return FALSE;
if (!gst_element_register (plugin, "isacdec", GST_RANK_PRIMARY,
GST_TYPE_ISACDEC))
return FALSE;
gboolean ret = FALSE;
return TRUE;
ret |= GST_ELEMENT_REGISTER (isacenc, plugin);
ret |= GST_ELEMENT_REGISTER (isacdec, plugin);
return ret;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -75,6 +75,8 @@ G_DEFINE_TYPE_WITH_CODE (GstIsacDec, gst_isacdec,
GST_TYPE_AUDIO_DECODER,
GST_DEBUG_CATEGORY_INIT (isacdec_debug, "isacdec", 0,
"debug category for isacdec element"));
GST_ELEMENT_REGISTER_DEFINE (isacdec, "isacdec", GST_RANK_PRIMARY,
GST_TYPE_ISACDEC);
static gboolean
gst_isacdec_start (GstAudioDecoder * dec)

View file

@ -29,6 +29,8 @@ G_BEGIN_DECLS
#define GST_TYPE_ISACDEC gst_isacdec_get_type ()
G_DECLARE_FINAL_TYPE(GstIsacDec, gst_isacdec, GST, ISACDEC, GstAudioDecoder)
GST_ELEMENT_REGISTER_DECLARE (isacdec);
G_END_DECLS
#endif /* __GST_ISAC_DEC_H__ */

View file

@ -120,6 +120,8 @@ G_DEFINE_TYPE_WITH_CODE (GstIsacEnc, gst_isacenc,
GST_TYPE_AUDIO_ENCODER,
GST_DEBUG_CATEGORY_INIT (isacenc_debug, "isacenc", 0,
"debug category for isacenc element"));
GST_ELEMENT_REGISTER_DEFINE (isacenc, "isacenc", GST_RANK_PRIMARY,
GST_TYPE_ISACENC);
static gboolean
gst_isacenc_start (GstAudioEncoder * enc)

View file

@ -29,6 +29,8 @@ G_BEGIN_DECLS
#define GST_TYPE_ISACENC gst_isacenc_get_type ()
G_DECLARE_FINAL_TYPE(GstIsacEnc, gst_isacenc, GST, ISACENC, GstAudioEncoder)
GST_ELEMENT_REGISTER_DECLARE (isacenc);
G_END_DECLS
#endif /* __GST_ISAC_ENC_H__ */