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

◆ Packet() [1/2]

QtAV::Packet::Packet ( )

◆ ~Packet()

QtAV::Packet::~Packet ( )

◆ Packet() [2/2]

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

Member Function Documentation

◆ asAVPacket()

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.

◆ createEOF()

static Packet QtAV::Packet::createEOF ( )
static

◆ fromAVPacket() [1/2]

static Packet QtAV::Packet::fromAVPacket ( const AVPacket avpkt,
double  time_base 
)
static

◆ fromAVPacket() [2/2]

static bool QtAV::Packet::fromAVPacket ( Packet pkt,
const AVPacket avpkt,
double  time_base 
)
static

◆ isEOF()

bool QtAV::Packet::isEOF ( ) const

◆ isValid()

bool QtAV::Packet::isValid ( ) const
inline

data.isEmpty()?

◆ operator=()

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

◆ skip()

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

◆ data

QByteArray QtAV::Packet::data

◆ dts

qreal QtAV::Packet::dts

◆ duration

qreal QtAV::Packet::duration

◆ hasKeyFrame

bool QtAV::Packet::hasKeyFrame

◆ isCorrupt

bool QtAV::Packet::isCorrupt

◆ position

qint64 QtAV::Packet::position

◆ pts

qreal QtAV::Packet::pts

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