]> git.pld-linux.org Git - packages/performous.git/commitdiff
- Use correct namespace for opencv constants auto/th/performous-1.1-4
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 7 Mar 2021 20:58:02 +0000 (21:58 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 7 Mar 2021 20:58:02 +0000 (21:58 +0100)
- rel 4

opencv-const.patch [new file with mode: 0644]
performous.spec

diff --git a/opencv-const.patch b/opencv-const.patch
new file mode 100644 (file)
index 0000000..990f8aa
--- /dev/null
@@ -0,0 +1,44 @@
+From ddb052609d182745cfad5abc22cc50230f83e47b Mon Sep 17 00:00:00 2001
+From: Arjan Spieard <arjan.spieard@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)));
index e2cd5be5b012b34c043aad554b67cbe28a50683e..c52ffa13cc4b4dedd055d64de9f6cd230983744e 100644 (file)
@@ -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
This page took 0.16537 seconds and 4 git commands to generate.