1#ifndef VIDEOPLAYERIMPL_H
2#define VIDEOPLAYERIMPL_H
5static constexpr short INVALID_VIDEO_FRAME_N = -1;
11enum class VideoPlayerOpenErrorCode {
111 virtual bool open(
const char* filename, VideoPlayerOpenErrorCode& error_code) = 0;
The CVImage class is the image class that provides the image in the frameworks.
Definition CVImage.h:9
The VideoPlayerImplFactory class is the factory class for the video player impl.
Definition VideoPlayerImpl.h:131
static VideoPlayerImpl * request_impl()
request_impl fetch the IMPL according platform/backend framework
The VideoPlayerImpl class VideoPlayerImpl is the interface for video player and the impl class is sup...
Definition VideoPlayerImpl.h:33
virtual bool rollto_nextFrame(CVImage &container)=0
rollto_nextFrame roll to the next frame
virtual int current_frame()=0
current_frame get the current frame of the video
Q_DISABLE_COPY(VideoPlayerImpl)
Copy is not acceptable for video.
virtual bool open(const char *filename, VideoPlayerOpenErrorCode &error_code)=0
open open the video file
virtual bool peek_frame(CVImage &container, int frame_request)=0
peek_frame peek the frame of the video
VideoPlayerImpl()=default
Construct a new Video Player Impl object.
virtual void close()=0
close close the video file
virtual void escapeFrame()=0
escapeFrame escape the current frame
virtual int total_frame() const =0
total_frame get the total frame of the video
virtual VideoPlayerInfo current_video_info() const =0
current_video_info get the current video information
virtual void jumpToFrame(int frame_request)=0
jumpToFrame jump to the frame of the video
virtual bool isOpened() const =0
isOpened check if the video is opened
The VideoPlayerInfo struct provides the video information.
Definition VideoPlayerImpl.h:22
int width
video width
Definition VideoPlayerImpl.h:24
int height
video height
Definition VideoPlayerImpl.h:25
int fps
fps
Definition VideoPlayerImpl.h:23