videotestsrc: allow per feature registration
authorStéphane Cerveau <scerveau@collabora.com>
Thu, 11 Feb 2021 10:14:31 +0000 (11:14 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 16 Mar 2021 17:59:00 +0000 (17:59 +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-base/-/merge_requests/1029>

gst/videotestsrc/gstvideotestsrc.c
gst/videotestsrc/gstvideotestsrc.h

index d36850a..7a7ccc7 100644 (file)
@@ -109,6 +109,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
 
 #define gst_video_test_src_parent_class parent_class
 G_DEFINE_TYPE (GstVideoTestSrc, gst_video_test_src, GST_TYPE_PUSH_SRC);
+GST_ELEMENT_REGISTER_DEFINE (videotestsrc, "videotestsrc",
+    GST_RANK_NONE, GST_TYPE_VIDEO_TEST_SRC);
 
 static void gst_video_test_src_set_pattern (GstVideoTestSrc * videotestsrc,
     int pattern_type);
@@ -1269,8 +1271,7 @@ plugin_init (GstPlugin * plugin)
   GST_DEBUG_CATEGORY_INIT (video_test_src_debug, "videotestsrc", 0,
       "Video Test Source");
 
-  return gst_element_register (plugin, "videotestsrc", GST_RANK_NONE,
-      GST_TYPE_VIDEO_TEST_SRC);
+  return GST_ELEMENT_REGISTER (videotestsrc, plugin);
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
index ae0cc6b..bf129ac 100644 (file)
@@ -198,6 +198,8 @@ struct _GstVideoTestSrc {
   gpointer *lines;
 };
 
+GST_ELEMENT_REGISTER_DECLARE (videotestsrc);
+
 G_END_DECLS
 
 #endif /* __GST_VIDEO_TEST_SRC_H__ */