CCIMXDesktop
 
Loading...
Searching...
No Matches
VideoPlayerOpencvImpl.h
1#ifndef VIDEOPLAYEROPENCVIMPL_H
2#define VIDEOPLAYEROPENCVIMPL_H
3#include "VideoPlayerImpl.h"
4namespace cv {
5class VideoCapture;
6}
7
14public:
16 ~VideoPlayerOpencvImpl() override;
17
22 int total_frame() const override;
23
28 int current_frame() override;
29
36 bool rollto_nextFrame(CVImage& container) override;
37
45 bool peek_frame(CVImage& container, int frame_request) override;
46
51 VideoPlayerInfo current_video_info() const override;
52
59 bool open(const char* filename,
60 VideoPlayerOpenErrorCode& error_code) override;
61
65 void close() override;
66
71 bool isOpened() const override;
72
78 void escapeFrame() override;
79
85 void jumpToFrame(int frame_request) override;
86
87private:
88 cv::VideoCapture* internal_capture { nullptr };
89 int internal_current_frame { INVALID_VIDEO_FRAME_N };
90};
91
92#endif // VIDEOPLAYEROPENCVIMPL_H
The CVImage class is the image class that provides the image in the frameworks.
Definition CVImage.h:9
The VideoPlayerImpl class VideoPlayerImpl is the interface for video player and the impl class is sup...
Definition VideoPlayerImpl.h:33
The VideoPlayerOpencvImpl class provides the OpenCV implementation of the video player.
Definition VideoPlayerOpencvImpl.h:13
void close() override
close close the video file
Definition VideoPlayerOpencvImpl.cpp:124
bool peek_frame(CVImage &container, int frame_request) override
peek_frame peek the frame of the video
Definition VideoPlayerOpencvImpl.cpp:58
int total_frame() const override
total_frame get the total frame of the video
Definition VideoPlayerOpencvImpl.cpp:28
void escapeFrame() override
escapeFrame escape the current frame
Definition VideoPlayerOpencvImpl.cpp:137
bool open(const char *filename, VideoPlayerOpenErrorCode &error_code) override
open open the video file
Definition VideoPlayerOpencvImpl.cpp:108
void jumpToFrame(int frame_request) override
jumpToFrame jump to the frame of the video
Definition VideoPlayerOpencvImpl.cpp:142
bool rollto_nextFrame(CVImage &container) override
rollto_nextFrame roll to the next frame
Definition VideoPlayerOpencvImpl.cpp:46
bool isOpened() const override
isOpened check if the video is opened
Definition VideoPlayerOpencvImpl.cpp:130
int current_frame() override
current_frame get the current frame of the video
Definition VideoPlayerOpencvImpl.cpp:37
VideoPlayerInfo current_video_info() const override
current_video_info get the current video information
Definition VideoPlayerOpencvImpl.cpp:96
The VideoPlayerInfo struct provides the video information.
Definition VideoPlayerImpl.h:22