mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
sbc: 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
0a04c215d1
commit
c2f4524e32
5 changed files with 12 additions and 4 deletions
|
@ -48,6 +48,8 @@ GST_DEBUG_CATEGORY_STATIC (sbc_dec_debug);
|
|||
|
||||
#define parent_class gst_sbc_dec_parent_class
|
||||
G_DEFINE_TYPE (GstSbcDec, gst_sbc_dec, GST_TYPE_AUDIO_DECODER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (sbcdec, "sbcdec", GST_RANK_PRIMARY,
|
||||
GST_TYPE_SBC_DEC);
|
||||
|
||||
static GstStaticPadTemplate sbc_dec_sink_factory =
|
||||
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
||||
|
|
|
@ -56,4 +56,6 @@ struct _GstSbcDecClass {
|
|||
|
||||
GType gst_sbc_dec_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (sbcdec);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
@ -47,6 +47,7 @@ GST_DEBUG_CATEGORY_STATIC (sbc_enc_debug);
|
|||
#define GST_CAT_DEFAULT sbc_enc_debug
|
||||
|
||||
G_DEFINE_TYPE (GstSbcEnc, gst_sbc_enc, GST_TYPE_AUDIO_ENCODER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (sbcenc, "sbcenc", GST_RANK_NONE, GST_TYPE_SBC_ENC);
|
||||
|
||||
static GstStaticPadTemplate sbc_enc_sink_factory =
|
||||
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
||||
|
|
|
@ -58,4 +58,6 @@ struct _GstSbcEncClass {
|
|||
|
||||
GType gst_sbc_enc_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (sbcenc);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
@ -24,14 +24,15 @@
|
|||
#include "gstsbcdec.h"
|
||||
#include "gstsbcenc.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gst_element_register (plugin, "sbcdec", GST_RANK_PRIMARY, GST_TYPE_SBC_DEC);
|
||||
gst_element_register (plugin, "sbcenc", GST_RANK_NONE, GST_TYPE_SBC_ENC);
|
||||
return TRUE;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
ret |= GST_ELEMENT_REGISTER (sbcdec, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (sbcenc, plugin);
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
Loading…
Reference in a new issue