mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
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:
parent
9196e71f07
commit
bc17c7ba3a
5 changed files with 11 additions and 4 deletions
|
@ -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,
|
||||
|
|
|
@ -40,6 +40,8 @@ struct _GstOpenaptxDec {
|
|||
struct aptx_context *aptx_c;
|
||||
};
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (openaptxdec)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_OPENAPTXDEC_H__ */
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -39,6 +39,8 @@ struct _GstOpenaptxEnc {
|
|||
struct aptx_context *aptx_c;
|
||||
};
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE(openaptxenc);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_OPENAPTXENC_H__ */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue