mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
lame: 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
dd3496c830
commit
abd5c40691
3 changed files with 15 additions and 20 deletions
|
@ -191,7 +191,19 @@ static void gst_lamemp3enc_get_property (GObject * object, guint prop_id,
|
|||
static gboolean gst_lamemp3enc_setup (GstLameMP3Enc * lame, GstTagList ** tags);
|
||||
|
||||
#define gst_lamemp3enc_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstLameMP3Enc, gst_lamemp3enc, GST_TYPE_AUDIO_ENCODER);
|
||||
#ifdef ENABLE_NLS
|
||||
#define _do_init \
|
||||
GST_DEBUG_CATEGORY_INIT (debug, "lamemp3enc", 0, "lame mp3 encoder");\
|
||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);\
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
#else /* ENABLE_NLS */
|
||||
#define _do_init \
|
||||
GST_DEBUG_CATEGORY_INIT (debug, "lamemp3enc", 0, "lame mp3 encoder");
|
||||
#endif
|
||||
G_DEFINE_TYPE_WITH_CODE (GstLameMP3Enc, gst_lamemp3enc, GST_TYPE_AUDIO_ENCODER,
|
||||
_do_init);
|
||||
GST_ELEMENT_REGISTER_DEFINE (lamemp3enc, "lamemp3enc", GST_RANK_PRIMARY,
|
||||
GST_TYPE_LAMEMP3ENC);
|
||||
|
||||
static void
|
||||
gst_lamemp3enc_release_memory (GstLameMP3Enc * lame)
|
||||
|
@ -920,15 +932,3 @@ gst_lamemp3enc_setup (GstLameMP3Enc * lame, GstTagList ** tags)
|
|||
return res;
|
||||
#undef CHECK_ERROR
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_lamemp3enc_register (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (debug, "lamemp3enc", 0, "lame mp3 encoder");
|
||||
|
||||
if (!gst_element_register (plugin, "lamemp3enc", GST_RANK_PRIMARY,
|
||||
GST_TYPE_LAMEMP3ENC))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ struct _GstLameMP3Enc {
|
|||
GstAdapter *adapter;
|
||||
};
|
||||
|
||||
gboolean gst_lamemp3enc_register (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (lamemp3enc);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -29,12 +29,7 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
#ifdef ENABLE_NLS
|
||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
return gst_lamemp3enc_register (plugin);
|
||||
return GST_ELEMENT_REGISTER (lamemp3enc, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
Loading…
Reference in a new issue