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

◆ VideoCapture()

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

Member Function Documentation

◆ asyncChanged

void QtAV::VideoCapture::asyncChanged ( )
signal

◆ autoSave()

bool QtAV::VideoCapture::autoSave ( ) const

◆ autoSaveChanged

void QtAV::VideoCapture::autoSaveChanged ( )
signal

◆ capture

void QtAV::VideoCapture::capture ( )
slot

◆ captureDir()

QString QtAV::VideoCapture::captureDir ( ) const

◆ captureDirChanged

void QtAV::VideoCapture::captureDirChanged ( )
signal

◆ captureName()

QString QtAV::VideoCapture::captureName ( ) const

◆ captureNameChanged

void QtAV::VideoCapture::captureNameChanged ( )
signal

◆ failed

void QtAV::VideoCapture::failed ( )
signal

◆ frameAvailable

void QtAV::VideoCapture::frameAvailable ( const QtAV::VideoFrame frame)
signal

frameAvailable Emitted when requested frame is available.

◆ imageCaptured

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

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

Parameters
image

◆ isAsync()

bool QtAV::VideoCapture::isAsync ( ) const

◆ isOriginalFormat()

bool QtAV::VideoCapture::isOriginalFormat ( ) const

◆ originalFormatChanged

void QtAV::VideoCapture::originalFormatChanged ( )
signal

◆ quality()

int QtAV::VideoCapture::quality ( ) const

◆ qualityChanged

void QtAV::VideoCapture::qualityChanged ( )
signal

◆ requested

void QtAV::VideoCapture::requested ( )
signal

◆ saved

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.

◆ saveFormat()

QString QtAV::VideoCapture::saveFormat ( ) const

◆ saveFormatChanged

void QtAV::VideoCapture::saveFormatChanged ( )
signal

◆ setAsync()

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

◆ setAutoSave()

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.

◆ setCaptureDir()

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

◆ setCaptureName()

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.

◆ setOriginalFormat()

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.

◆ setQuality()

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

◆ setSaveFormat()

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

◆ CaptureTask

friend class CaptureTask
friend

◆ VideoThread

friend class VideoThread
friend

Property Documentation

◆ async

bool QtAV::VideoCapture::async
readwrite

◆ autoSave

bool QtAV::VideoCapture::autoSave
readwrite

◆ captureDir

QString QtAV::VideoCapture::captureDir
readwrite

◆ captureName

QString QtAV::VideoCapture::captureName
readwrite

◆ originalFormat

bool QtAV::VideoCapture::originalFormat
readwrite

◆ quality

int QtAV::VideoCapture::quality
readwrite

◆ saveFormat

QString QtAV::VideoCapture::saveFormat
readwrite

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