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

◆ ~AVDecoder()

virtual QtAV::AVDecoder::~AVDecoder ( )
virtual

◆ AVDecoder()

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

Member Function Documentation

◆ close()

virtual bool QtAV::AVDecoder::close ( )
virtual

◆ codecContext()

void* QtAV::AVDecoder::codecContext ( ) const

◆ codecName()

QString QtAV::AVDecoder::codecName ( ) const
protected

◆ codecNameChanged()

virtual void QtAV::AVDecoder::codecNameChanged ( )
inlineprotectedvirtual

◆ decode()

virtual bool QtAV::AVDecoder::decode ( const Packet packet)
pure virtual

◆ description()

virtual QString QtAV::AVDecoder::description ( ) const
virtual

◆ descriptionChanged

void QtAV::AVDecoder::descriptionChanged ( )
signal

◆ error

void QtAV::AVDecoder::error ( const QtAV::AVError e)
signal

◆ flush()

virtual void QtAV::AVDecoder::flush ( )
virtual

◆ isAvailable()

bool QtAV::AVDecoder::isAvailable ( ) const

◆ isOpen()

bool QtAV::AVDecoder::isOpen ( ) const

◆ name()

virtual QString QtAV::AVDecoder::name ( ) const
virtual

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

◆ open()

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.

◆ options()

QVariantHash QtAV::AVDecoder::options ( ) const

◆ setCodecContext()

void QtAV::AVDecoder::setCodecContext ( void *  codecCtx)

◆ setCodecName()

void QtAV::AVDecoder::setCodecName ( const QString &  name)
protected

◆ setOptions()

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

◆ undecodedSize()

int QtAV::AVDecoder::undecodedSize ( ) const

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