live
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
BufferedPacket Class Reference

#include <MultiFramedRTPSource.hh>

Collaboration diagram for BufferedPacket:
Collaboration graph
[legend]

Public Member Functions

 BufferedPacket ()
 
virtual ~BufferedPacket ()
 
Boolean hasUsableData () const
 
unsigned useCount () const
 
Boolean fillInData (RTPInterface &rtpInterface, struct sockaddr_storage &fromAddress, Boolean &packetReadWasIncomplete)
 
void assignMiscParams (unsigned short rtpSeqNo, unsigned rtpTimestamp, struct timeval presentationTime, Boolean hasBeenSyncedUsingRTCP, Boolean rtpMarkerBit, struct timeval timeReceived)
 
void skip (unsigned numBytes)
 
void removePadding (unsigned numBytes)
 
void appendData (unsigned char *newData, unsigned numBytes)
 
void use (unsigned char *to, unsigned toSize, unsigned &bytesUsed, unsigned &bytesTruncated, unsigned short &rtpSeqNo, unsigned &rtpTimestamp, struct timeval &presentationTime, Boolean &hasBeenSyncedUsingRTCP, Boolean &rtpMarkerBit)
 
BufferedPacket *& nextPacket ()
 
unsigned short rtpSeqNo () const
 
struct timeval const & timeReceived () const
 
unsigned char * data () const
 
unsigned dataSize () const
 
Boolean rtpMarkerBit () const
 
BooleanisFirstPacket ()
 
unsigned bytesAvailable () const
 

Protected Member Functions

virtual void reset ()
 
virtual unsigned nextEnclosedFrameSize (unsigned char *&framePtr, unsigned dataSize)
 
virtual void getNextEnclosedFrameParameters (unsigned char *&framePtr, unsigned dataSize, unsigned &frameSize, unsigned &frameDurationInMicroseconds)
 

Protected Attributes

unsigned fPacketSize
 
unsigned char * fBuf
 
unsigned fHead
 
unsigned fTail
 

Private Attributes

BufferedPacketfNextPacket
 
unsigned fUseCount
 
unsigned short fRTPSeqNo
 
unsigned fRTPTimestamp
 
struct timeval fPresentationTime
 
Boolean fHasBeenSyncedUsingRTCP
 
Boolean fRTPMarkerBit
 
Boolean fIsFirstPacket
 
struct timeval fTimeReceived
 

Detailed Description

Definition at line 86 of file MultiFramedRTPSource.hh.

Constructor & Destructor Documentation

◆ BufferedPacket()

BufferedPacket::BufferedPacket ( )

◆ ~BufferedPacket()

virtual BufferedPacket::~BufferedPacket ( )
virtual

Member Function Documentation

◆ appendData()

void BufferedPacket::appendData ( unsigned char *  newData,
unsigned  numBytes 
)

◆ assignMiscParams()

void BufferedPacket::assignMiscParams ( unsigned short  rtpSeqNo,
unsigned  rtpTimestamp,
struct timeval  presentationTime,
Boolean  hasBeenSyncedUsingRTCP,
Boolean  rtpMarkerBit,
struct timeval  timeReceived 
)

◆ bytesAvailable()

unsigned BufferedPacket::bytesAvailable ( ) const
inline

Definition at line 117 of file MultiFramedRTPSource.hh.

117 { return fPacketSize - fTail; }

References fPacketSize, and fTail.

◆ data()

unsigned char* BufferedPacket::data ( ) const
inline

Definition at line 113 of file MultiFramedRTPSource.hh.

113 { return &fBuf[fHead]; }
unsigned char * fBuf

References fBuf, and fHead.

◆ dataSize()

unsigned BufferedPacket::dataSize ( ) const
inline

Definition at line 114 of file MultiFramedRTPSource.hh.

114 { return fTail-fHead; }

References fHead, and fTail.

◆ fillInData()

Boolean BufferedPacket::fillInData ( RTPInterface rtpInterface,
struct sockaddr_storage &  fromAddress,
Boolean packetReadWasIncomplete 
)

◆ getNextEnclosedFrameParameters()

virtual void BufferedPacket::getNextEnclosedFrameParameters ( unsigned char *&  framePtr,
unsigned  dataSize,
unsigned &  frameSize,
unsigned &  frameDurationInMicroseconds 
)
protectedvirtual

◆ hasUsableData()

Boolean BufferedPacket::hasUsableData ( ) const
inline

Definition at line 91 of file MultiFramedRTPSource.hh.

91 { return fTail > fHead; }

References fHead, and fTail.

◆ isFirstPacket()

Boolean& BufferedPacket::isFirstPacket ( )
inline

Definition at line 116 of file MultiFramedRTPSource.hh.

116 { return fIsFirstPacket; }

References fIsFirstPacket.

◆ nextEnclosedFrameSize()

virtual unsigned BufferedPacket::nextEnclosedFrameSize ( unsigned char *&  framePtr,
unsigned  dataSize 
)
protectedvirtual

◆ nextPacket()

BufferedPacket*& BufferedPacket::nextPacket ( )
inline

Definition at line 108 of file MultiFramedRTPSource.hh.

108 { return fNextPacket; }
BufferedPacket * fNextPacket

References fNextPacket.

◆ removePadding()

void BufferedPacket::removePadding ( unsigned  numBytes)

◆ reset()

virtual void BufferedPacket::reset ( )
protectedvirtual

◆ rtpMarkerBit()

Boolean BufferedPacket::rtpMarkerBit ( ) const
inline

Definition at line 115 of file MultiFramedRTPSource.hh.

115 { return fRTPMarkerBit; }

References fRTPMarkerBit.

◆ rtpSeqNo()

unsigned short BufferedPacket::rtpSeqNo ( ) const
inline

Definition at line 110 of file MultiFramedRTPSource.hh.

110 { return fRTPSeqNo; }
unsigned short fRTPSeqNo

References fRTPSeqNo.

◆ skip()

void BufferedPacket::skip ( unsigned  numBytes)

◆ timeReceived()

struct timeval const& BufferedPacket::timeReceived ( ) const
inline

Definition at line 111 of file MultiFramedRTPSource.hh.

111 { return fTimeReceived; }
struct timeval fTimeReceived

References fTimeReceived.

◆ use()

void BufferedPacket::use ( unsigned char *  to,
unsigned  toSize,
unsigned &  bytesUsed,
unsigned &  bytesTruncated,
unsigned short &  rtpSeqNo,
unsigned &  rtpTimestamp,
struct timeval &  presentationTime,
Boolean hasBeenSyncedUsingRTCP,
Boolean rtpMarkerBit 
)

◆ useCount()

unsigned BufferedPacket::useCount ( ) const
inline

Definition at line 92 of file MultiFramedRTPSource.hh.

92 { return fUseCount; }

References fUseCount.

Field Documentation

◆ fBuf

unsigned char* BufferedPacket::fBuf
protected

Definition at line 130 of file MultiFramedRTPSource.hh.

Referenced by data().

◆ fHasBeenSyncedUsingRTCP

Boolean BufferedPacket::fHasBeenSyncedUsingRTCP
private

Definition at line 141 of file MultiFramedRTPSource.hh.

◆ fHead

unsigned BufferedPacket::fHead
protected

Definition at line 131 of file MultiFramedRTPSource.hh.

Referenced by data(), dataSize(), and hasUsableData().

◆ fIsFirstPacket

Boolean BufferedPacket::fIsFirstPacket
private

Definition at line 143 of file MultiFramedRTPSource.hh.

Referenced by isFirstPacket().

◆ fNextPacket

BufferedPacket* BufferedPacket::fNextPacket
private

Definition at line 135 of file MultiFramedRTPSource.hh.

Referenced by nextPacket().

◆ fPacketSize

unsigned BufferedPacket::fPacketSize
protected

Definition at line 129 of file MultiFramedRTPSource.hh.

Referenced by bytesAvailable().

◆ fPresentationTime

struct timeval BufferedPacket::fPresentationTime
private

Definition at line 140 of file MultiFramedRTPSource.hh.

◆ fRTPMarkerBit

Boolean BufferedPacket::fRTPMarkerBit
private

Definition at line 142 of file MultiFramedRTPSource.hh.

Referenced by rtpMarkerBit().

◆ fRTPSeqNo

unsigned short BufferedPacket::fRTPSeqNo
private

Definition at line 138 of file MultiFramedRTPSource.hh.

Referenced by rtpSeqNo().

◆ fRTPTimestamp

unsigned BufferedPacket::fRTPTimestamp
private

Definition at line 139 of file MultiFramedRTPSource.hh.

◆ fTail

unsigned BufferedPacket::fTail
protected

Definition at line 132 of file MultiFramedRTPSource.hh.

Referenced by bytesAvailable(), dataSize(), and hasUsableData().

◆ fTimeReceived

struct timeval BufferedPacket::fTimeReceived
private

Definition at line 144 of file MultiFramedRTPSource.hh.

Referenced by timeReceived().

◆ fUseCount

unsigned BufferedPacket::fUseCount
private

Definition at line 137 of file MultiFramedRTPSource.hh.

Referenced by useCount().


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