summaryrefslogtreecommitdiff
path: root/ext/opencv/gsttemplatematch.cpp
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2021-02-18 13:34:54 +0100
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-03-23 14:19:17 +0000
commit63e2705e97f12e5a9d585f66a5b03bfc13e7abf3 (patch)
tree4f85af858657b9e69af18d8327fc7a026e1b7ab9 /ext/opencv/gsttemplatematch.cpp
parentbc17c7ba3aa999317431063ce26f09dab6fa4ff9 (diff)
downloadgstreamer-plugins-bad-63e2705e97f12e5a9d585f66a5b03bfc13e7abf3.tar.gz
opencv: 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-bad/-/merge_requests/2038>
Diffstat (limited to 'ext/opencv/gsttemplatematch.cpp')
-rw-r--r--ext/opencv/gsttemplatematch.cpp25
1 files changed, 7 insertions, 18 deletions
diff --git a/ext/opencv/gsttemplatematch.cpp b/ext/opencv/gsttemplatematch.cpp
index 9f613c0e4..c3096a480 100644
--- a/ext/opencv/gsttemplatematch.cpp
+++ b/ext/opencv/gsttemplatematch.cpp
@@ -99,8 +99,13 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("BGR"))
);
-G_DEFINE_TYPE (GstTemplateMatch, gst_template_match,
- GST_TYPE_OPENCV_VIDEO_FILTER);
+G_DEFINE_TYPE_WITH_CODE (GstTemplateMatch, gst_template_match,
+ GST_TYPE_OPENCV_VIDEO_FILTER,
+ GST_DEBUG_CATEGORY_INIT (gst_template_match_debug, "templatematch", 0,
+ "Performs template matching on videos and images, providing detected positions via bus messages");
+ );
+GST_ELEMENT_REGISTER_DEFINE (templatematch, "templatematch",
+ GST_RANK_NONE, GST_TYPE_TEMPLATE_MATCH);
static void gst_template_match_finalize (GObject * object);
static void gst_template_match_set_property (GObject * object, guint prop_id,
@@ -379,19 +384,3 @@ gst_template_match_transform_ip (GstOpencvVideoFilter * base, GstBuffer * buf,
}
return GST_FLOW_OK;
}
-
-/* entry point to initialize the plug-in
- * initialize the plug-in itself
- * register the element factories and other features
- */
-gboolean
-gst_template_match_plugin_init (GstPlugin * templatematch)
-{
- /* debug category for fltering log messages */
- GST_DEBUG_CATEGORY_INIT (gst_template_match_debug, "templatematch",
- 0,
- "Performs template matching on videos and images, providing detected positions via bus messages");
-
- return gst_element_register (templatematch, "templatematch", GST_RANK_NONE,
- GST_TYPE_TEMPLATE_MATCH);
-}