openexr: allow per feature registration
authorStéphane Cerveau <scerveau@collabora.com>
Thu, 18 Feb 2021 13:08:34 +0000 (14:08 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 23 Mar 2021 14:19:17 +0000 (14:19 +0000)
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/2038>

ext/openexr/gstopenexr.c
ext/openexr/gstopenexrdec.cpp
ext/openexr/gstopenexrdec.h

index 7961b94..5365b47 100644 (file)
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
-  if (!gst_element_register (plugin, "openexrdec", GST_RANK_PRIMARY,
-          GST_TYPE_OPENEXR_DEC))
-    return FALSE;
 
-  return TRUE;
+
+  return GST_ELEMENT_REGISTER (openexrdec, plugin);;
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
index a83c35d..eeb316c 100644 (file)
@@ -112,6 +112,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
 
 #define parent_class gst_openexr_dec_parent_class
 G_DEFINE_TYPE (GstOpenEXRDec, gst_openexr_dec, GST_TYPE_VIDEO_DECODER);
+GST_ELEMENT_REGISTER_DEFINE (openexrdec, "openexrdec", GST_RANK_PRIMARY,
+          GST_TYPE_OPENEXR_DEC);
 
 static void
 gst_openexr_dec_class_init (GstOpenEXRDecClass * klass)
index 381bb9d..40424b1 100644 (file)
@@ -58,6 +58,8 @@ struct _GstOpenEXRDecClass
 
 GType gst_openexr_dec_get_type (void);
 
+GST_ELEMENT_REGISTER_DECLARE (openexrdec);
+
 G_END_DECLS
 
 #endif /* __GST_OPENEXR_DEC_H__ */