X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=src%2FVideoReader.h;fp=src%2FVideoReader.h;h=0000000000000000000000000000000000000000;hb=79009fa0674d90e03b7a7bd958f7ee1e20d9b194;hp=79d39d04b4d36eb58bb1e3e00c0b9febf52cdadb;hpb=f4ff258d21cf7a785fe5f271f01942fde6d4d1b8;p=trackerpp.git diff --git a/src/VideoReader.h b/src/VideoReader.h deleted file mode 100644 index 79d39d0..0000000 --- a/src/VideoReader.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef _IVIDEO_READER_H_ -#define _IVIDEO_READER_H_ - -#include "SharedPtr.h" -#include -#include - -namespace suanzi { - - typedef enum { - URL, - File, - USB - } VideoSrcType; - - TK_DECLARE_PTR(VideoReaderFactory); - TK_DECLARE_PTR(VideoReader); - TK_DECLARE_PTR(URLReader); - - class VideoReaderFactory - { - public: - static VideoReaderPtr createVideoReader(VideoSrcType type, const std::string& url); - }; - - class VideoReader - { - public: - VideoReader(VideoSrcType type, const std::string& url) : type(type), url(url){} - - virtual ~VideoReader(); - virtual bool read(cv::Mat& mat){return true;} - - private: - VideoSrcType type; - - protected: - std::string url; - }; - - class UrlReader : public VideoReader - { - public: - UrlReader(VideoSrcType type, const std::string& url); - virtual ~UrlReader(); - bool read(cv::Mat& mat); - private: - cv::VideoCapture vcap; - }; - - class FileReader : public VideoReader - { - public: - FileReader(VideoSrcType type, const std::string& url):VideoReader(type, url){} - // void read(){}; - }; - - class UsbReader : public VideoReader - { - public: - UsbReader(VideoSrcType type, const std::string& url):VideoReader(type, url){} - // void read(){}; - }; - -} - - -#endif /* _IVIDEO_READER_H_ */