twolame: 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-good/-/merge_requests/876>
This commit is contained in:
parent
31c1e8ca13
commit
48786371df
@ -201,8 +201,11 @@ static void gst_two_lame_set_property (GObject * object, guint prop_id,
|
|||||||
static void gst_two_lame_get_property (GObject * object, guint prop_id,
|
static void gst_two_lame_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
static gboolean gst_two_lame_setup (GstTwoLame * twolame);
|
static gboolean gst_two_lame_setup (GstTwoLame * twolame);
|
||||||
|
static gboolean two_lame_element_init (void);
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstTwoLame, gst_two_lame, GST_TYPE_AUDIO_ENCODER);
|
G_DEFINE_TYPE (GstTwoLame, gst_two_lame, GST_TYPE_AUDIO_ENCODER);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (twolamemp2enc, "twolamemp2enc",
|
||||||
|
GST_RANK_PRIMARY, GST_TYPE_TWO_LAME, two_lame_element_init (););
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_two_lame_release_memory (GstTwoLame * twolame)
|
gst_two_lame_release_memory (GstTwoLame * twolame)
|
||||||
@ -868,7 +871,7 @@ gst_two_lame_get_default_settings (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
two_lame_element_init (void)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (debug, "twolame", 0, "twolame mp2 encoder");
|
GST_DEBUG_CATEGORY_INIT (debug, "twolame", 0, "twolame mp2 encoder");
|
||||||
|
|
||||||
@ -881,14 +884,15 @@ plugin_init (GstPlugin * plugin)
|
|||||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
#endif /* ENABLE_NLS */
|
#endif /* ENABLE_NLS */
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "twolamemp2enc", GST_RANK_PRIMARY,
|
|
||||||
GST_TYPE_TWO_LAME))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
plugin_init (GstPlugin * plugin)
|
||||||
|
{
|
||||||
|
return GST_ELEMENT_REGISTER (twolamemp2enc, plugin);
|
||||||
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
twolame,
|
twolame,
|
||||||
|
@ -65,6 +65,8 @@ struct _GstTwoLame {
|
|||||||
twolame_options *glopts;
|
twolame_options *glopts;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (twolamemp2enc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user