#include <rtp.h>
Inheritance diagram for RTPQueue:
Public Methods | |
RTPQueue (int pri) | |
virtual | ~RTPQueue () |
void | putPacket (unsigned long stamp, payload_t payload, unsigned char *data = NULL, unsigned len = 0) |
This is used to create a data packet in the send queue. More... | |
unsigned | getPacket (unsigned long stamp, unsigned char *data, unsigned max) |
Retreive data from a specific timestamped packet if such a packet is currently available in the receive buffer. More... | |
payload_t | getPayload (unsigned long timestamp) |
Get the payload type of a specific packet by timestamp. More... | |
unsigned | setPartial (unsigned long timestamp, unsigned char *data, unsigned offset, unsigned max) |
Set partial data for an already queued packet. More... | |
unsigned | getPartial (unsigned long timestamp, unsigned char *data, unsigned int offset, unsigned int max) |
Get partial data from a packet. More... | |
bool | isActive (void) |
Get active connection state flag. More... | |
void | setTimeout (timeout_t t) |
Set the default scheduling timeout to use when no data packets are waiting to be sent. More... | |
void | setExpired (timeout_t t) |
Set the "expired" timer for expiring packets pending in the send queue which have gone unsent and are already "too late" to be sent now. More... | |
void | setSegmentSize (unsigned size) |
Set maximum packet segment size before fragmenting sends. More... | |
bool | isComplete (void) |
Is last packet processed "complete" or are sequences missing? More... | |
bool | isMarked (void) |
Is last packet processed "marked" (used to signal end on multi-sequence sends). More... | |
bool | isWaiting (void) |
Determine if packets are waiting in the queue. More... | |
bool | isSending (void) |
Determine if outgoing packets are waiting to send. More... | |
unsigned long | getFirstTimestamp (void) |
Get timestamp of first packet waiting in the queue. More... | |
unsigned short | getFirstSequence (void) |
Get the sequence id of the first packet waiting. More... | |
void | setSequence (unsigned short seq) |
This is used to initialize the packet send sequence id. More... | |
void | setTimeclock (void) |
Set the packet timeclock for synchronizing timestamps. | |
timeout_t | getTimeclock (void) |
Get the packet timeclock for synchronizing timestamps. More... | |
Protected Methods | |
virtual time_t | getControlTimer (void) |
A plugin for RTCP packet scheduling based on the number of contributing sources in a RTP session. More... | |
virtual unsigned | getControl (void) |
A plugin point for picking up incoming RTCP packets if they are waiting. More... | |
virtual void | Bye (void) |
A plugin point for posting of BYE messages. | |
virtual void | putControl (void) |
A plugin point for posting of RTCP messages. | |
virtual void | timerTick (void) |
A plugin point for timer tick driven events. | |
timeout_t | getTimeout (void) |
This computes the timeout period for scheduling transmission of the next packet at the "head" of the send buffer. More... | |
virtual bool | isPendingArrival (timeout_t timeout) = 0 |
This function is used to check for and schedule against arriving packets based on the derived connection type. More... | |
int | sendPacket (void) |
This function is used by the service thread to process the next outgoing packet pending in the send queue. More... | |
void | Purge (rtppurge_t flag) |
This function is used to purge the packet queue(s). | |
virtual int | writePacket (unsigned char *packet, unsigned len) = 0 |
This function performs the physical I/O for writing a packet to the destination. More... | |
int | recvPacket (void) |
This function is used by the service thread to process the next incoming packet and place it in the receive list. More... | |
virtual bool | gotPacket (RTPPacket *packet) |
A virtual function to support parsing of arriving packets to determine if they should be kept in the queue and to dispatch events. More... | |
virtual int | readPacket (unsigned char *buffer, unsigned len) = 0 |
This function performs the physical I/O for reading a packet from the source. More... | |
RTPPacket* | getWaiting (unsigned long timestamp) |
This is used to fetch a packet in the receive queue and to expire packets older than the current timestamp. More... | |
void | endQueue (void) |
This function ends the queues and service threads. | |
Protected Attributes | |
struct timeval | starttimer |
volatile bool | active |
By making the queue handler a seperate base class it becomes possible to define RTP classes for RTP profiles and sessions of different types.
|
|
|
|
|
A plugin point for posting of BYE messages.
|
|
This function is used to purge the packet queue(s).
|
|
This function ends the queues and service threads.
|
|
A plugin point for picking up incoming RTCP packets if they are waiting. This is used as a simple "check"; if packets are pending, they are processed in the derived class. A timeout for the maximum interval since the last RTCP packet had been received is also returned. This is checked once a second.
|
|
A plugin for RTCP packet scheduling based on the number of contributing sources in a RTP session. The default interval is to use 5 seconds for posting RTCP reports. If no RTCP interface is used, this should return 0.
|
|
Get the sequence id of the first packet waiting.
|
|
Get timestamp of first packet waiting in the queue.
|
|
Retreive data from a specific timestamped packet if such a packet is currently available in the receive buffer.
|
|
Get partial data from a packet. This is often used to support oddball hardware that has unusual or non-standard codec buffering intervals.
|
|
Get the payload type of a specific packet by timestamp.
|
|
Get the packet timeclock for synchronizing timestamps.
|
|
This computes the timeout period for scheduling transmission of the next packet at the "head" of the send buffer. If no packets are waiting, a default timeout is used. This actually forms the "isPending()" timeout of the rcp receiver in the service thread.
|
|
This is used to fetch a packet in the receive queue and to expire packets older than the current timestamp.
|
|
A virtual function to support parsing of arriving packets to determine if they should be kept in the queue and to dispatch events.
|
|
Get active connection state flag.
|
|
Is last packet processed "complete" or are sequences missing?
|
|
Is last packet processed "marked" (used to signal end on multi-sequence sends).
|
|
This function is used to check for and schedule against arriving packets based on the derived connection type.
|
|
Determine if outgoing packets are waiting to send.
|
|
Determine if packets are waiting in the queue.
|
|
A plugin point for posting of RTCP messages.
|
|
This is used to create a data packet in the send queue. Sometimes a "NULL" or empty packet will be used instead, and these are known as "silent" packets. "Silent" packets are used simply to "push" the scheduler along more accurately by giving the appearence that a next packet is waiting to be sent and to provide a valid timestamp for that packet.
|
|
This function performs the physical I/O for reading a packet from the source. It is a virtual that is overriden in the derived class.
|
|
This function is used by the service thread to process the next incoming packet and place it in the receive list.
|
|
This function is used by the service thread to process the next outgoing packet pending in the send queue.
|
|
Set the "expired" timer for expiring packets pending in the send queue which have gone unsent and are already "too late" to be sent now.
|
|
Set partial data for an already queued packet. This is often used for multichannel data.
|
|
Set maximum packet segment size before fragmenting sends.
|
|
This is used to initialize the packet send sequence id.
|
|
Set the packet timeclock for synchronizing timestamps.
|
|
Set the default scheduling timeout to use when no data packets are waiting to be sent.
|
|
A plugin point for timer tick driven events.
|
|
This function performs the physical I/O for writing a packet to the destination. It is a virtual that is overriden in the derived class.
|
|
|
|
|