Miam-Player  0.8.0
A nice music player
QtAV::AVDecoder Class Referenceabstract

#include <AVDecoder.h>

Inheritance diagram for QtAV::AVDecoder:
QtAV::AudioDecoder QtAV::VideoDecoder

Signals

void error (const QtAV::AVError &e)
 
void descriptionChanged ()
 

Public Member Functions

virtual ~AVDecoder ()
 
virtual QString name () const
 
virtual QString description () const
 
virtual bool open ()
 default is open FFmpeg codec context codec config must be done before open NOTE: open() and close() are not thread safe. More...
 
virtual bool close ()
 
bool isOpen () const
 
virtual void flush ()
 
void setCodecContext (void *codecCtx)
 
void * codecContext () const
 
bool isAvailable () const
 
virtual bool decode (const Packet &packet)=0
 
int undecodedSize () const
 
void setOptions (const QVariantHash &dict)
 setOptions More...
 
QVariantHash options () const
 

Protected Member Functions

 AVDecoder (AVDecoderPrivate &d)
 
void setCodecName (const QString &name)
 
QString codecName () const
 
virtual void codecNameChanged ()
 

Constructor & Destructor Documentation

virtual QtAV::AVDecoder::~AVDecoder ( )
virtual
QtAV::AVDecoder::AVDecoder ( AVDecoderPrivate d)
protected

Member Function Documentation

virtual bool QtAV::AVDecoder::close ( )
virtual
void* QtAV::AVDecoder::codecContext ( ) const
QString QtAV::AVDecoder::codecName ( ) const
protected
virtual void QtAV::AVDecoder::codecNameChanged ( )
inlineprotectedvirtual
virtual bool QtAV::AVDecoder::decode ( const Packet packet)
pure virtual
virtual QString QtAV::AVDecoder::description ( ) const
virtual
void QtAV::AVDecoder::descriptionChanged ( )
signal
void QtAV::AVDecoder::error ( const QtAV::AVError e)
signal
virtual void QtAV::AVDecoder::flush ( )
virtual
bool QtAV::AVDecoder::isAvailable ( ) const
bool QtAV::AVDecoder::isOpen ( ) const
virtual QString QtAV::AVDecoder::name ( ) const
virtual

Reimplemented in QtAV::VideoDecoder, and QtAV::AudioDecoder.

virtual bool QtAV::AVDecoder::open ( )
virtual

default is open FFmpeg codec context codec config must be done before open NOTE: open() and close() are not thread safe.

You'd better call them in the same thread.

QVariantHash QtAV::AVDecoder::options ( ) const
void QtAV::AVDecoder::setCodecContext ( void *  codecCtx)
void QtAV::AVDecoder::setCodecName ( const QString &  name)
protected
void QtAV::AVDecoder::setOptions ( const QVariantHash &  dict)

setOptions

  1. If has key "avcodec", it's value (suboption, a hash or map) will be used to set AVCodecContext use av_opt_set and av_dict_set. A value of hash type is ignored. we can ignore the flags used in av_dict_xxx because we can use hash api. empty value does nothing to current context if it is open, but will clear AVDictionary in the next open. AVDictionary is used in avcodec_open2() and will not change unless user call setOptions().
  2. Set QObject properties for AVDecoder. Use AVDecoder::name() or lower case as a key to set properties. If key not found, assume key is "avcodec"
  3. If no ket AVDecoder::name() found in the option, set key-value pairs as QObject property-value pairs.
    Parameters
    dictexample: "avcodec": {"vismv":"pf"}, "vaapi":{"display":"DRM"}, "copyMode": "ZeroCopy" means set avcodec context option vismv=>pf, VA-API display (qt property) to DRM when using VA-API, set copyMode (GPU decoders) property to ZeroCopy
int QtAV::AVDecoder::undecodedSize ( ) const

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