summaryrefslogtreecommitdiff
path: root/ext/opencv/gstcvequalizehist.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/gstcvequalizehist.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/gstcvequalizehist.cpp')
-rw-r--r--ext/opencv/gstcvequalizehist.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/ext/opencv/gstcvequalizehist.cpp b/ext/opencv/gstcvequalizehist.cpp
index 742a41436..56d9f0db1 100644
--- a/ext/opencv/gstcvequalizehist.cpp
+++ b/ext/opencv/gstcvequalizehist.cpp
@@ -75,8 +75,13 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("GRAY8")));
-G_DEFINE_TYPE (GstCvEqualizeHist, gst_cv_equalize_hist,
- GST_TYPE_OPENCV_VIDEO_FILTER);
+G_DEFINE_TYPE_WITH_CODE (GstCvEqualizeHist, gst_cv_equalize_hist,
+ GST_TYPE_OPENCV_VIDEO_FILTER,
+ GST_DEBUG_CATEGORY_INIT (gst_cv_equalize_hist_debug, "cvequalizehist", 0,
+ "cvequalizehist");
+ );
+GST_ELEMENT_REGISTER_DEFINE (cvequalizehist, "cvequalizehist", GST_RANK_NONE,
+ GST_TYPE_CV_EQUALIZE_HIST);
static GstFlowReturn gst_cv_equalize_hist_transform (GstOpencvVideoFilter *
filter, GstBuffer * buf, cv::Mat img, GstBuffer * outbuf, cv::Mat outimg);
@@ -115,12 +120,3 @@ gst_cv_equalize_hist_transform (GstOpencvVideoFilter * base,
cv::equalizeHist (img, outimg);
return GST_FLOW_OK;
}
-
-gboolean
-gst_cv_equalize_hist_plugin_init (GstPlugin * plugin)
-{
- GST_DEBUG_CATEGORY_INIT (gst_cv_equalize_hist_debug, "cvequalizehist", 0,
- "cvequalizehist");
- return gst_element_register (plugin, "cvequalizehist", GST_RANK_NONE,
- GST_TYPE_CV_EQUALIZE_HIST);
-}