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

#include <EncodeFilter.h>

Inheritance diagram for QtAV::AudioEncodeFilter:
QtAV::AudioFilter QtAV::Filter

Public Slots

void finish ()
 finish Tell the encoder no more frames to encode. More...
 
- Public Slots inherited from QtAV::Filter
void setEnabled (bool enabled=true)
 

Signals

void finished ()
 
void readyToEncode ()
 readyToEncode Emitted when encoder is open. More...
 
void frameEncoded (const QtAV::Packet &packet)
 
void startTimeChanged (qint64 value)
 
void requestToEncode (const AudioFrame &frame)
 
- Signals inherited from QtAV::Filter
void enabledChanged (bool)
 

Public Member Functions

 AudioEncodeFilter (QObject *parent=0)
 
void setAsync (bool value=true)
 setAsync Enable async encoding. More...
 
bool isAsync () const
 
AudioEncodercreateEncoder (const QString &name=QLatin1String("FFmpeg"))
 createEncoder Destroy old encoder and create a new one. More...
 
AudioEncoderencoder () const
 encoder Use this to set encoder properties and options More...
 
qint64 startTime () const
 startTime start to encode after startTime() More...
 
void setStartTime (qint64 value)
 
- Public Member Functions inherited from QtAV::AudioFilter
 AudioFilter (QObject *parent=0)
 
bool installTo (AVPlayer *player)
 installTo Install filter to player can process every frame before rendering. More...
 
void apply (Statistics *statistics, AudioFrame *frame=0)
 
- Public Member Functions inherited from QtAV::Filter
virtual ~Filter ()
 
bool isEnabled () const
 
void setOwnedByTarget (bool value=true)
 setOwnedByTarget If a filter is owned by target, it's not safe to access the filter after it's installed to a target. More...
 
bool isOwnedByTarget () const
 
bool uninstall ()
 

Protected Slots

void encode (const QtAV::AudioFrame &frame=AudioFrame())
 

Protected Member Functions

virtual void process (Statistics *statistics, AudioFrame *frame=0) Q_DECL_OVERRIDE
 
- Protected Member Functions inherited from QtAV::AudioFilter
 AudioFilter (AudioFilterPrivate &d, QObject *parent=0)
 
- Protected Member Functions inherited from QtAV::Filter
 Filter (FilterPrivate &d, QObject *parent=0)
 

Additional Inherited Members

- Properties inherited from QtAV::Filter
bool enabled
 

Constructor & Destructor Documentation

QtAV::AudioEncodeFilter::AudioEncodeFilter ( QObject *  parent = 0)

Member Function Documentation

AudioEncoder* QtAV::AudioEncodeFilter::createEncoder ( const QString &  name = QLatin1String("FFmpeg"))

createEncoder Destroy old encoder and create a new one.

Filter has the ownership. Encoder will open when encoding first valid frame, and set width/height as frame's.

Parameters
nameregistered encoder name, for example "FFmpeg"
Returns
null if failed
void QtAV::AudioEncodeFilter::encode ( const QtAV::AudioFrame frame = AudioFrame())
protectedslot
AudioEncoder* QtAV::AudioEncodeFilter::encoder ( ) const

encoder Use this to set encoder properties and options

Returns
Encoder instance or null if createEncoder failed
void QtAV::AudioEncodeFilter::finish ( )
slot

finish Tell the encoder no more frames to encode.

Signal finished() will be emitted when all frames are encoded

void QtAV::AudioEncodeFilter::finished ( )
signal
void QtAV::AudioEncodeFilter::frameEncoded ( const QtAV::Packet packet)
signal
bool QtAV::AudioEncodeFilter::isAsync ( ) const
virtual void QtAV::AudioEncodeFilter::process ( Statistics statistics,
AudioFrame frame = 0 
)
protectedvirtual

Implements QtAV::AudioFilter.

void QtAV::AudioEncodeFilter::readyToEncode ( )
signal

readyToEncode Emitted when encoder is open.

All parameters are set and muxer can set codec properties now. close the encoder() to reset and reopen.

void QtAV::AudioEncodeFilter::requestToEncode ( const AudioFrame frame)
signal
void QtAV::AudioEncodeFilter::setAsync ( bool  value = true)

setAsync Enable async encoding.

Default is disabled.

void QtAV::AudioEncodeFilter::setStartTime ( qint64  value)
qint64 QtAV::AudioEncodeFilter::startTime ( ) const

startTime start to encode after startTime()

void QtAV::AudioEncodeFilter::startTimeChanged ( qint64  value)
signal

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