From 6db40c914032b0b2f9ee0e904556f7c0bf5290d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Tue, 16 Feb 2021 17:16:33 +0100 Subject: [PATCH] icydemux: 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: --- gst/icydemux/gsticydemux.c | 11 ++++++----- gst/icydemux/gsticydemux.h | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gst/icydemux/gsticydemux.c b/gst/icydemux/gsticydemux.c index 035e7245f2..c8420e86fc 100644 --- a/gst/icydemux/gsticydemux.c +++ b/gst/icydemux/gsticydemux.c @@ -87,7 +87,11 @@ static gboolean gst_icydemux_send_tag_event (GstICYDemux * icydemux, #define gst_icydemux_parent_class parent_class G_DEFINE_TYPE (GstICYDemux, gst_icydemux, GST_TYPE_ELEMENT); - +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (icydemux, "icydemux", + GST_RANK_PRIMARY, GST_TYPE_ICYDEMUX, + GST_DEBUG_CATEGORY_INIT (icydemux_debug, "icydemux", 0, + "GStreamer ICY tag demuxer"); + ); static void gst_icydemux_class_init (GstICYDemuxClass * klass) { @@ -662,11 +666,8 @@ gst_icydemux_send_tag_event (GstICYDemux * icydemux, GstTagList * tags) static gboolean plugin_init (GstPlugin * plugin) { - GST_DEBUG_CATEGORY_INIT (icydemux_debug, "icydemux", 0, - "GStreamer ICY tag demuxer"); + return GST_ELEMENT_REGISTER (icydemux, plugin); - return gst_element_register (plugin, "icydemux", - GST_RANK_PRIMARY, GST_TYPE_ICYDEMUX); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/icydemux/gsticydemux.h b/gst/icydemux/gsticydemux.h index 3f05218ad5..d51a54b0d0 100644 --- a/gst/icydemux/gsticydemux.h +++ b/gst/icydemux/gsticydemux.h @@ -82,6 +82,8 @@ struct _GstICYDemuxClass GType gst_icydemux_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (icydemux); + G_END_DECLS #endif /* __GST_ICYDEMUX_H__ */