1 #ifndef _IVIDEO_READER_H_
2 #define _IVIDEO_READER_H_
6 #include <opencv2/opencv.hpp>
16 TK_DECLARE_PTR(VideoReaderFactory);
17 TK_DECLARE_PTR(VideoReader);
18 TK_DECLARE_PTR(URLReader);
20 class VideoReaderFactory
23 static VideoReaderPtr createVideoReader(VideoSrcType type, const std::string& url);
29 VideoReader(VideoSrcType type, const std::string& url) : type(type), url(url){}
31 virtual ~VideoReader();
32 virtual bool read(cv::Mat& mat){return true;}
41 class UrlReader : public VideoReader
44 UrlReader(VideoSrcType type, const std::string& url);
46 bool read(cv::Mat& mat);
48 cv::VideoCapture vcap;
51 class FileReader : public VideoReader
54 FileReader(VideoSrcType type, const std::string& url):VideoReader(type, url){}
58 class UsbReader : public VideoReader
61 UsbReader(VideoSrcType type, const std::string& url):VideoReader(type, url){}
68 #endif /* _IVIDEO_READER_H_ */