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

QtAV::Frame::Frame ( const Frame other)
virtual QtAV::Frame::~Frame ( )
pure virtual
QtAV::Frame::Frame ( FramePrivate d)
protected

Member Function Documentation

QVariantMap QtAV::Frame::availableMetaData ( ) const
uchar* QtAV::Frame::bits ( int  plane = 0)
const uchar* QtAV::Frame::bits ( int  plane = 0) const
inline
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
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.

const uchar* QtAV::Frame::constBits ( int  plane = 0) const
QByteArray QtAV::Frame::data ( int  plane = 0) const
QByteArray QtAV::Frame::frameData ( ) const
QVariant QtAV::Frame::metaData ( const QString &  key) const
Frame& QtAV::Frame::operator= ( const Frame other)
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
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
void QtAV::Frame::setBits ( const QVector< uchar * > &  b)
void QtAV::Frame::setBits ( quint8 *  slice[])
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

void QtAV::Frame::setBytesPerLine ( const QVector< int > &  lineSize)
void QtAV::Frame::setBytesPerLine ( int  stride[])
void QtAV::Frame::setMetaData ( const QString &  key,
const QVariant &  value 
)
void QtAV::Frame::setTimestamp ( qreal  ts)
void QtAV::Frame::swap ( Frame other)
inline
qreal QtAV::Frame::timestamp ( ) const

Member Data Documentation

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

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