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

#include <EncodeFilter.h>

Inheritance diagram for QtAV::VideoEncodeFilter:
QtAV::VideoFilter 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 QtAV::VideoFrame &frame)
 
- Signals inherited from QtAV::Filter
void enabledChanged (bool)
 

Public Member Functions

 VideoEncodeFilter (QObject *parent=0)
 
void setAsync (bool value=true)
 setAsync Enable async encoding. More...
 
bool isAsync () const
 
bool isSupported (VideoFilterContext::Type t) const Q_DECL_OVERRIDE
 
VideoEncodercreateEncoder (const QString &name=QLatin1String("FFmpeg"))
 createEncoder Destroy old encoder and create a new one. More...
 
VideoEncoderencoder () 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::VideoFilter
 VideoFilter (QObject *parent=0)
 
VideoFilterContextcontext ()
 
bool installTo (AVPlayer *player)
 installTo Install filter to player can process every frame before rendering. More...
 
bool installTo (AVOutput *output)
 installTo The process() function is in rendering thread. More...
 
void apply (Statistics *statistics, VideoFrame *frame=0)
 
bool prepareContext (VideoFilterContext *&ctx, Statistics *statistics=0, VideoFrame *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::VideoFrame &frame=VideoFrame())
 

Protected Member Functions

virtual void process (Statistics *statistics, VideoFrame *frame=0) Q_DECL_OVERRIDE
 
- Protected Member Functions inherited from QtAV::VideoFilter
 VideoFilter (VideoFilterPrivate &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

◆ VideoEncodeFilter()

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

Member Function Documentation

◆ createEncoder()

VideoEncoder* QtAV::VideoEncodeFilter::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

◆ encode

void QtAV::VideoEncodeFilter::encode ( const QtAV::VideoFrame frame = VideoFrame())
protectedslot

◆ encoder()

VideoEncoder* QtAV::VideoEncodeFilter::encoder ( ) const

encoder Use this to set encoder properties and options

Returns
Encoder instance or null if createEncoder failed

◆ finish

void QtAV::VideoEncodeFilter::finish ( )
slot

finish Tell the encoder no more frames to encode.

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

◆ finished

void QtAV::VideoEncodeFilter::finished ( )
signal

◆ frameEncoded

void QtAV::VideoEncodeFilter::frameEncoded ( const QtAV::Packet packet)
signal

◆ isAsync()

bool QtAV::VideoEncodeFilter::isAsync ( ) const

◆ isSupported()

bool QtAV::VideoEncodeFilter::isSupported ( VideoFilterContext::Type  t) const
inlinevirtual

Reimplemented from QtAV::VideoFilter.

◆ process()

virtual void QtAV::VideoEncodeFilter::process ( Statistics statistics,
VideoFrame frame = 0 
)
protectedvirtual

Implements QtAV::VideoFilter.

◆ readyToEncode

void QtAV::VideoEncodeFilter::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.

◆ requestToEncode

void QtAV::VideoEncodeFilter::requestToEncode ( const QtAV::VideoFrame frame)
signal

◆ setAsync()

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

setAsync Enable async encoding.

Default is disabled.

◆ setStartTime()

void QtAV::VideoEncodeFilter::setStartTime ( qint64  value)

◆ startTime()

qint64 QtAV::VideoEncodeFilter::startTime ( ) const

startTime start to encode after startTime()

◆ startTimeChanged

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

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