MythTV  master
Public Types | Public Member Functions | Protected Attributes | List of all members
RTPDataPacket Class Reference

RTP Data Packet. More...

#include <libmythtv/recorders/rtp/rtpdatapacket.h>

Inheritance diagram for RTPDataPacket:
[legend]
Collaboration diagram for RTPDataPacket:
[legend]

Public Types

enum  {
  kPayLoadTypePCMAudio = 8, kPayLoadTypeMPEGAudio = 12, kPayLoadTypeH261Video = 31, kPayLoadTypeMPEG2Video = 32,
  kPayLoadTypeTS = 33, kPayLoadTypeH263Video = 34
}
 

Public Member Functions

 RTPDataPacket (const RTPDataPacket &)=default
 
 RTPDataPacket (const UDPPacket &o)
 
 RTPDataPacket (uint64_t key)
 
 RTPDataPacket (void)
 
RTPDataPacketoperator= (const RTPDataPacket &)=default
 
bool IsValid (void) const override
 IsValid() must return true before any data access methods are called, other than GetDataReference() and GetData() More...
 
uint GetVersion (void) const
 
bool HasPadding (void) const
 
bool HasExtension (void) const
 
uint GetCSRCCount (void) const
 
uint GetPayloadType (void) const
 
uint GetSequenceNumber (void) const
 
uint GetTimeStamp (void) const
 
uint GetSynchronizationSource (void) const
 
uint GetContributingSource (uint i) const
 
uint GetPayloadOffset (void) const
 
uint GetPaddingSize (void) const
 
- Public Member Functions inherited from UDPPacket
 UDPPacket (const UDPPacket &)=default
 
 UDPPacket (uint64_t key)
 
 UDPPacket (void)=default
 
virtual ~UDPPacket ()=default
 
UDPPacketoperator= (const UDPPacket &)=default
 
uint64_t GetKey (void) const
 
QByteArray & GetDataReference (void)
 
QByteArray GetData (void) const
 

Protected Attributes

uint m_off { 0 }
 
- Protected Attributes inherited from UDPPacket
uint64_t m_key { 0ULL }
 Key used to ensure we avoid extra memory allocation in m_data QByteArray. More...
 
QByteArray m_data
 

Detailed Description

RTP Data Packet.

The RTP Header exists for all RTP packets, it contains a payload type, timestamp and a sequence number for packet reordering.

Different RTP Data Packet types have their own sub-classes for accessing the data portion of the packet.

The data is stored in a QByteArray which is a reference counted shared data container, so an RTPDataPacket can be assigned to a subclass efficiently.

Definition at line 32 of file rtpdatapacket.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kPayLoadTypePCMAudio 
kPayLoadTypeMPEGAudio 
kPayLoadTypeH261Video 
kPayLoadTypeMPEG2Video 
kPayLoadTypeTS 
kPayLoadTypeH263Video 

Definition at line 83 of file rtpdatapacket.h.

Constructor & Destructor Documentation

◆ RTPDataPacket() [1/4]

RTPDataPacket::RTPDataPacket ( const RTPDataPacket )
default

◆ RTPDataPacket() [2/4]

RTPDataPacket::RTPDataPacket ( const UDPPacket o)
inlineexplicit

Definition at line 36 of file rtpdatapacket.h.

◆ RTPDataPacket() [3/4]

RTPDataPacket::RTPDataPacket ( uint64_t  key)
inlineexplicit

Definition at line 37 of file rtpdatapacket.h.

◆ RTPDataPacket() [4/4]

RTPDataPacket::RTPDataPacket ( void  )
inline

Definition at line 38 of file rtpdatapacket.h.

Member Function Documentation

◆ operator=()

RTPDataPacket& RTPDataPacket::operator= ( const RTPDataPacket )
default

◆ IsValid()

bool RTPDataPacket::IsValid ( void  ) const
inlineoverridevirtual

IsValid() must return true before any data access methods are called, other than GetDataReference() and GetData()

Reimplemented from UDPPacket.

Definition at line 42 of file rtpdatapacket.h.

Referenced by SatIPDataReadHelper::ReadPending(), and IPTVStreamHandlerWriteHelper::timerEvent().

◆ GetVersion()

uint RTPDataPacket::GetVersion ( void  ) const
inline

Definition at line 78 of file rtpdatapacket.h.

Referenced by IsValid().

◆ HasPadding()

bool RTPDataPacket::HasPadding ( void  ) const
inline

Definition at line 79 of file rtpdatapacket.h.

Referenced by GetPaddingSize().

◆ HasExtension()

bool RTPDataPacket::HasExtension ( void  ) const
inline

Definition at line 80 of file rtpdatapacket.h.

Referenced by IsValid().

◆ GetCSRCCount()

uint RTPDataPacket::GetCSRCCount ( void  ) const
inline

Definition at line 81 of file rtpdatapacket.h.

Referenced by IsValid().

◆ GetPayloadType()

uint RTPDataPacket::GetPayloadType ( void  ) const
inline

◆ GetSequenceNumber()

uint RTPDataPacket::GetSequenceNumber ( void  ) const
inline

◆ GetTimeStamp()

uint RTPDataPacket::GetTimeStamp ( void  ) const
inline

Definition at line 102 of file rtpdatapacket.h.

Referenced by IPTVStreamHandlerWriteHelper::timerEvent().

◆ GetSynchronizationSource()

uint RTPDataPacket::GetSynchronizationSource ( void  ) const
inline

Definition at line 107 of file rtpdatapacket.h.

◆ GetContributingSource()

uint RTPDataPacket::GetContributingSource ( uint  i) const
inline

Definition at line 112 of file rtpdatapacket.h.

◆ GetPayloadOffset()

uint RTPDataPacket::GetPayloadOffset ( void  ) const
inline

Definition at line 119 of file rtpdatapacket.h.

◆ GetPaddingSize()

uint RTPDataPacket::GetPaddingSize ( void  ) const
inline

Definition at line 121 of file rtpdatapacket.h.

Referenced by RTPTSDataPacket::GetTSDataSize().

Member Data Documentation

◆ m_off

uint RTPDataPacket::m_off { 0 }
mutableprotected

Definition at line 129 of file rtpdatapacket.h.

Referenced by GetPayloadOffset(), RTPTSDataPacket::GetTSOffset(), and IsValid().


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