From: Jan Rękorajski Date: Sun, 7 Mar 2021 20:58:02 +0000 (+0100) Subject: - Use correct namespace for opencv constants X-Git-Tag: auto/th/performous-1.1-4 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fperformous.git;a=commitdiff_plain;h=576302e - Use correct namespace for opencv constants - rel 4 --- 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 +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))); 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