29 #ifndef VFS_VIDEO_READER_UNIT2_H__ 30 #define VFS_VIDEO_READER_UNIT2_H__ 32 #include "base/base.h" 33 #include "video_framework/video_unit.h" 35 #include <opencv2/videoio.hpp> 38 struct AVCodecContext;
39 struct AVFormatContext;
48 std::string stream_name =
"VideoStream";
49 video_framework::VideoPixelFormat pixel_format =
50 video_framework::PIXEL_FORMAT_BGR24;
57 DOWNSCALE_TO_MIN_SIZE,
58 DOWNSCALE_TO_MAX_SIZE,
61 DOWNSCALE downscale = DOWNSCALE_NONE;
63 float downscale_factor = 1.0f;
64 int downscale_size = 0;
72 const std::string& video_file);
75 virtual bool OpenStreams(video_framework::StreamSet*
set);
76 virtual void ProcessFrame(video_framework::FrameSetPtr input,
77 std::list<video_framework::FrameSetPtr>* output);
78 virtual bool PostProcess(std::list<video_framework::FrameSetPtr>* append);
91 video_framework::VideoFrame* ReadNextFrame();
95 std::string video_file_;
97 int video_stream_idx_;
100 int frame_width_ = 0;
101 int frame_height_ = 0;
102 int frame_width_step_ = 0;
105 bool used_as_root_ =
true;
107 std::unique_ptr<cv::VideoCapture> m_cap;
113 #endif // VFS_VIDEO_READER_UNIT2_H__ Reads video frames from file into stream.
Definition: video_reader_unit2.h:69
Definition: video_reader_unit2.h:46
Definition: face_regions.cpp:43