CCIMXDesktop
 
Loading...
Searching...
No Matches
VideoPlayer Class Reference
Inheritance diagram for VideoPlayer:

Signals

void openError (const VideoPlayerOpenErrorCode error)
 openError the signal indicating the open error
 
void frameReady (const CVImage image)
 frameReady the signal indicating the frame is ready
 
void about_fetch_frame ()
 about_fetch_frame the signal indicating the frame is ready
 
void videoEnd ()
 videoEnd the signal indicating the video end
 
void openError (const VideoPlayerOpenErrorCode error)
 openError the signal indicating the open error
 
void frameReady (const CVImage image)
 frameReady the signal indicating the frame is ready
 
void about_fetch_frame ()
 about_fetch_frame the signal indicating the frame is ready
 
void videoEnd ()
 videoEnd the signal indicating the video end
 

Public Member Functions

 VideoPlayer (QObject *parent=nullptr)
 Construct a new Video Player object.
 
bool open (const char *video_path)
 open open the video file
 
QString current_handle () const
 current_handle get the current handle
 
bool close ()
 close close the video file
 
bool play ()
 play start the video play
 
bool pause ()
 pause stop the video play
 
int total_frame () const
 total_frame get the total frame of the video
 
int total_msecs () const
 total_msecs get the total mseconds of the video
 
VideoPlayerInfo get_info () const
 get_info get the info of the video
 
int current_frame () const
 current_frame get the current frame of the video
 
bool valid_video () const
 valid_video check if the video is valid
 
bool is_playing () const
 is_playing check if the video is playing
 
qint64 currentFrameMSec () const
 currentFrameMSec get the current frame in mseconds
 
bool setCurrentFrameMSec (const qint64 msec)
 setCurrentFrameMSec set the current frame in mseconds
 
void escapeFrame ()
 escapeFrame escape the current frame
 
bool peekFrame (CVImage &container, int frame_request)
 peekFrame peek the frame of the video
 
 VideoPlayer (QObject *parent=nullptr)
 Construct a new Video Player object.
 
bool open (const char *video_path)
 open open the video file
 
QString current_handle () const
 current_handle get the current handle
 
bool close ()
 close close the video file
 
bool play ()
 play start the video play
 
bool pause ()
 pause stop the video play
 
int total_frame () const
 total_frame get the total frame of the video
 
int total_msecs () const
 total_msecs get the total mseconds of the video
 
VideoPlayerInfo get_info () const
 get_info get the info of the video
 
int current_frame () const
 current_frame get the current frame of the video
 
bool valid_video () const
 valid_video check if the video is valid
 
bool is_playing () const
 is_playing check if the video is playing
 
qint64 currentFrameMSec () const
 currentFrameMSec get the current frame in mseconds
 
bool setCurrentFrameMSec (const qint64 msec)
 setCurrentFrameMSec set the current frame in mseconds
 
void escapeFrame ()
 escapeFrame escape the current frame
 
bool peekFrame (CVImage &container, int frame_request)
 peekFrame peek the frame of the video
 

Constructor & Destructor Documentation

◆ VideoPlayer() [1/2]

VideoPlayer::VideoPlayer ( QObject *  parent = nullptr)
explicit

Construct a new Video Player object.

Parameters
parent

◆ VideoPlayer() [2/2]

VideoPlayer::VideoPlayer ( QObject *  parent = nullptr)
explicit

Construct a new Video Player object.

Parameters
parent

Member Function Documentation

◆ close() [1/2]

bool VideoPlayer::close ( )

close close the video file

Returns
true if the video is closed successfully

◆ close() [2/2]

bool VideoPlayer::close ( )

close close the video file

Returns
true if the video is closed successfully

◆ current_frame() [1/2]

int VideoPlayer::current_frame ( ) const

current_frame get the current frame of the video

Returns
the current frame of the video

◆ current_frame() [2/2]

int VideoPlayer::current_frame ( ) const

current_frame get the current frame of the video

Returns
the current frame of the video

◆ current_handle() [1/2]

QString VideoPlayer::current_handle ( ) const
inline

current_handle get the current handle

Returns
the current handle

◆ current_handle() [2/2]

QString VideoPlayer::current_handle ( ) const
inline

current_handle get the current handle

Returns
the current handle

◆ currentFrameMSec() [1/2]

qint64 VideoPlayer::currentFrameMSec ( ) const

currentFrameMSec get the current frame in mseconds

Returns
the current frame in mseconds

◆ currentFrameMSec() [2/2]

qint64 VideoPlayer::currentFrameMSec ( ) const

currentFrameMSec get the current frame in mseconds

Returns
the current frame in mseconds

◆ escapeFrame() [1/2]

void VideoPlayer::escapeFrame ( )

escapeFrame escape the current frame

Note
this will escape only one frame, if you wanna escape frames, use for loops

◆ escapeFrame() [2/2]

void VideoPlayer::escapeFrame ( )

escapeFrame escape the current frame

Note
this will escape only one frame, if you wanna escape frames, use for loops

◆ frameReady [1/2]

void VideoPlayer::frameReady ( const CVImage  image)
signal

frameReady the signal indicating the frame is ready

Parameters
imagethe image to display
Note
the request will send the image waiting display

◆ frameReady [2/2]

void VideoPlayer::frameReady ( const CVImage  image)
signal

frameReady the signal indicating the frame is ready

Parameters
imagethe image to display
Note
the request will send the image waiting display

◆ get_info() [1/2]

VideoPlayerInfo VideoPlayer::get_info ( ) const
inline

get_info get the info of the video

Returns
the info of the video, including frame info, fps like and so on

◆ get_info() [2/2]

VideoPlayerInfo VideoPlayer::get_info ( ) const
inline

get_info get the info of the video

Returns
the info of the video, including frame info, fps like and so on

◆ is_playing() [1/2]

bool VideoPlayer::is_playing ( ) const

is_playing check if the video is playing

Returns
true if the video is playing

◆ is_playing() [2/2]

bool VideoPlayer::is_playing ( ) const

is_playing check if the video is playing

Returns
true if the video is playing

◆ open() [1/2]

bool VideoPlayer::open ( const char *  video_path)

open open the video file

Parameters
video_paththe video path to open
Returns
true if the video is opened successfully

◆ open() [2/2]

bool VideoPlayer::open ( const char *  video_path)

open open the video file

Parameters
video_paththe video path to open
Returns
true if the video is opened successfully

◆ openError [1/2]

void VideoPlayer::openError ( const VideoPlayerOpenErrorCode  error)
signal

openError the signal indicating the open error

Parameters
errorthe error code

◆ openError [2/2]

void VideoPlayer::openError ( const VideoPlayerOpenErrorCode  error)
signal

openError the signal indicating the open error

Parameters
errorthe error code

◆ pause() [1/2]

bool VideoPlayer::pause ( )

pause stop the video play

Returns
true if the video is paused successfully

◆ pause() [2/2]

bool VideoPlayer::pause ( )

pause stop the video play

Returns
true if the video is paused successfully

◆ peekFrame() [1/2]

bool VideoPlayer::peekFrame ( CVImage container,
int  frame_request 
)

peekFrame peek the frame of the video

Parameters
containerthe container to store the frame
frame_requestthe frame requested
Returns
true if the frame is peeked successfully

◆ peekFrame() [2/2]

bool VideoPlayer::peekFrame ( CVImage container,
int  frame_request 
)

peekFrame peek the frame of the video

Parameters
containerthe container to store the frame
frame_requestthe frame requested
Returns
true if the frame is peeked successfully

◆ play() [1/2]

bool VideoPlayer::play ( )

play start the video play

Returns
true if the video is played successfully

◆ play() [2/2]

bool VideoPlayer::play ( )

play start the video play

Returns
true if the video is played successfully

◆ setCurrentFrameMSec() [1/2]

bool VideoPlayer::setCurrentFrameMSec ( const qint64  msec)

setCurrentFrameMSec set the current frame in mseconds

Parameters
msecthe mseconds to set
Returns
true if the mseconds is set successfully

◆ setCurrentFrameMSec() [2/2]

bool VideoPlayer::setCurrentFrameMSec ( const qint64  msec)

setCurrentFrameMSec set the current frame in mseconds

Parameters
msecthe mseconds to set
Returns
true if the mseconds is set successfully

◆ total_frame() [1/2]

int VideoPlayer::total_frame ( ) const

total_frame get the total frame of the video

Returns
the total frame of the video

◆ total_frame() [2/2]

int VideoPlayer::total_frame ( ) const

total_frame get the total frame of the video

Returns
the total frame of the video

◆ total_msecs() [1/2]

int VideoPlayer::total_msecs ( ) const
inline

total_msecs get the total mseconds of the video

Returns
the total mseconds of the video

◆ total_msecs() [2/2]

int VideoPlayer::total_msecs ( ) const
inline

total_msecs get the total mseconds of the video

Returns
the total mseconds of the video

◆ valid_video() [1/2]

bool VideoPlayer::valid_video ( ) const

valid_video check if the video is valid

Returns
true if the video is valid

◆ valid_video() [2/2]

bool VideoPlayer::valid_video ( ) const

valid_video check if the video is valid

Returns
true if the video is valid

The documentation for this class was generated from the following files: