diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2021-02-25 15:22:15 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-04-11 16:16:55 +0000 |
commit | 891be511057dbcdf1f38740e55cbd376c4b25894 (patch) | |
tree | b077e8cd0b584ebe2a10950ef2398ab3f60b48b4 /gst/festival | |
parent | 7f60138ef68e2a1fef8ccd4ff3710dfccd243314 (diff) | |
download | gstreamer-plugins-bad-891be511057dbcdf1f38740e55cbd376c4b25894.tar.gz |
gst-plugins: 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/2110>
Diffstat (limited to 'gst/festival')
-rw-r--r-- | gst/festival/gstfestival.c | 18 | ||||
-rw-r--r-- | gst/festival/gstfestival.h | 1 |
2 files changed, 9 insertions, 10 deletions
diff --git a/gst/festival/gstfestival.c b/gst/festival/gstfestival.c index d1637ab46..0876776c0 100644 --- a/gst/festival/gstfestival.c +++ b/gst/festival/gstfestival.c @@ -150,9 +150,14 @@ enum /*static guint gst_festival_signals[LAST_SIGNAL] = { 0 }; */ -G_DEFINE_TYPE (GstFestival, gst_festival, GST_TYPE_ELEMENT) +G_DEFINE_TYPE (GstFestival, gst_festival, GST_TYPE_ELEMENT); +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (festival, "festival", GST_RANK_NONE, + GST_TYPE_FESTIVAL, GST_DEBUG_CATEGORY_INIT (festival_debug, "festival", + 0, "Festival text-to-speech synthesizer"); + );; - static void gst_festival_class_init (GstFestivalClass * klass) +static void +gst_festival_class_init (GstFestivalClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; @@ -524,14 +529,7 @@ gst_festival_src_query (GstPad * pad, GstObject * parent, GstQuery * query) static gboolean plugin_init (GstPlugin * plugin) { - GST_DEBUG_CATEGORY_INIT (festival_debug, "festival", - 0, "Festival text-to-speech synthesizer"); - - if (!gst_element_register (plugin, "festival", GST_RANK_NONE, - GST_TYPE_FESTIVAL)) - return FALSE; - - return TRUE; + return GST_ELEMENT_REGISTER (festival, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/festival/gstfestival.h b/gst/festival/gstfestival.h index 1e43283da..24cba5c1b 100644 --- a/gst/festival/gstfestival.h +++ b/gst/festival/gstfestival.h @@ -116,6 +116,7 @@ struct _GstFestivalClass { }; GType gst_festival_get_type(void); +GST_ELEMENT_REGISTER_DECLARE (festival); #ifdef __cplusplus } |