OutgoingDataQueue(3) | Library Functions Manual | OutgoingDataQueue(3) |
NAME¶
OutgoingDataQueue - A generic outgoing RTP data queue supporting multiple destinations.SYNOPSIS¶
#include <oqueue.h> Inherits OutgoingDataQueueBase, and DestinationListHandler. Inherited by RTPDataQueue.Classes¶
struct OutgoingRTPPktLink
Public Member Functions¶
bool addDestination (const InetHostAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0)
Protected Member Functions¶
OutgoingDataQueue ()
Protected Attributes¶
Mutex cryptoMutex
Detailed Description¶
A generic outgoing RTP data queue supporting multiple destinations. Author:Federico Montesino Pouzols fedemp@altern.org
Constructor & Destructor Documentation¶
OutgoingDataQueue::OutgoingDataQueue () [protected]¶
virtual OutgoingDataQueue::~OutgoingDataQueue () [inline], [protected], [virtual]¶
Member Function Documentation¶
void OutgoingDataQueue::addContributor (uint32csrc)¶
Add csrc as the CSRC identifier of a new contributor. This method adds the CSRC identifier to a list of contributors that will be inserted in every packet enqueued from now on.bool OutgoingDataQueue::addDestination (const InetHostAddress &ia, tpport_tdataPort = DefaultRTPDataPort, tpport_tcontrolPort = 0)¶
bool OutgoingDataQueue::addDestination (const InetMcastAddress &ia, tpport_tdataPort = DefaultRTPDataPort, tpport_tcontrolPort = 0)¶
size_t OutgoingDataQueue::dispatchDataPacket () [protected]¶
This function is used by the service thread to process the next outgoing packet pending in the sending queue. Returns:number of bytes sent. 0 if silent, <0 if error.
void OutgoingDataQueue::dispatchImmediate ( OutgoingRTPPkt *packet) [protected]¶
This is used to write the RTP data packet to one or more destinations. It is used by both sendImmediate and by dispatchDataPacket. Parameters:RTP packet to send.
bool OutgoingDataQueue::forgetDestination (const InetHostAddress &ia, tpport_tdataPort = DefaultRTPDataPort, tpport_tcontrolPort = 0)¶
bool OutgoingDataQueue::forgetDestination (const InetMcastAddress &ia, tpport_tdataPort = DefaultRTPDataPort, tpport_tcontrolPort = 0)¶
uint32 OutgoingDataQueue::getCurrentSeqNum (void) [inline], [protected]¶
microtimeout_t OutgoingDataQueue::getDefaultExpireTimeout () const [inline]¶
microtimeout_t OutgoingDataQueue::getDefaultSchedulingTimeout () const [inline]¶
microtimeout_t OutgoingDataQueue::getExpireTimeout () const [inline]¶
uint32 OutgoingDataQueue::getInitialTimestamp () [inline], [protected]¶
bool OutgoingDataQueue::getMark () const [inline]¶
Get whether the mark bit will be set in the next packet.CryptoContext* OutgoingDataQueue::getOutQueueCryptoContext (uint32ssrc)¶
Get an output queue CryptoContext identified by SSRC. Parameters:ssrc Request CryptoContext for this
incoming SSRC
Returns:
Pointer to CryptoContext of the SSRC of NULL if no
context available for this SSRC.
microtimeout_t OutgoingDataQueue::getSchedulingTimeout () [protected]¶
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 rtp receiver in the service thread. Returns:timeout until next packet is scheduled to send.
uint32 OutgoingDataQueue::getSendOctetCount () const [inline]¶
Get the total number of octets (payload only) sent so far. Returns:total number of payload octets sent in RTP packets.
uint32 OutgoingDataQueue::getSendPacketCount () const [inline]¶
Get the total number of packets sent so far. Returns:total number of packets sent
uint16 OutgoingDataQueue::getSequenceNumber () const [inline]¶
Get the sequence number of the next outgoing packet. Returns:the 16 bit sequence number.
bool OutgoingDataQueue::isSending () const¶
Determine if outgoing packets are waiting to send. Returns:true if there are packets waiting to be send.
void OutgoingDataQueue::purgeOutgoingQueue () [protected]¶
void OutgoingDataQueue::putData (uint32stamp, const unsigned char *data = NULL, size_tlen = 0)¶
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 appearance that a next packet is waiting to be sent and to provide a valid timestamp for that packet. Parameters:stamp Timestamp for expected send time of packet.
data Value or NULL if special 'silent' packet.
len May be 0 to indicate a default by payload type.
bool OutgoingDataQueue::removeContributor (uint32csrc)¶
Remove CSRC from the list of contributors.void OutgoingDataQueue::removeOutQueueCryptoContext ( CryptoContext *cc)¶
Remove output queue CryptoContext. The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts. Parameters:cc Pointer to initialized CryptoContext to
remove.
void OutgoingDataQueue::sendImmediate (uint32stamp, const unsigned char *data = NULL, size_tlen = 0)¶
This is used to create a data packet and send it immediately. 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 appearance that a next packet is waiting to be sent and to provide a valid timestamp for that packet. Parameters:stamp Timestamp immediate send time of packet.
data Value or NULL if special 'silent' packet.
len May be 0 to indicate a default by payload type.
virtual void OutgoingDataQueue::setControlPeer (const InetAddress &host, tpport_tport) [inline], [protected], [virtual]¶
Reimplemented in RTPDuplex.void OutgoingDataQueue::setExpireTimeout ( microtimeout_tto) [inline]¶
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. Parameters:to timeout to expire unsent packets in
milliseconds.
void OutgoingDataQueue::setInitialTimestamp (uint32ts) [inline], [protected]¶
void OutgoingDataQueue::setMark (boolmark) [inline]¶
Set marker bit for the packet in which the next data provided will be send. When transmitting audio, should be set for the first packet of a talk spurt. When transmitting video, should be set for the last packet for a video frame. Parameters:mark Marker bit value for next packet.
void OutgoingDataQueue::setNextSeqNum (uint32seqNum) [inline], [protected]¶
For thoses cases in which the application requires a method to set the sequence number for the outgoing stream (such as for implementing the RTSP PLAY command). Parameters:seqNum next sequence number to be used for
outgoing packets.
void OutgoingDataQueue::setOutQueueCryptoContext ( CryptoContext *cc)¶
Set output queue CryptoContext. The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts. Parameters:cc Pointer to initialized
CryptoContext.
void OutgoingDataQueue::setPadding (uint8paddinglen) [inline]¶
Set padding. All outgoing packets will be transparently padded to a multiple of paddinglen. Parameters:paddinglen pad packets to a length multiple of
paddinglen.
size_t OutgoingDataQueue::setPartial (uint32timestamp, unsigned char *data, size_toffset, size_tmax)¶
Set partial data for an already queued packet. This is often used for multichannel data. Parameters:timestamp Timestamp of packet.
data Buffer to copy from.
offset Offset to copy from.
max Maximum data size.
Returns:
Number of packet data bytes set.
void OutgoingDataQueue::setSchedulingTimeout ( microtimeout_tto) [inline]¶
Set the default scheduling timeout to use when no data packets are waiting to be sent. Parameters:to timeout in milliseconds.
Member Data Documentation¶
bool OutgoingDataQueue::complete¶
std::list<CryptoContext *> OutgoingDataQueue::cryptoContexts [protected]¶
Mutex OutgoingDataQueue::cryptoMutex [mutable], [protected]¶
bool OutgoingDataQueue::marked¶
uint32 OutgoingDataQueue::octetCount¶
timeval OutgoingDataQueue::overflowTime¶
uint32 OutgoingDataQueue::packetCount¶
uint8 OutgoingDataQueue::paddinglen¶
uint16 OutgoingDataQueue::sendCC¶
uint16 OutgoingDataQueue::sendSeq¶
uint32 OutgoingDataQueue::sendSources[16]¶
Author¶
Generated automatically by Doxygen for ccRTP from the source code.Wed Jun 25 2014 | ccRTP |