From 1e14ceedb38e063e4c5558e8aa28681a57049c13 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vanessa=20Chipirr=C3=A1s=20Naval=C3=B3n?= Date: Fri, 28 Aug 2015 13:42:29 +0200 Subject: [PATCH] edgedetect: Rename gstedgedetect.c to gstedgedetect.cpp for consistency. Change the file extension to cpp and add it into Makefile for consistency with other elements of opencv. https://bugzilla.gnome.org/show_bug.cgi?id=754148 --- ext/opencv/Makefile.am | 2 +- ext/opencv/{gstedgedetect.c => gstedgedetect.cpp} | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) rename ext/opencv/{gstedgedetect.c => gstedgedetect.cpp} (96%) diff --git a/ext/opencv/Makefile.am b/ext/opencv/Makefile.am index 2f24b3a..72472fb 100644 --- a/ext/opencv/Makefile.am +++ b/ext/opencv/Makefile.am @@ -11,7 +11,7 @@ libgstopencv_la_SOURCES = gstopencv.cpp \ gstcvlaplace.c \ gstcvsmooth.c \ gstcvsobel.c \ - gstedgedetect.c \ + gstedgedetect.cpp \ gstfaceblur.cpp \ gsthanddetect.c \ gstpyramidsegment.c \ diff --git a/ext/opencv/gstedgedetect.c b/ext/opencv/gstedgedetect.cpp similarity index 96% rename from ext/opencv/gstedgedetect.c rename to ext/opencv/gstedgedetect.cpp index 95ac2ae..5ecf8ec 100644 --- a/ext/opencv/gstedgedetect.c +++ b/ext/opencv/gstedgedetect.cpp @@ -145,19 +145,19 @@ gst_edge_detect_class_init (GstEdgeDetectClass * klass) g_object_class_install_property (gobject_class, PROP_MASK, g_param_spec_boolean ("mask", "Mask", "Sets whether the detected edges should be used as a mask on the original input or not", - TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + TRUE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); g_object_class_install_property (gobject_class, PROP_THRESHOLD1, g_param_spec_int ("threshold1", "Threshold1", "Threshold value for canny edge detection", 0, 1000, 50, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); g_object_class_install_property (gobject_class, PROP_THRESHOLD2, g_param_spec_int ("threshold2", "Threshold2", "Second threshold value for canny edge detection", 0, 1000, 150, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); g_object_class_install_property (gobject_class, PROP_APERTURE, g_param_spec_int ("aperture", "Aperture", "Aperture size for Sobel operator (Must be either 3, 5 or 7", 3, 7, 3, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); gst_element_class_set_static_metadata (element_class, "edgedetect", @@ -323,7 +323,8 @@ gst_edge_detect_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) } outbuf = gst_buffer_new_and_alloc (filter->cvCEdge->imageSize); - gst_buffer_copy_into (outbuf, buf, GST_BUFFER_COPY_METADATA, 0, -1); + gst_buffer_copy_into (outbuf, buf, + (GstBufferCopyFlags) GST_BUFFER_COPY_METADATA, 0, -1); gst_buffer_map (outbuf, &out_info, GST_MAP_WRITE); memcpy (out_info.data, filter->cvCEdge->imageData, -- 2.7.4