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

#include <AudioFrame.h>

Inheritance diagram for QtAV::AudioFrame:
QtAV::Frame

Public Member Functions

 AudioFrame (const AudioFormat &format=AudioFormat(), const QByteArray &data=QByteArray())
 AudioFrame construct an audio frame from a given buffer and format. More...
 
 AudioFrame (const AudioFrame &other)
 
virtual ~AudioFrame ()
 
AudioFrameoperator= (const AudioFrame &other)
 
bool isValid () const
 
 operator bool () const
 
QByteArray data ()
 data Audio data. More...
 
virtual int channelCount () const
 channelCount for audio, channel count equals plane count for video, channels >= planes More...
 
AudioFrame clone () const
 Deep copy. More...
 
AudioFormat format () const
 
void setSamplesPerChannel (int samples)
 
int samplesPerChannel () const
 
AudioFrame to (const AudioFormat &fmt) const
 
void setAudioResampler (AudioResampler *conv)
 
qint64 duration () const
 Returns the number of microseconds represented by bytes in this format. More...
 
- Public Member Functions inherited from QtAV::Frame
 Frame (const Frame &other)
 
virtual ~Frame ()=0
 
Frameoperator= (const Frame &other)
 
int planeCount () const
 planeCount a decoded frame can be packed and planar. More...
 
int bytesPerLine (int plane=0) const
 bytesPerLine For video, it's size of each picture line. More...
 
QByteArray frameData () const
 
QByteArray data (int plane=0) const
 
uchar * bits (int plane=0)
 
const uchar * bits (int plane=0) const
 
const uchar * constBits (int plane=0) const
 
void setBits (uchar *b, int plane=0)
 setBits does nothing if plane is invalid. More...
 
void setBits (const QVector< uchar *> &b)
 
void setBits (quint8 *slice[])
 
void setBytesPerLine (int lineSize, int plane=0)
 setBytesPerLine does nothing if plane is invalid. More...
 
void setBytesPerLine (const QVector< int > &lineSize)
 
void setBytesPerLine (int stride[])
 
QVariantMap availableMetaData () const
 
QVariant metaData (const QString &key) const
 
void setMetaData (const QString &key, const QVariant &value)
 
void setTimestamp (qreal ts)
 
qreal timestamp () const
 
void swap (Frame &other)
 

Additional Inherited Members

- Protected Member Functions inherited from QtAV::Frame
 Frame (FramePrivate *d)
 
- Protected Attributes inherited from QtAV::Frame
QExplicitlySharedDataPointer< FramePrivated_ptr
 

Constructor & Destructor Documentation

◆ AudioFrame() [1/2]

QtAV::AudioFrame::AudioFrame ( const AudioFormat format = AudioFormat(),
const QByteArray &  data = QByteArray() 
)

AudioFrame construct an audio frame from a given buffer and format.

◆ AudioFrame() [2/2]

QtAV::AudioFrame::AudioFrame ( const AudioFrame other)

◆ ~AudioFrame()

virtual QtAV::AudioFrame::~AudioFrame ( )
virtual

Member Function Documentation

◆ channelCount()

virtual int QtAV::AudioFrame::channelCount ( ) const
virtual

channelCount for audio, channel count equals plane count for video, channels >= planes

Returns

Reimplemented from QtAV::Frame.

◆ clone()

AudioFrame QtAV::AudioFrame::clone ( ) const

Deep copy.

If you want to copy data from somewhere, knowing the format, width and height, then you can use clone().

◆ data()

QByteArray QtAV::AudioFrame::data ( )

data Audio data.

clone is called if frame is not constructed with a QByteArray.

Returns

◆ duration()

qint64 QtAV::AudioFrame::duration ( ) const

Returns the number of microseconds represented by bytes in this format.

Returns 0 if this format is not valid. Note that some rounding may occur if bytes is not an exact multiple of the number of bytes per frame.

◆ format()

AudioFormat QtAV::AudioFrame::format ( ) const

◆ isValid()

bool QtAV::AudioFrame::isValid ( ) const

◆ operator bool()

QtAV::AudioFrame::operator bool ( ) const
inline

◆ operator=()

AudioFrame& QtAV::AudioFrame::operator= ( const AudioFrame other)

◆ samplesPerChannel()

int QtAV::AudioFrame::samplesPerChannel ( ) const

◆ setAudioResampler()

void QtAV::AudioFrame::setAudioResampler ( AudioResampler conv)

◆ setSamplesPerChannel()

void QtAV::AudioFrame::setSamplesPerChannel ( int  samples)

◆ to()

AudioFrame QtAV::AudioFrame::to ( const AudioFormat fmt) const

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