From 193e97a34ad64425b3ed6f94338ad95f6938ecca Mon Sep 17 00:00:00 2001 From: vbystricky Date: Fri, 7 Mar 2014 16:25:15 +0400 Subject: [PATCH] Move declaration of IVideoCapture class into precomp.hpp, make some methods of IVideoCapture pure virtual --- modules/highgui/include/opencv2/highgui.hpp | 12 +----------- modules/highgui/src/precomp.hpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/modules/highgui/include/opencv2/highgui.hpp b/modules/highgui/include/opencv2/highgui.hpp index 39f0ebe..601b872 100644 --- a/modules/highgui/include/opencv2/highgui.hpp +++ b/modules/highgui/include/opencv2/highgui.hpp @@ -531,17 +531,7 @@ enum { CAP_INTELPERC_DEPTH_MAP = 0, // Each pixel is a 16-bit integ }; -class IVideoCapture -{ -public: - virtual ~IVideoCapture() {} - virtual double getProperty(int) { return 0; } - virtual bool setProperty(int, double) { return 0; } - virtual bool grabFrame() { return true; } - virtual bool retrieveFrame(int, cv::OutputArray) { return 0; } - virtual int getCaptureDomain() { return CAP_ANY; } // Return the type of the capture object: CAP_VFW, etc... -}; - +class IVideoCapture; class CV_EXPORTS_W VideoCapture { public: diff --git a/modules/highgui/src/precomp.hpp b/modules/highgui/src/precomp.hpp index 5c0ed6e..bb4ed8e 100644 --- a/modules/highgui/src/precomp.hpp +++ b/modules/highgui/src/precomp.hpp @@ -196,6 +196,20 @@ double cvGetRatioWindow_GTK(const char* name); double cvGetOpenGlProp_W32(const char* name); double cvGetOpenGlProp_GTK(const char* name); +namespace cv +{ + class IVideoCapture + { + public: + virtual ~IVideoCapture() {} + virtual double getProperty(int) { return 0; } + virtual bool setProperty(int, double) { return 0; } + virtual bool grabFrame() = 0; + virtual bool retrieveFrame(int, cv::OutputArray) = 0; + virtual int getCaptureDomain() { return CAP_ANY; } // Return the type of the capture object: CAP_VFW, etc... + }; +}; + //for QT #if defined (HAVE_QT) double cvGetModeWindow_QT(const char* name); -- 2.7.4