26 lines
573 B
C++
26 lines
573 B
C++
#ifndef VIDEO_READER_HH_
|
|
# define VIDEO_READER_HH_
|
|
|
|
# include <string>
|
|
# include "tbb/pipeline.h"
|
|
|
|
class VideoReader: public tbb::filter
|
|
{
|
|
public:
|
|
VideoReader(const VideoReader& vr);
|
|
VideoReader(std::string filename) : filter(tbb::filter::serial_in_order),
|
|
capture_(filename), current_(0) {}
|
|
int framecount_get();
|
|
int fps_get();
|
|
int width_get();
|
|
int height_get();
|
|
void maxframe_set(int limit);
|
|
void* operator()(void*);
|
|
private:
|
|
cv::VideoCapture capture_;
|
|
int maxframe_;
|
|
int current_;
|
|
};
|
|
|
|
#endif /* !VIDEO_READER_HH_ */
|