MythTV
master
|
#include <packetbuffer.h>
Public Member Functions | |
PacketBuffer (unsigned int bitrate) | |
virtual | ~PacketBuffer ()=default |
virtual void | PushDataPacket (const UDPPacket &)=0 |
virtual void | PushFECPacket (const UDPPacket &, unsigned int)=0 |
bool | HasAvailablePacket (void) const |
Returns true if there are ordered packets ready for processing. More... | |
UDPPacket | PopDataPacket (void) |
Fetches a data packet for processing. More... | |
UDPPacket | GetEmptyPacket (void) |
Gets a packet for use in PushDataPacket/PushFECPacket. More... | |
void | FreePacket (const UDPPacket &packet) |
Frees an RTPDataPacket returned by PopDataPacket. More... | |
Protected Attributes | |
uint | m_bitrate |
uint64_t | m_next_empty_packet_key |
Packets key to use for next empty packet. More... | |
QMap< uint64_t, UDPPacket > | m_empty_packets |
Packets ready for reuse. More... | |
QList< UDPPacket > | m_available_packets |
Ordered list of available packets. More... | |
Definition at line 15 of file packetbuffer.h.
|
explicit |
Definition at line 14 of file packetbuffer.cpp.
|
virtualdefault |
|
pure virtual |
Implemented in RTPPacketBuffer, and UDPPacketBuffer.
Referenced by IPTVStreamHandlerReadHelper::ReadPending(), and SatIPRTSPReadHelper::ReadPending().
|
pure virtual |
Implemented in UDPPacketBuffer, and RTPPacketBuffer.
Referenced by IPTVStreamHandlerReadHelper::ReadPending().
bool PacketBuffer::HasAvailablePacket | ( | void | ) | const |
Returns true if there are ordered packets ready for processing.
Definition at line 26 of file packetbuffer.cpp.
Referenced by IPTVStreamHandlerWriteHelper::timerEvent(), and SatIPRTSPWriteHelper::timerEvent().
UDPPacket PacketBuffer::PopDataPacket | ( | void | ) |
Fetches a data packet for processing.
Call FreePacket() when done with the packet.
Definition at line 31 of file packetbuffer.cpp.
Referenced by IPTVStreamHandlerWriteHelper::timerEvent(), and SatIPRTSPWriteHelper::timerEvent().
UDPPacket PacketBuffer::GetEmptyPacket | ( | void | ) |
Gets a packet for use in PushDataPacket/PushFECPacket.
Definition at line 42 of file packetbuffer.cpp.
Referenced by IPTVStreamHandlerReadHelper::ReadPending(), and SatIPRTSPReadHelper::ReadPending().
void PacketBuffer::FreePacket | ( | const UDPPacket & | packet | ) |
Frees an RTPDataPacket returned by PopDataPacket.
Definition at line 56 of file packetbuffer.cpp.
Referenced by UDPPacketBuffer::PushFECPacket(), RTPPacketBuffer::PushFECPacket(), IPTVStreamHandlerWriteHelper::timerEvent(), and SatIPRTSPWriteHelper::timerEvent().
|
protected |
Definition at line 44 of file packetbuffer.h.
|
protected |
Packets key to use for next empty packet.
Definition at line 47 of file packetbuffer.h.
Referenced by FreePacket(), GetEmptyPacket(), and PacketBuffer().
|
protected |
Packets ready for reuse.
Definition at line 50 of file packetbuffer.h.
Referenced by FreePacket(), and GetEmptyPacket().
|
protected |
Ordered list of available packets.
Definition at line 53 of file packetbuffer.h.
Referenced by HasAvailablePacket(), PopDataPacket(), UDPPacketBuffer::PushDataPacket(), and RTPPacketBuffer::PushDataPacket().