[packages/performous] - Use correct namespace for opencv constants - rel 4
baggins
baggins at pld-linux.org
Sun Mar 7 21:58:15 CET 2021
commit 576302ed73d61d0dd2fd286ed21929737d59a188
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Mar 7 21:58:02 2021 +0100
- Use correct namespace for opencv constants
- rel 4
opencv-const.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
performous.spec | 4 +++-
2 files changed, 47 insertions(+), 1 deletion(-)
---
diff --git a/performous.spec b/performous.spec
index e2cd5be..c52ffa1 100644
--- a/performous.spec
+++ b/performous.spec
@@ -2,7 +2,7 @@ Summary: Performous - The All-in-One Music Game
Summary(pl.UTF-8): Performous - wiele gier muzycznych w jednej
Name: performous
Version: 1.1
-Release: 3
+Release: 4
License: GPL v2+
Group: Applications/Sound
#Source0Download: https://github.com/performous/performous/releases
@@ -10,6 +10,7 @@ Source0: https://github.com/performous/performous/archive/%{version}/%{name}-%{v
# Source0-md5: cf31d0973cd88b3cd626d312d6d3f5b2
Patch0: %{name}-boost.patch
Patch1: %{name}-pango1.44.patch
+Patch2: opencv-const.patch
URL: http://performous.org/
BuildRequires: ImageMagick-c++-devel
BuildRequires: SDL2-devel >= 2
@@ -68,6 +69,7 @@ Zestaw narzędzi do konwersji danych dla programu Performous.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
install -d build
diff --git a/opencv-const.patch b/opencv-const.patch
new file mode 100644
index 0000000..990f8aa
--- /dev/null
+++ b/opencv-const.patch
@@ -0,0 +1,44 @@
+From ddb052609d182745cfad5abc22cc50230f83e47b Mon Sep 17 00:00:00 2001
+From: Arjan Spieard <arjan.spieard at gmail.com>
+Date: Tue, 8 Jan 2019 18:02:23 +0100
+Subject: [PATCH] Use correct namespace for opencv constants
+
+---
+ game/webcam.cc | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/game/webcam.cc b/game/webcam.cc
+index b01c169d3..b224b70d2 100644
+--- a/game/webcam.cc
++++ b/game/webcam.cc
+@@ -33,21 +33,21 @@ Webcam::Webcam(int cam_id):
+ throw std::runtime_error("Could not initialize webcam capturing!");
+ }
+ // Try to get at least VGA resolution
+- if (m_capture->get(CV_CAP_PROP_FRAME_WIDTH) < 640
+- || m_capture->get(CV_CAP_PROP_FRAME_HEIGHT) < 480) {
+- m_capture->set(CV_CAP_PROP_FRAME_WIDTH, 640);
+- m_capture->set(CV_CAP_PROP_FRAME_HEIGHT, 480);
++ if (m_capture->get(cv::CAP_PROP_FRAME_WIDTH) < 640
++ || m_capture->get(cv::CAP_PROP_FRAME_HEIGHT) < 480) {
++ m_capture->set(cv::CAP_PROP_FRAME_WIDTH, 640);
++ m_capture->set(cv::CAP_PROP_FRAME_HEIGHT, 480);
+ }
+ // Print actual values
+ std::cout << "Webcam frame properties: "
+- << m_capture->get(CV_CAP_PROP_FRAME_WIDTH) << "x"
+- << m_capture->get(CV_CAP_PROP_FRAME_HEIGHT) << std::endl;
++ << m_capture->get(cv::CAP_PROP_FRAME_WIDTH) << "x"
++ << m_capture->get(cv::CAP_PROP_FRAME_HEIGHT) << std::endl;
+
+ // Initialize the video writer
+ #ifdef SAVE_WEBCAM_VIDEO
+- float fps = m_capture->get(CV_CAP_PROP_FPS);
+- int framew = m_capture->get(CV_CAP_PROP_FRAME_WIDTH);
+- int frameh = m_capture->get(CV_CAP_PROP_FRAME_HEIGHT);
++ float fps = m_capture->get(cv::CAP_PROP_FPS);
++ int framew = m_capture->get(cv::CAP_PROP_FRAME_WIDTH);
++ int frameh = m_capture->get(cv::CAP_PROP_FRAME_HEIGHT);
+ int codec = CV_FOURCC('P','I','M','1'); // MPEG-1
+ std::string out_file = (getHomeDir() / "performous-webcam_out.mpg").string();
+ m_writer.reset(new cv::VideoWriter(out_file.c_str(), codec, fps > 0 ? fps : 30.0f, cvSize(framew,frameh)));
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/performous.git/commitdiff/576302ed73d61d0dd2fd286ed21929737d59a188
More information about the pld-cvs-commit
mailing list