From 43a1874e33ca0d20998aefa41d694912cf24a58d Mon Sep 17 00:00:00 2001 From: Philippe FOUBERT Date: Mon, 1 Feb 2016 19:18:51 +0100 Subject: [PATCH] Bug correction: The "CvCaptureCAM_XIMEA::getProperty" method had not the same signature as "CvCapture::getProperty" so it was not called when we use the "VideoCapture::get" method (the "const" specifier was missing). --- modules/videoio/src/cap_ximea.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/videoio/src/cap_ximea.cpp b/modules/videoio/src/cap_ximea.cpp index bf3fdf5988..e111e69b7a 100644 --- a/modules/videoio/src/cap_ximea.cpp +++ b/modules/videoio/src/cap_ximea.cpp @@ -2,7 +2,7 @@ #include "precomp.hpp" #ifdef WIN32 -#include "xiApi.h" +#include #else #include #endif @@ -19,7 +19,7 @@ public: virtual bool open( int index ); virtual void close(); - virtual double getProperty(int); + virtual double getProperty(int) const; virtual bool setProperty(int, double); virtual bool grabFrame(); virtual IplImage* retrieveFrame(int); @@ -27,9 +27,9 @@ public: private: void init(); - void errMsg(const char* msg, int errNum); + void errMsg(const char* msg, int errNum) const; void resetCvImage(); - int ocvParamtoXimeaParam(int value); + int ocvParamtoXimeaParam(int value) const; IplImage* frame; HANDLE hmv; @@ -284,7 +284,7 @@ void CvCaptureCAM_XIMEA::resetCvImage() /**********************************************************************************/ -int CvCaptureCAM_XIMEA::ocvParamtoXimeaParam(int property_id) +int CvCaptureCAM_XIMEA::ocvParamtoXimeaParam(int property_id) const { XI_RETURN stat = XI_OK; switch (property_id) @@ -963,7 +963,7 @@ bool CvCaptureCAM_XIMEA::setProperty( int property_id, double value ) /**********************************************************************************/ -double CvCaptureCAM_XIMEA::getProperty( int property_id ) +double CvCaptureCAM_XIMEA::getProperty( int property_id ) const { XI_RETURN stat = XI_OK; double getPropVal = 0; @@ -1572,7 +1572,7 @@ double CvCaptureCAM_XIMEA::getProperty( int property_id ) /**********************************************************************************/ -void CvCaptureCAM_XIMEA::errMsg(const char* msg, int errNum) +void CvCaptureCAM_XIMEA::errMsg(const char* msg, int errNum) const { // with XI_OK there is nothing to report if(errNum == XI_OK) return;