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

#include <Packet.h>

Public Member Functions

 Packet ()
 
 ~Packet ()
 
 Packet (const Packet &other)
 
Packetoperator= (const Packet &other)
 
bool isEOF () const
 
bool isValid () const
 
const AVPacketasAVPacket () const
 asAVPacket If Packet is constructed from AVPacket, then data and properties are the same as that AVPacket. More...
 
void skip (int bytes)
 skip Skip bytes of packet data. More...
 

Static Public Member Functions

static Packet fromAVPacket (const AVPacket *avpkt, double time_base)
 
static bool fromAVPacket (Packet *pkt, const AVPacket *avpkt, double time_base)
 
static Packet createEOF ()
 

Public Attributes

bool hasKeyFrame
 
bool isCorrupt
 
QByteArray data
 
qreal pts
 
qreal duration
 
qreal dts
 
qint64 position
 

Constructor & Destructor Documentation

QtAV::Packet::Packet ( )
QtAV::Packet::~Packet ( )
QtAV::Packet::Packet ( const Packet other)

Member Function Documentation

const AVPacket* QtAV::Packet::asAVPacket ( ) const

asAVPacket If Packet is constructed from AVPacket, then data and properties are the same as that AVPacket.

Otherwise, Packet's data and properties are used and no side data. Packet takes the owner ship. time unit is always ms even constructed from AVPacket.

static Packet QtAV::Packet::createEOF ( )
static
static Packet QtAV::Packet::fromAVPacket ( const AVPacket avpkt,
double  time_base 
)
static
static bool QtAV::Packet::fromAVPacket ( Packet pkt,
const AVPacket avpkt,
double  time_base 
)
static
bool QtAV::Packet::isEOF ( ) const
bool QtAV::Packet::isValid ( ) const
inline

data.isEmpty()?

Packet& QtAV::Packet::operator= ( const Packet other)
void QtAV::Packet::skip ( int  bytes)

skip Skip bytes of packet data.

User has to update pts, dts etc to new values. Useful for asAVPakcet(). When asAVPakcet() is called, AVPacket->pts/dts will be updated to new values.

Member Data Documentation

QByteArray QtAV::Packet::data
qreal QtAV::Packet::dts
qreal QtAV::Packet::duration
bool QtAV::Packet::hasKeyFrame
bool QtAV::Packet::isCorrupt
qint64 QtAV::Packet::position
qreal QtAV::Packet::pts

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