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

#include <VideoCapture.h>

Inheritance diagram for QtAV::VideoCapture:

Public Slots

void capture ()
 

Signals

void requested ()
 
void frameAvailable (const QtAV::VideoFrame &frame)
 frameAvailable Emitted when requested frame is available. More...
 
void imageCaptured (const QImage &image)
 imageCaptured Emitted when captured video frame is converted to a QImage. More...
 
void failed ()
 
void saved (const QString &path)
 saved Only for autoSave is true. More...
 
void asyncChanged ()
 
void autoSaveChanged ()
 
void originalFormatChanged ()
 
void saveFormatChanged ()
 
void qualityChanged ()
 
void captureNameChanged ()
 
void captureDirChanged ()
 

Public Member Functions

 VideoCapture (QObject *parent=0)
 
void setAsync (bool value=true)
 
bool isAsync () const
 
void setAutoSave (bool value=true)
 setAutoSave If auto save is true, then the captured video frame will be saved as a file when frame is available. More...
 
bool autoSave () const
 
void setOriginalFormat (bool value=true)
 setOriginalFormat Save the original frame, can be YUV, NV12 etc. More...
 
bool isOriginalFormat () const
 
void setSaveFormat (const QString &format)
 setFormat Set saved format. More...
 
QString saveFormat () const
 
void setQuality (int value)
 setQuality Set saved image quality. More...
 
int quality () const
 
void setCaptureName (const QString &value)
 name suffix is auto add empty name: filename_timestamp.format(suffix is videoframe.format.name() if save as raw data) If autoSave() is true, saved file name will add a timestamp string. More...
 
QString captureName () const
 
void setCaptureDir (const QString &value)
 
QString captureDir () const
 

Properties

bool async
 
bool autoSave
 
bool originalFormat
 
QString saveFormat
 
int quality
 
QString captureName
 
QString captureDir
 

Friends

class CaptureTask
 
class VideoThread
 

Constructor & Destructor Documentation

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

Member Function Documentation

void QtAV::VideoCapture::asyncChanged ( )
signal
bool QtAV::VideoCapture::autoSave ( ) const
void QtAV::VideoCapture::autoSaveChanged ( )
signal
void QtAV::VideoCapture::capture ( )
slot
QString QtAV::VideoCapture::captureDir ( ) const
void QtAV::VideoCapture::captureDirChanged ( )
signal
QString QtAV::VideoCapture::captureName ( ) const
void QtAV::VideoCapture::captureNameChanged ( )
signal
void QtAV::VideoCapture::failed ( )
signal
void QtAV::VideoCapture::frameAvailable ( const QtAV::VideoFrame frame)
signal

frameAvailable Emitted when requested frame is available.

void QtAV::VideoCapture::imageCaptured ( const QImage &  image)
signal

imageCaptured Emitted when captured video frame is converted to a QImage.

Parameters
image
bool QtAV::VideoCapture::isAsync ( ) const
bool QtAV::VideoCapture::isOriginalFormat ( ) const
void QtAV::VideoCapture::originalFormatChanged ( )
signal
int QtAV::VideoCapture::quality ( ) const
void QtAV::VideoCapture::qualityChanged ( )
signal
void QtAV::VideoCapture::requested ( )
signal
void QtAV::VideoCapture::saved ( const QString &  path)
signal

saved Only for autoSave is true.

Emitted when captured frame is saved.

Parameters
paththe saved captured frame path.
QString QtAV::VideoCapture::saveFormat ( ) const
void QtAV::VideoCapture::saveFormatChanged ( )
signal
void QtAV::VideoCapture::setAsync ( bool  value = true)
void QtAV::VideoCapture::setAutoSave ( bool  value = true)

setAutoSave If auto save is true, then the captured video frame will be saved as a file when frame is available.

Otherwise, signal ready() and finished() will be emitted without doing other things.

void QtAV::VideoCapture::setCaptureDir ( const QString &  value)
void QtAV::VideoCapture::setCaptureName ( const QString &  value)

name suffix is auto add empty name: filename_timestamp.format(suffix is videoframe.format.name() if save as raw data) If autoSave() is true, saved file name will add a timestamp string.

void QtAV::VideoCapture::setOriginalFormat ( bool  value = true)

setOriginalFormat Save the original frame, can be YUV, NV12 etc.

No format converting. default is false The file name suffix is video frame's format name in lower case, e.g. yuv420p, nv12. quality property will not take effect.

void QtAV::VideoCapture::setQuality ( int  value)

setQuality Set saved image quality.

Not be used if save original frame data.

Parameters
value0-100, larger is better quality. -1: default quality
void QtAV::VideoCapture::setSaveFormat ( const QString &  format)

setFormat Set saved format.

can be "PNG", "jpg" etc. Not be used if save raw frame data.

Parameters
formatimage format string like "png", "jpg"

Friends And Related Function Documentation

friend class CaptureTask
friend
friend class VideoThread
friend

Property Documentation

bool QtAV::VideoCapture::async
readwrite
bool QtAV::VideoCapture::autoSave
readwrite
QString QtAV::VideoCapture::captureDir
readwrite
QString QtAV::VideoCapture::captureName
readwrite
bool QtAV::VideoCapture::originalFormat
readwrite
int QtAV::VideoCapture::quality
readwrite
QString QtAV::VideoCapture::saveFormat
readwrite

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