From ae55a537e6b4244be4bec086bb512bdb6cf8ac0a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vanessa=20Chipirr=C3=A1s=20Naval=C3=B3n?= Date: Fri, 2 Oct 2015 18:10:32 +0100 Subject: [PATCH] cvsmooth: port to C++ Change the file extension to cpp and add it into Makefile for consistency with other elements of opencv and because Opencv not support C language in new API 2.4.11. https://bugzilla.gnome.org/show_bug.cgi?id=754148 --- ext/opencv/Makefile.am | 2 +- ext/opencv/{gstcvsmooth.c => gstcvsmooth.cpp} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename ext/opencv/{gstcvsmooth.c => gstcvsmooth.cpp} (96%) diff --git a/ext/opencv/Makefile.am b/ext/opencv/Makefile.am index 05c7b52..97ce760 100644 --- a/ext/opencv/Makefile.am +++ b/ext/opencv/Makefile.am @@ -9,7 +9,7 @@ libgstopencv_la_SOURCES = gstopencv.cpp \ gstcvequalizehist.c \ gstcverode.c \ gstcvlaplace.c \ - gstcvsmooth.c \ + gstcvsmooth.cpp \ gstcvsobel.c \ gstedgedetect.cpp \ gstfaceblur.cpp \ diff --git a/ext/opencv/gstcvsmooth.c b/ext/opencv/gstcvsmooth.cpp similarity index 96% rename from ext/opencv/gstcvsmooth.c rename to ext/opencv/gstcvsmooth.cpp index ffb6485..707f953 100644 --- a/ext/opencv/gstcvsmooth.c +++ b/ext/opencv/gstcvsmooth.cpp @@ -143,21 +143,21 @@ gst_cv_smooth_class_init (GstCvSmoothClass * klass) "type", "Smooth Type", GST_TYPE_CV_SMOOTH_TYPE, - DEFAULT_CV_SMOOTH_TYPE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) + DEFAULT_CV_SMOOTH_TYPE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)) ); g_object_class_install_property (gobject_class, PROP_WIDTH, g_param_spec_int ("width", "width (aperture width)", "The aperture width (Must be positive and odd)." "Check cvSmooth OpenCV docs: http://opencv.willowgarage.com" "/documentation/image_filtering.html#cvSmooth", 1, G_MAXINT, - DEFAULT_WIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + DEFAULT_WIDTH, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); g_object_class_install_property (gobject_class, PROP_HEIGHT, g_param_spec_int ("height", "height (aperture height)", "The aperture height, if zero, the width is used." "(Must be positive and odd or zero, unuset in median and bilateral " "types). Check cvSmooth OpenCV docs: http://opencv.willowgarage.com" "/documentation/image_filtering.html#cvSmooth", 0, G_MAXINT, - DEFAULT_HEIGHT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + DEFAULT_HEIGHT, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); g_object_class_install_property (gobject_class, PROP_COLORSIGMA, g_param_spec_double ("color", "color (gaussian standard deviation or " "color sigma", @@ -167,14 +167,14 @@ gst_cv_smooth_class_init (GstCvSmoothClass * klass) "Check cvSmooth OpenCV docs: http://opencv.willowgarage.com" "/documentation/image_filtering.html#cvSmooth", 0, G_MAXDOUBLE, DEFAULT_COLORSIGMA, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); g_object_class_install_property (gobject_class, PROP_SPATIALSIGMA, g_param_spec_double ("spatial", "spatial (spatial sigma, bilateral only)", "Only used in bilateral type, means the spatial-sigma." "Check cvSmooth OpenCV docs: http://opencv.willowgarage.com" "/documentation/image_filtering.html#cvSmooth", 0, G_MAXDOUBLE, DEFAULT_SPATIALSIGMA, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); gst_element_class_set_static_metadata (element_class, "cvsmooth", -- 2.7.4