1 /*M/////////////////////////////////////////////////////////////////////////////////////// 2 // 3 // This file is part of OpenCV project. 4 // It is subject to the license terms in the LICENSE file found in the top-level directory 5 // of this distribution and at http://opencv.org/license.html. 6 // 7 // Copyright (C) 2014, Itseez, Inc., all rights reserved. 8 // Third party copyrights are property of their respective owners. 9 // 10 //M*/ 11 12 #ifndef _CAP_DSHOW_HPP_ 13 #define _CAP_DSHOW_HPP_ 14 15 #include "precomp.hpp" 16 17 #ifdef HAVE_DSHOW 18 19 class videoInput; 20 namespace cv 21 { 22 23 class VideoCapture_DShow : public IVideoCapture 24 { 25 public: 26 VideoCapture_DShow(int index); 27 virtual ~VideoCapture_DShow(); 28 29 virtual double getProperty(int propIdx) const; 30 virtual bool setProperty(int propIdx, double propVal); 31 32 virtual bool grabFrame(); 33 virtual bool retrieveFrame(int outputType, OutputArray frame); 34 virtual int getCaptureDomain(); 35 virtual bool isOpened() const; 36 protected: 37 void open(int index); 38 void close(); 39 40 int m_index, m_width, m_height, m_fourcc; 41 int m_widthSet, m_heightSet; 42 static videoInput g_VI; 43 }; 44 45 } 46 47 #endif //HAVE_DSHOW 48 #endif //_CAP_DSHOW_HPP_