diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2021-02-16 17:27:12 +0100 |
---|---|---|
committer | Stéphane Cerveau <scerveau@collabora.com> | 2021-03-29 12:45:23 +0200 |
commit | 7bfcfd660fccc2d6ddb7f6b6d4c548a6a5feabc6 (patch) | |
tree | cff0105b109a7fd13a85d74df7341626435b4b5c | |
parent | 2ba958555f48eae6a6712e5af740bdfe0a3a589c (diff) |
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
-rw-r--r-- | gst/monoscope/gstmonoscope.c | 9 | ||||
-rw-r--r-- | gst/monoscope/gstmonoscope.h | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c index 6ecf6bba4..867e7ec0e 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 da2332713..f8f821148 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__ */ |