mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 15:12:58 +00:00
amrnb: 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-ugly/-/merge_requests/79>
This commit is contained in:
parent
a423f23fc7
commit
d6055ac6d4
5 changed files with 12 additions and 4 deletions
|
@ -27,10 +27,12 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "amrnbdec",
|
||||
GST_RANK_PRIMARY, GST_TYPE_AMRNBDEC) &&
|
||||
gst_element_register (plugin, "amrnbenc",
|
||||
GST_RANK_SECONDARY, GST_TYPE_AMRNBENC);
|
||||
gboolean ret = FALSE;
|
||||
|
||||
ret |= GST_ELEMENT_REGISTER (amrnbdec, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (amrnbenc, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -103,6 +103,8 @@ static GstFlowReturn gst_amrnbdec_handle_frame (GstAudioDecoder * dec,
|
|||
|
||||
#define gst_amrnbdec_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstAmrnbDec, gst_amrnbdec, GST_TYPE_AUDIO_DECODER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (amrnbdec, "amrnbdec", GST_RANK_PRIMARY,
|
||||
GST_TYPE_AMRNBDEC);
|
||||
|
||||
static void
|
||||
gst_amrnbdec_class_init (GstAmrnbDecClass * klass)
|
||||
|
|
|
@ -64,6 +64,7 @@ struct _GstAmrnbDecClass {
|
|||
};
|
||||
|
||||
GType gst_amrnbdec_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (amrnbdec);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -98,6 +98,8 @@ static GstFlowReturn gst_amrnbenc_handle_frame (GstAudioEncoder * enc,
|
|||
|
||||
#define gst_amrnbenc_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstAmrnbEnc, gst_amrnbenc, GST_TYPE_AUDIO_ENCODER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (amrnbenc, "amrnbenc", GST_RANK_SECONDARY,
|
||||
GST_TYPE_AMRNBENC);
|
||||
|
||||
static void
|
||||
gst_amrnbenc_set_property (GObject * object, guint prop_id,
|
||||
|
|
|
@ -60,6 +60,7 @@ struct _GstAmrnbEncClass {
|
|||
};
|
||||
|
||||
GType gst_amrnbenc_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (amrnbenc);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue