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

#include <Frame.h>

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

Public Member Functions

 Frame (const Frame &other)
 
virtual ~Frame ()=0
 
Frameoperator= (const Frame &other)
 
int planeCount () const
 planeCount a decoded frame can be packed and planar. More...
 
virtual int channelCount () const
 channelCount for audio, channel count equals plane count for video, channels >= planes 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)
 

Protected Member Functions

 Frame (FramePrivate *d)
 

Protected Attributes

QExplicitlySharedDataPointer< FramePrivated_ptr
 

Constructor & Destructor Documentation

◆ Frame() [1/2]

QtAV::Frame::Frame ( const Frame other)

◆ ~Frame()

virtual QtAV::Frame::~Frame ( )
pure virtual

◆ Frame() [2/2]

QtAV::Frame::Frame ( FramePrivate d)
protected

Member Function Documentation

◆ availableMetaData()

QVariantMap QtAV::Frame::availableMetaData ( ) const

◆ bits() [1/2]

uchar* QtAV::Frame::bits ( int  plane = 0)

◆ bits() [2/2]

const uchar* QtAV::Frame::bits ( int  plane = 0) const
inline

◆ bytesPerLine()

int QtAV::Frame::bytesPerLine ( int  plane = 0) const

bytesPerLine For video, it's size of each picture line.

For audio, it's the whole size of plane

Parameters
plane
Returns
line size of plane

◆ channelCount()

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

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

Returns

Reimplemented in QtAV::VideoFrame, and QtAV::AudioFrame.

◆ constBits()

const uchar* QtAV::Frame::constBits ( int  plane = 0) const

◆ data()

QByteArray QtAV::Frame::data ( int  plane = 0) const

◆ frameData()

QByteArray QtAV::Frame::frameData ( ) const

◆ metaData()

QVariant QtAV::Frame::metaData ( const QString &  key) const

◆ operator=()

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

◆ planeCount()

int QtAV::Frame::planeCount ( ) const

planeCount a decoded frame can be packed and planar.

packed format has only 1 plane, while planar format has more than 1 plane. For audio, the number plane equals channel count. For video, rgb is 1 plane, yuv420p is 3 plane, p means planar

Parameters
planedefault is the first plane
Returns

◆ setBits() [1/3]

void QtAV::Frame::setBits ( uchar *  b,
int  plane = 0 
)

setBits does nothing if plane is invalid.

if given array size is greater than planeCount(), only planeCount() elements is used

Parameters
bslice
planecolor/audio channel

◆ setBits() [2/3]

void QtAV::Frame::setBits ( const QVector< uchar *> &  b)

◆ setBits() [3/3]

void QtAV::Frame::setBits ( quint8 *  slice[])

◆ setBytesPerLine() [1/3]

void QtAV::Frame::setBytesPerLine ( int  lineSize,
int  plane = 0 
)

setBytesPerLine does nothing if plane is invalid.

if given array size is greater than planeCount(), only planeCount() elements is used

◆ setBytesPerLine() [2/3]

void QtAV::Frame::setBytesPerLine ( const QVector< int > &  lineSize)

◆ setBytesPerLine() [3/3]

void QtAV::Frame::setBytesPerLine ( int  stride[])

◆ setMetaData()

void QtAV::Frame::setMetaData ( const QString &  key,
const QVariant &  value 
)

◆ setTimestamp()

void QtAV::Frame::setTimestamp ( qreal  ts)

◆ swap()

void QtAV::Frame::swap ( Frame other)
inline

◆ timestamp()

qreal QtAV::Frame::timestamp ( ) const

Member Data Documentation

◆ d_ptr

QExplicitlySharedDataPointer<FramePrivate> QtAV::Frame::d_ptr
protected

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