VidMag
Eulerian Video Magnification
Signals | Public Member Functions | Protected Member Functions | List of all members
VideoPlayer Class Reference

#include <VideoPlayer.h>

Inherits QThread.

Signals

void processedImage (const QImage &image)
 

Public Member Functions

 VideoPlayer (VideoManager *videoManager, QObject *parent=0)
 
 ~VideoPlayer ()
 
bool loadVideo (std::string filename)
 
void Play ()
 
void Stop ()
 
bool isStopped () const
 
void setCurrentFrame (int frameNumber)
 
double getFrameRate ()
 
double getCurrentFrame ()
 
double getNumberOfFrames ()
 

Protected Member Functions

void run ()
 
void msleep (int ms)
 

Constructor & Destructor Documentation

VideoPlayer::VideoPlayer ( VideoManager videoManager,
QObject *  parent = 0 
)
VideoPlayer::~VideoPlayer ( )

Member Function Documentation

double VideoPlayer::getCurrentFrame ( )
Returns
current frame from the VideoManager
double VideoPlayer::getFrameRate ( )
Returns
frame rate of the video
double VideoPlayer::getNumberOfFrames ( )
Returns
total number of frames in the video
bool VideoPlayer::isStopped ( ) const
Returns
whether playback is stopped
bool VideoPlayer::loadVideo ( std::string  filename)

Sets new input video file in VideoManager and gets the video frame rate.

Parameters
filenameThe path to the new input video file.
Returns
true if loading was successful
void VideoPlayer::msleep ( int  ms)
protected

Capsules the sleep-method of QThread.

Parameters
msmillisecs to sleep
void VideoPlayer::Play ( )

If player is not running, starts the player thread at low priority.

void VideoPlayer::processedImage ( const QImage &  image)
signal
void VideoPlayer::run ( )
protected

Gets a frame from the VideoManager, transforms it to a QImage and emits it as processedImage signal. (Overrides the run-method of the thread.)

void VideoPlayer::setCurrentFrame ( int  frameNumber)

Jumps to the specified frame in the VideoManager

Parameters
frameNumber
void VideoPlayer::Stop ( )

Stops playback.


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