From 891be511057dbcdf1f38740e55cbd376c4b25894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 25 Feb 2021 15:22:15 +0100 Subject: 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: --- gst/jp2kdecimator/gstjp2kdecimator.c | 13 +++++-------- gst/jp2kdecimator/gstjp2kdecimator.h | 1 + 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'gst/jp2kdecimator') diff --git a/gst/jp2kdecimator/gstjp2kdecimator.c b/gst/jp2kdecimator/gstjp2kdecimator.c index 3688381b9..532864e7c 100644 --- a/gst/jp2kdecimator/gstjp2kdecimator.c +++ b/gst/jp2kdecimator/gstjp2kdecimator.c @@ -79,7 +79,10 @@ GST_DEBUG_CATEGORY (gst_jp2k_decimator_debug); #define GST_CAT_DEFAULT gst_jp2k_decimator_debug G_DEFINE_TYPE (GstJP2kDecimator, gst_jp2k_decimator, GST_TYPE_ELEMENT); - +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (jp2kdecimator, "jp2kdecimator", + GST_RANK_NONE, GST_TYPE_JP2K_DECIMATOR, + GST_DEBUG_CATEGORY_INIT (gst_jp2k_decimator_debug, "jp2kdecimator", 0, + "JPEG2000 decimator")); static void gst_jp2k_decimator_class_init (GstJP2kDecimatorClass * klass) { @@ -258,13 +261,7 @@ gst_jp2k_decimator_sink_chain (GstPad * pad, GstObject * parent, static gboolean plugin_init (GstPlugin * plugin) { - GST_DEBUG_CATEGORY_INIT (gst_jp2k_decimator_debug, "jp2kdecimator", 0, - "JPEG2000 decimator"); - - gst_element_register (plugin, "jp2kdecimator", GST_RANK_NONE, - GST_TYPE_JP2K_DECIMATOR); - - return TRUE; + return GST_ELEMENT_REGISTER (jp2kdecimator, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/jp2kdecimator/gstjp2kdecimator.h b/gst/jp2kdecimator/gstjp2kdecimator.h index f5f3458b7..7f5a1a9dc 100644 --- a/gst/jp2kdecimator/gstjp2kdecimator.h +++ b/gst/jp2kdecimator/gstjp2kdecimator.h @@ -51,6 +51,7 @@ struct _GstJP2kDecimatorClass }; GType gst_jp2k_decimator_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (jp2kdecimator); G_END_DECLS -- cgit v1.2.1