From: Stéphane Cerveau Date: Tue, 16 Feb 2021 16:27:12 +0000 (+0100) Subject: monoscope: allow per feature registration X-Git-Tag: 1.19.3~509^2~186 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7bfcfd660fccc2d6ddb7f6b6d4c548a6a5feabc6;p=platform%2Fupstream%2Fgstreamer.git monoscope: 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: --- diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c index 6ecf6bb..867e7ec 100644 --- a/gst/monoscope/gstmonoscope.c +++ b/gst/monoscope/gstmonoscope.c @@ -75,6 +75,10 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", #define gst_monoscope_parent_class parent_class G_DEFINE_TYPE (GstMonoscope, gst_monoscope, GST_TYPE_ELEMENT); +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (monoscope, "monoscope", + GST_RANK_NONE, GST_TYPE_MONOSCOPE, + GST_DEBUG_CATEGORY_INIT (monoscope_debug, "monoscope", 0, + "monoscope element");); static void gst_monoscope_finalize (GObject * object); static GstFlowReturn gst_monoscope_chain (GstPad * pad, GstObject * parent, @@ -583,11 +587,8 @@ gst_monoscope_change_state (GstElement * element, GstStateChange transition) static gboolean plugin_init (GstPlugin * plugin) { - GST_DEBUG_CATEGORY_INIT (monoscope_debug, "monoscope", 0, - "monoscope element"); + return GST_ELEMENT_REGISTER (monoscope, plugin); - return gst_element_register (plugin, "monoscope", - GST_RANK_NONE, GST_TYPE_MONOSCOPE); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/monoscope/gstmonoscope.h b/gst/monoscope/gstmonoscope.h index da23327..f8f8211 100644 --- a/gst/monoscope/gstmonoscope.h +++ b/gst/monoscope/gstmonoscope.h @@ -78,6 +78,8 @@ struct _GstMonoscopeClass GType gst_monoscope_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (monoscope); + G_END_DECLS #endif /* __GST_MONOSCOPE__ */