Miam-Player  0.8.0
A nice music player
QtAV::VideoFrameExtractor Class Reference

#include <VideoFrameExtractor.h>

Inheritance diagram for QtAV::VideoFrameExtractor:

Public Slots

void extract ()
 extract If last extracted frame can be use, use it. More...
 

Signals

void frameExtracted (const QtAV::VideoFrame &frame)
 
void sourceChanged ()
 
void asyncChanged ()
 
void error ()
 
void autoExtractChanged ()
 
void positionChanged ()
 positionChanged If not autoExtract, positionChanged() => extract() in a slot More...
 
void precisionChanged ()
 
void aboutToExtract (qint64 pos)
 

Public Member Functions

 VideoFrameExtractor (QObject *parent=0)
 
void setSource (const QString url)
 setSource Set the video file. More...
 
QString source () const
 
void setAsync (bool value)
 setAsync Extract video frames in another thread. More...
 
bool async () const
 
void setAutoExtract (bool value)
 
bool autoExtract () const
 
void setPrecision (int value)
 setPrecision if the difference between the next requested position is less than the value, previous one is used and no positionChanged() and frameExtracted() signals to emit. More...
 
int precision () const
 
void setPosition (qint64 value)
 
qint64 position () const
 
virtual bool event (QEvent *e)
 

Properties

QString source
 
bool autoExtract
 
bool async
 
int precision
 
qint64 position
 

Constructor & Destructor Documentation

QtAV::VideoFrameExtractor::VideoFrameExtractor ( QObject *  parent = 0)
explicit

Member Function Documentation

void QtAV::VideoFrameExtractor::aboutToExtract ( qint64  pos)
signal
bool QtAV::VideoFrameExtractor::async ( ) const
void QtAV::VideoFrameExtractor::asyncChanged ( )
signal
bool QtAV::VideoFrameExtractor::autoExtract ( ) const
void QtAV::VideoFrameExtractor::autoExtractChanged ( )
signal
void QtAV::VideoFrameExtractor::error ( )
signal
virtual bool QtAV::VideoFrameExtractor::event ( QEvent *  e)
virtual
void QtAV::VideoFrameExtractor::extract ( )
slot

extract If last extracted frame can be use, use it.

If there is a key frame in [position, position+precision], the nearest key frame before position+precision will be extracted. Otherwise, the given position frame will be extracted.

void QtAV::VideoFrameExtractor::frameExtracted ( const QtAV::VideoFrame frame)
signal
qint64 QtAV::VideoFrameExtractor::position ( ) const
void QtAV::VideoFrameExtractor::positionChanged ( )
signal

positionChanged If not autoExtract, positionChanged() => extract() in a slot

int QtAV::VideoFrameExtractor::precision ( ) const
void QtAV::VideoFrameExtractor::precisionChanged ( )
signal
void QtAV::VideoFrameExtractor::setAsync ( bool  value)

setAsync Extract video frames in another thread.

Default is true. In async mode, if current extraction is not finished, new setPosition() will be ignored.

void QtAV::VideoFrameExtractor::setAutoExtract ( bool  value)
void QtAV::VideoFrameExtractor::setPosition ( qint64  value)
void QtAV::VideoFrameExtractor::setPrecision ( int  value)

setPrecision if the difference between the next requested position is less than the value, previous one is used and no positionChanged() and frameExtracted() signals to emit.

Parameters
value< 0: auto. Real value depends on video duration and fps, but always 20 <= value <=500 Default is auto.
void QtAV::VideoFrameExtractor::setSource ( const QString  url)

setSource Set the video file.

If video changes, current loaded video will be unloaded.

QString QtAV::VideoFrameExtractor::source ( ) const
void QtAV::VideoFrameExtractor::sourceChanged ( )
signal

Property Documentation

bool QtAV::VideoFrameExtractor::async
readwrite
bool QtAV::VideoFrameExtractor::autoExtract
readwrite
qint64 QtAV::VideoFrameExtractor::position
readwrite
int QtAV::VideoFrameExtractor::precision
readwrite
QString QtAV::VideoFrameExtractor::source
readwrite

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