summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis de Bethencourt <luisbg@osg.samsung.com>2015-10-10 17:52:23 +0100
committerLuis de Bethencourt <luisbg@osg.samsung.com>2015-10-10 18:00:31 +0100
commit61168794ea6a1faa1e9bede14490d63af75887a2 (patch)
tree935c0b3c62de303fdad4e5573a33208c1ce34db8
parenta4429cf769b1a995b4250652ba4af8a456b234c1 (diff)
downloadgstreamer-plugins-bad-61168794ea6a1faa1e9bede14490d63af75887a2.tar.gz
cvsobel: Switch to C++
Switch gstcvlsobel to C++ for consistency with other OpenCV elements, and support of the new 2.4.11 API. https://bugzilla.gnome.org/show_bug.cgi?id=754148
-rw-r--r--ext/opencv/Makefile.am2
-rw-r--r--ext/opencv/gstcvsobel.cpp (renamed from ext/opencv/gstcvsobel.c)16
2 files changed, 10 insertions, 8 deletions
diff --git a/ext/opencv/Makefile.am b/ext/opencv/Makefile.am
index a87e96729..6776ad1c7 100644
--- a/ext/opencv/Makefile.am
+++ b/ext/opencv/Makefile.am
@@ -10,7 +10,7 @@ libgstopencv_la_SOURCES = gstopencv.cpp \
gstcverode.cpp \
gstcvlaplace.cpp \
gstcvsmooth.cpp \
- gstcvsobel.c \
+ gstcvsobel.cpp \
gstedgedetect.cpp \
gstfaceblur.cpp \
gsthanddetect.cpp \
diff --git a/ext/opencv/gstcvsobel.c b/ext/opencv/gstcvsobel.cpp
index ee96f69b7..e1edc0f08 100644
--- a/ext/opencv/gstcvsobel.c
+++ b/ext/opencv/gstcvsobel.cpp
@@ -1,7 +1,7 @@
/*
* GStreamer
* Copyright (C) 2010 Thiago Santos <thiago.sousa.santos@collabora.co.uk>
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
@@ -129,15 +129,17 @@ gst_cv_sobel_class_init (GstCvSobelClass * klass)
g_object_class_install_property (gobject_class, PROP_X_ORDER,
g_param_spec_int ("x-order", "x order",
"Order of the derivative x", -1, G_MAXINT,
- DEFAULT_X_ORDER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ DEFAULT_X_ORDER,
+ (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_Y_ORDER,
- g_param_spec_int ("y-order", "y order",
- "Order of the derivative y", -1, G_MAXINT,
- DEFAULT_Y_ORDER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_param_spec_int ("y-order", "y order", "Order of the derivative y", -1,
+ G_MAXINT, DEFAULT_Y_ORDER,
+ (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_APERTURE_SIZE,
g_param_spec_int ("aperture-size", "aperture size",
"Size of the extended Sobel Kernel (1, 3, 5 or 7)", 1, 7,
- DEFAULT_APERTURE_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ DEFAULT_APERTURE_SIZE,
+ (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_factory));
@@ -170,7 +172,7 @@ gst_cv_sobel_transform_caps (GstBaseTransform * trans, GstPadDirection dir,
GstCaps *templ;
GstStructure *structure;
GstPad *other;
- gint i;
+ guint i;
to = gst_caps_new_empty ();