A packet queue handler for building different kinds of RTP protocol systems.
More...
#include <ioqueue.h>
Inheritance diagram for RTPDataQueue:
Collaboration diagram for RTPDataQueue:
Public Types
Public Member Functions
Specify the kind of service the application expects to use.
More...
Enable packet queue processing in the stack.
More...
Disable packet queue processing in the stack.
More...
Get active connection state flag.
More...
Get the timestamp that should be given for a packet whose payload sampling instant corresponds to the current system time.
More...
Specify the bandwidth of the current session.
More...
Set the packet timeclock for synchronizing timestamps.
More...
Get the packet timeclock for synchronizing timestamps.
More...
Retreive data from a specific timestamped packet if such a packet is currently available in the receive buffer.
More...
Determine if packets are waiting in the reception queue.
More...
Get timestamp of first packet waiting in the queue.
More...
When receiving packets from a new source, it may be convenient to reject a first few packets before we are really sure the source is valid.
More...
Get the minimun number of consecutive packets that must be received from a source before accepting its data packets.
More...
It also prevents packets sent after a restart of the source being immediately accepted.
More...
Set the payload format in use, for timing and payload type identification purposes.
More...
Get the clock rate in RTP clock units (for instance, 8000 units per second for PCMU, or 90000 units per second for MP2T).
More...
Add csrc as the CSRC identifier of a new contributor.
More...
Remove CSRC from the list of contributors.
More...
Determine if outgoing packets are waiting to send.
More...
void
putData (uint32 stamp, const unsigned char *data=NULL, size_t len=0)
This is used to create a data packet in the send queue.
More...
void
sendImmediate (uint32 stamp, const unsigned char *data=NULL, size_t len=0)
This is used to create a data packet and send it immediately.
More...
Set marker bit for the packet in which the next data provided will be send.
More...
Get wheter the mark bit will be set in the next packet.
More...
size_t
setPartial (uint32 timestamp, unsigned char *data, size_t offset, size_t max)
Set partial data for an already queued packet.
More...
Set the default scheduling timeout to use when no data packets are waiting to be sent.
More...
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...
Get the total number of packets sent so far.
More...
Get the total number of octets (payload only) sent so far.
More...
Get the sequence number of the next outgoing packet.
More...
Set maximum payload segment size before fragmenting sends.
More...
Static Public Member Functions
Protected Member Functions
Using this constructor you can start a session with the given ssrc, instead of the usual randomly generated one.
More...
The queue destructor flushes the queue and stops all services.
More...
A plugin point for timer tick driven events.
More...
This method ends the queue.
More...
This function is used to check for and schedule against arriving packets based on the derived connection type.
More...
Apply collision and loop detection and correction algorithm when receiving RTP data packets.
More...
Set the number of RTCP intervals that the stack will wait to change the state of a source from stateActive to stateInactive, or to delete the source after being in stateInactive.
More...
This function is used by the service thread to process the next incoming packet and place it in the receive list.
More...
This is used to fetch a packet in the receive queue and to expire packets older than the current timestamp.
More...
Log reception of a new RTP packet from this source.
More...
Log extraction of a packet from this source from the scheduled reception queue.
More...
Virtual called when a new synchronization source has joined the session.
More...
A virtual function to support parsing of arriving packets to determine if they should be kept in the queue and to dispatch events.
More...
A hook to filter packets in the receive queue that are being expired.
More...
A hook that gets called if the decoding of an incoming SRTP was erroneous.
More...
Insert a just received packet in the queue (both general and source specific queues).
More...
This function performs the physical I/O for reading a packet from the source.
More...
A plugin point for posting of BYE messages.
More...
Get whether a synchronization source is recorded in this membership controller.
More...
Returns whether there is already a synchronizacion source with "ssrc" SSRC identifier.
More...
Get the description of a source by its
ssrc
identifier.
More...
Mark the source identified by
ssrc
as having sent a BYE packet.
More...
Remove the description of the source identified by
ssrc
More...
This is used to write the RTP data packet to one or more destinations.
More...
This computes the timeout period for scheduling transmission of the next packet at the "head" of the send buffer.
More...
This function is used by the service thread to process the next outgoing packet pending in the sending queue.
More...
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).
More...
Get whether there is only a destination in the list.
More...
Locks the object before modifying it.
More...
Locks the object before modifying it.
More...
Protected Attributes
Static Protected Attributes
Private Member Functions
Global queue initialization.
More...
Private Attributes
Static Private Attributes
Detailed Description
A packet queue handler for building different kinds of RTP protocol systems.
The queue manages both incoming and outgoing RTP packets, as well as synchronization and transmission/reception timers. By making the queue handler a seperate base class it becomes possible to define RTP classes for RTP profiles and sessions of different types.
Outgoing packets are sent via the OutgoingDataQueue::putData method.
Incoming packets can be retrieved via IncomingDataQueue::getData method.
- Author
- David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m RTP data queue handler.
Definition at line 77 of file ioqueue.h.
Member Enumeration Documentation
rtp.h cc++/rtp.h
Type of network service the application uses.
If the application uses enhanced network service, for instance Integrated Services or Differentiated Services, it has not to ensure fair competition with TCP, provided that the requested service is actually being delivered. Whenever the application uses best-effort service or the requested enhanced service is not actually being delivered, it has to ensure fair competition with TCP. By default, best-effot is assumed.
- Note
- Although not required, RTP packets are always sent on top of UDP segments. No other underlying transport protocol is supported at present.
- Todo:
- implement fair competition with tcp
Enumerator |
---|
tosBestEffort |
Best-effort network service.
|
tosEnhanced |
Enhanced network service.
|
Definition at line 101 of file ioqueue.h.
Constructor & Destructor Documentation
Constructor.
This will generate a random application SSRC identifier.
- Parameters
-
size an estimation of the number of participants in the session
RTPDataQueue::RTPDataQueue
(
uint32 *
ssrc,
)
protected |
Using this constructor you can start a session with the given ssrc, instead of the usual randomly generated one.
This is necessary when you need to initiate several sessions having the same SSRC identifier, for instance, to implement layered encoding, in which case each layer is managed through a different session but all sessions share the same SSRC identifier.
- Warning
- This doesn't seem to be a good solution
- Parameters
-
ssrc Synchronization SouRCe identifier for this session
size an estimation of the number of participants in the session
virtual RTPDataQueue::~RTPDataQueue
(
)
inlineprotectedvirtual |
The queue destructor flushes the queue and stops all services.
Definition at line 274 of file ioqueue.h.
Member Function Documentation
void ConflictHandler::addConflict
(
const
InetAddress &
na,
)
inherited |
void OutgoingDataQueue::addContributor
(
uint32
csrc )
inherited |
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 DestinationListHandler::addDestinationToList
(
const
InetAddress &
ia,
)
protectedinherited |
Locks the object before modifying it.
bool MembershipBookkeeping::BYESource
(
uint32
ssrc )
protectedinherited |
Mark the source identified by ssrc
as having sent a BYE packet.
It is not deleted until a timeout expires, so that in case some packets from this source arrive a bit later the source is not inserted again in the table of known sources.
- Returns
- true if the source had been previously identified. false if it was not in the table of known sources.
bool IncomingDataQueue::checkSSRCInIncomingRTPPkt
(
SyncSourceLink &
sourceLink,
bool
is_new,
)
protectedinherited |
Apply collision and loop detection and correction algorithm when receiving RTP data packets.
Follows section 8.2 in draft-ietf-avt-rtp-new.
- Parameters
-
sourceLink link to the source object.
is_new whether the source has been just recorded.
na data packet network address.
tp data packet source transport port.
- Returns
- whether the packet must not be discarded.
void RTPDataQueue::disableStack
(
)
inline |
Disable packet queue processing in the stack.
Definition at line 132 of file ioqueue.h.
virtual size_t RTPQueueBase::dispatchBYE
(
const std::string &
)
inlineprotectedvirtualinherited |
A plugin point for posting of BYE messages.
- Parameters
-
- reason to leave the RTP session.
- Returns
- number of octets sent.
Reimplemented in QueueRTCPManager.
Definition at line 231 of file queuebase.h.
size_t OutgoingDataQueue::dispatchDataPacket
(
)
protectedinherited |
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.
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.
void RTPDataQueue::enableStack
(
)
inline |
Enable packet queue processing in the stack.
This method will not any thread of execution.
Definition at line 126 of file ioqueue.h.
inlineprotectedvirtualinherited |
void RTPDataQueue::endQueue
(
)
protected |
This method ends the queue.
PayloadType RTPQueueBase::getCurrentPayloadType
(
)
const
inlineinherited |
uint32 RTPQueueBase::getCurrentRTPClockRate
(
)
const
inlineinherited |
Get the clock rate in RTP clock units (for instance, 8000 units per second for PCMU, or 90000 units per second for MP2T).
This value depends on what payload format has been selected using setPayloadFormat().
- Returns
- clock rate in RTP clock units.
Definition at line 198 of file queuebase.h.
uint32 OutgoingDataQueue::getCurrentSeqNum
(
void
)
inlineprotectedinherited |
uint32 RTPDataQueue::getCurrentTimestamp
(
)
const
Get the timestamp that should be given for a packet whose payload sampling instant corresponds to the current system time.
The timestamp applications should provide for each packet represents the sampling instant of its payload and should not be a reading of the system clock. Nevertheless, the internal operation of the RTP stack relies on the accuracy of the provided timestamp, since several computations assume that there is a certain degree of correspondence between the timestamp and the system clock.
It is recommended that applications use this method in order to periodically adjust the RTP timestamp.
In particular, it is advisable getting the timestamp corresponding to the first sampling instant or any instant after a period of inactivity through a call to this method.
Applications should use the nominal sampling or any other value provided by the coder in order to compute the next timestamps with minimum computational requirement.
For instance, an application using an RTP profile that specifies a fixed sampling rate of 8 Khz with eight bits per sample, continuously transmitting audio blocks 80 octets long, would transmit 100 packets every second. Every packet would carry a timestamp 80 units greater than the previous one. So, the first timestamp would be obtained from this method, whereas the following ones would be computed adding 80 every time. Also the timestamp should be increased for every block whether it is put in the queue or dropped.
The aforementioned increment can be obtained from the RTPDataQueue::getTimestampIncrement() method rather than computing it by hand in the application.
- Note
- Frame based applications must follow a specific timestamping method, probably specified in a profile.
-
You should take into account that by default ccRTP assumes that the application begins sampling at the queue creation time. Moreover, the first sampling instant is assigned a "user visible" timestamp of 0, although the RTP stack will then add internally a ramdom offset unknown to the application. That is to say, the application may count samples from 0 in order to get the timestamp for the next packet, provided that the first sampling instant is the same as the queue creation time. Nevertheless, this simpler way of starting will not be as accurate as it would be if the application got at least the first timestamp through getCurrentTimestamp. We provide this option since ccRTP interface is evolving, but we admit that it is ugly, we could remove this option or even replace uint32 timestamps with a restrictively regulated object; suggestions are gladly welcomed
const
AppDataUnit* IncomingDataQueue::getData
(
uint32
stamp,
)
inherited |
Retreive data from a specific timestamped packet if such a packet is currently available in the receive buffer.
- Parameters
-
stamp Data unit timestamp.
src Optional synchronization source selector.
- Returns
- data retrieved from the reception buffer.
- Return values
-
null pointer if no packet with such timestamp is available.
uint16 IncomingDataQueue::getDefaultMaxPacketDropout
(
)
const
inlineinherited |
uint16 IncomingDataQueue::getDefaultMaxPacketMisorder
(
)
const
inlineinherited |
size_t IncomingDataQueueBase::getDefaultMaxRecvPacketSize
(
)
const
inlineinherited |
size_t OutgoingDataQueueBase::getDefaultMaxSendSegmentSize
(
)
inlineinherited |
size_t MembershipBookkeeping::getDefaultMembersHashSize
(
)
inlineinherited |
static size_t IncomingDataQueue::getDefaultMembersSize
(
)
inlinestaticinherited |
uint8 IncomingDataQueue::getDefaultMinValidPacketSequence
(
)
const
inlineinherited |
microtimeout_t OutgoingDataQueue::getDefaultSchedulingTimeout
(
)
const
inlineinherited |
uint32 RTPDataQueue::getDefaultSessionBandwidth
(
)
const
inline |
uint32 IncomingDataQueue::getFirstTimestamp
(
const
SyncSource *
src =
NULL
)
const
inherited |
Get timestamp of first packet waiting in the queue.
- Parameters
-
src optional source selector.
- Returns
- timestamp of first arrival packet.
timeval RTPQueueBase::getInitialTime
(
)
const
inlineinherited |
uint32 OutgoingDataQueue::getInitialTimestamp
(
)
inlineprotectedinherited |
CryptoContext* IncomingDataQueue::getInQueueCryptoContext
(
uint32
ssrc )
inherited |
uint32 RTPQueueBase::getLocalSSRC
(
)
const
inlineinherited |
uint32 RTPQueueBase::getLocalSSRCNetwork
(
)
const
inlineprotectedinherited |
bool OutgoingDataQueue::getMark
(
)
const
inlineinherited |
Get wheter the mark bit will be set in the next packet.
Definition at line 340 of file oqueue.h.
uint16 IncomingDataQueue::getMaxPacketDropout
(
)
const
inlineinherited |
uint16 IncomingDataQueue::getMaxPacketMisorder
(
)
const
inlineinherited |
size_t IncomingDataQueueBase::getMaxRecvPacketSize
(
)
const
inlineinherited |
size_t OutgoingDataQueueBase::getMaxSendSegmentSize
(
)
inlineinherited |
uint32 MembershipBookkeeping::getMembersCount
(
)
inlineprotectedinherited |
uint8 IncomingDataQueue::getMinValidPacketSequence
(
)
const
inlineinherited |
Get the minimun number of consecutive packets that must be received from a source before accepting its data packets.
Definition at line 1010 of file iqueue.h.
virtual size_t IncomingDataQueue::getNextDataPacketSize
(
)
const
protectedpure virtualinherited |
CryptoContext* OutgoingDataQueue::getOutQueueCryptoContext
(
uint32
ssrc )
inherited |
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 MembershipBookkeeping::getSendersCount
(
)
inlineprotectedinherited |
uint32 OutgoingDataQueue::getSendOctetCount
(
)
const
inlineinherited |
Get the total number of octets (payload only) sent so far.
- Returns
- total number of payload octets sent in RTP packets.
Definition at line 403 of file oqueue.h.
uint32 OutgoingDataQueue::getSendPacketCount
(
)
const
inlineinherited |
Get the total number of packets sent so far.
- Returns
- total number of packets sent
Definition at line 394 of file oqueue.h.
uint16 OutgoingDataQueue::getSequenceNumber
(
)
const
inlineinherited |
Get the sequence number of the next outgoing packet.
- Returns
- the 16 bit sequence number.
Definition at line 412 of file oqueue.h.
uint32 RTPDataQueue::getSessionBandwidth
(
)
const
inline |
bool &
created
)
protectedinherited |
Get the description of a source by its ssrc
identifier.
- Parameters
-
ssrc SSRC identifier, in host order.
created whether a new source has been created.
- Returns
- Pointer to the SyncSource object identified by
ssrc
.
timeout_t RTPDataQueue::getTimeclock
(
)
const
inline |
Get the packet timeclock for synchronizing timestamps.
- Returns
- runtime in milliseconds since last set.
Definition at line 238 of file ioqueue.h.
This is used to fetch a packet in the receive queue and to expire packets older than the current timestamp.
- Returns
- packet buffer object for current timestamp if found.
- Parameters
-
timestamp timestamp requested.
src optional source selector
- Note
- if found, the packet is removed from the reception queue
void RTPDataQueue::initQueue
(
)
private |
Global queue initialization.
- Parameters
-
localSSRC local 32-bit SSRC identifier
Insert a just received packet in the queue (both general and source specific queues).
If the packet was already in the queue (same SSRC and sequence number), it is not inserted but deleted.
- Parameters
-
packetLink link to a packet just received and generally validated and processed by onRTPPacketRecv.
- Returns
- whether the packet was successfully inserted.
- Return values
-
false when the packet is duplicated (there is already a packet from the same source with the same timestamp).
true when the packet is not duplicated.
bool RTPDataQueue::isActive
(
void
)
const
inline |
Get active connection state flag.
- Returns
- true if connection "active".
Definition at line 141 of file ioqueue.h.
bool MembershipBookkeeping::isMine
(
const
SyncSource &
source )
const
inlineprotectedinherited |
Get whether a synchronization source is recorded in this membership controller.
Definition at line 345 of file iqueue.h.
This function is used to check for and schedule against arriving packets based on the derived connection type.
- Returns
- true if packet waiting for processing.
- Parameters
-
number of microseconds to wait.
Implemented in RTPDuplex.
bool MembershipBookkeeping::isRegistered
(
uint32
ssrc )
protectedinherited |
Returns whether there is already a synchronizacion source with "ssrc" SSRC identifier.
bool OutgoingDataQueue::isSending
(
)
const
inherited |
Determine if outgoing packets are waiting to send.
- Returns
- true if there are packets waiting to be send.
bool DestinationListHandler::isSingleDestination
(
)
const
inlineinherited |
Get whether there is only a destination in the list.
Definition at line 82 of file oqueue.h.
bool IncomingDataQueue::isWaiting
(
const
SyncSource *
src =
NULL
)
const
inherited |
Determine if packets are waiting in the reception queue.
- Parameters
-
src Optional synchronization source selector.
- Returns
- True if packets are waiting.
void DestinationListHandler::lockDestinationList
(
)
const
inlineinherited |
inlineprotectedvirtualinherited |
A hook to filter packets in the receive queue that are being expired.
This hook may be used to do some application specific processing on expired packets before they are deleted.
- Parameters
-
- packet expired from the recv queue.
Definition at line 1217 of file iqueue.h.
virtual void IncomingDataQueue::onNewSyncSource
(
const
SyncSource &
)
inlineprotectedvirtualinherited |
Virtual called when a new synchronization source has joined the session.
- Parameters
-
- new synchronization source
Definition at line 1185 of file iqueue.h.
inlineprotectedvirtualinherited |
A virtual function to support parsing of arriving packets to determine if they should be kept in the queue and to dispatch events.
A generic header validity check (as specified in RFC 1889) is performed on every incoming packet. If the generic check completes succesfully, this method is called before the packet is actually inserted into the reception queue.
May be used to perform additional validity checks or to do some application specific processing.
- Parameters
-
- packet just received.
- Returns
- true if packet is kept in the incoming packets queue.
Definition at line 1206 of file iqueue.h.
virtual bool IncomingDataQueue::onSRTPPacketError
(
IncomingRTPPkt &
pkt,
int32
errorCode
)
inlineprotectedvirtualinherited |
A hook that gets called if the decoding of an incoming SRTP was erroneous.
- Parameters
-
pkt The SRTP packet with error.
errorCode The error code: -1 - SRTP authentication failure, -2 - replay check failed
- Returns
- True: put the packet in incoming queue for further processing by the applications; false: dismiss packet. The default implementation returns false.
Reimplemented in ZrtpQueue.
Definition at line 1234 of file iqueue.h.
void IncomingDataQueue::purgeIncomingQueue
(
)
protectedinherited |
void OutgoingDataQueue::purgeOutgoingQueue
(
)
protectedinherited |
void OutgoingDataQueue::putData
(
uint32
stamp,
const unsigned char *
data = NULL
,
size_t
len = 0
)
inherited |
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.
- 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.
void IncomingDataQueue::recordExtraction
(
const
IncomingRTPPkt &
pkt )
protectedinherited |
Log extraction of a packet from this source from the scheduled reception queue.
- Parameters
-
pkt Packet extracted from the queue.
const timeval
recvtime
)
protectedinherited |
Log reception of a new RTP packet from this source.
Usually updates data such as the packet counter, the expected sequence number for the next packet and the time the last packet was received at.
- Parameters
-
srcLink Link structure for the synchronization source of this packet.
pkt Packet just created and to be logged.
recvtime Reception time.
- Returns
- whether, according to the source state and statistics, the packet is considered valid and must be inserted in the incoming packets queue.
virtual size_t IncomingDataQueue::recvData
(
unsigned char *
buffer,
size_t
length,
)
protectedpure virtualinherited |
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.
- Returns
- number of bytes read.
- Parameters
-
buffer of read packet.
length of data to read.
host address of source.
port number of source.
Implemented in RTPDuplex.
bool OutgoingDataQueue::removeContributor
(
uint32
csrc )
inherited |
Remove CSRC from the list of contributors.
bool DestinationListHandler::removeDestinationFromList
(
const
InetAddress &
ia,
)
protectedinherited |
Locks the object before modifying it.
void IncomingDataQueue::removeInQueueCryptoContext
(
CryptoContext *
cc )
inherited |
Remove input queue CryptoContext.
The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts.
- Parameters
-
void OutgoingDataQueue::removeOutQueueCryptoContext
(
CryptoContext *
cc )
inherited |
Remove output queue CryptoContext.
The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts.
- Parameters
-
bool MembershipBookkeeping::removeSource
(
uint32
ssrc )
protectedinherited |
Remove the description of the source identified by ssrc
- Returns
- whether the source has been actually removed or it did not exist.
void RTPDataQueue::renewLocalSSRC
(
)
inlineprotectedvirtual |
- Parameters
-
na Inet network address.
ctp Data transport port.
- Parameters
-
na Inet network address.
dtp Data transport port.
void OutgoingDataQueue::sendImmediate
(
uint32
stamp,
const unsigned char *
data = NULL
,
size_t
len = 0
)
inherited |
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 appearence 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,
)
inlineprotectedvirtualinherited |
void SyncSourceHandler::setControlTransportPort
(
SyncSource &
source,
)
inlineinherited |
void SyncSourceHandler::setDataTransportPort
(
SyncSource &
source,
)
inlineinherited |
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.
Definition at line 382 of file oqueue.h.
void OutgoingDataQueue::setInitialTimestamp
(
uint32
ts )
inlineprotectedinherited |
void IncomingDataQueue::setInQueueCryptoContext
(
CryptoContext *
cc )
inherited |
Set input queue CryptoContext.
The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts.
- Parameters
-
void SyncSourceHandler::setLink
(
SyncSource &
source,
void *
link
)
inlineinherited |
void RTPQueueBase::setLocalSSRC
(
uint32
ssrc )
inlineprotectedinherited |
void OutgoingDataQueue::setMark
(
bool
mark )
inlineinherited |
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.
Definition at line 334 of file oqueue.h.
void IncomingDataQueue::setMaxPacketDropout
(
uint16
packets )
inlineinherited |
It also prevents packets sent after a restart of the source being immediately accepted.
Definition at line 1031 of file iqueue.h.
void IncomingDataQueue::setMaxPacketMisorder
(
uint16
packets )
inlineinherited |
void IncomingDataQueueBase::setMaxRecvPacketSize
(
size_t
maxsize )
inlineinherited |
- Parameters
-
- Note
- This method sets a filter for incoming packets. Setting higher values does not necessarily imply higher memory usage (this method does not set any buffer size).
Definition at line 319 of file queuebase.h.
void OutgoingDataQueueBase::setMaxSendSegmentSize
(
size_t
size )
inlineinherited |
Set maximum payload segment size before fragmenting sends.
- Parameters
-
size Maximum payload size.
- Returns
- Whether segment size was successfully set.
Definition at line 272 of file queuebase.h.
void MembershipBookkeeping::setMembersCount
(
uint32
n )
inlineprotectedinherited |
void IncomingDataQueue::setMinValidPacketSequence
(
uint8
packets )
inlineinherited |
When receiving packets from a new source, it may be convenient to reject a first few packets before we are really sure the source is valid.
This method sets how many data packets must be received in sequence before the source is considered valid and the stack starts to accept its packets.
- Note
- the default (see defaultMinValidPacketSequence()) value for this parameter is 0, so that no packets are rejected (data packets are accepted from the first one).
-
this validation is performed after the generic header validation and the additional validation done in onRTPPacketRecv().
-
if any valid RTCP packet is received from this source, it will be immediatly considered valid regardless of the number of sequential data packets received.
- Parameters
-
packets number of sequential packet required
Definition at line 998 of file iqueue.h.
void SyncSourceHandler::setNetworkAddress
(
SyncSource &
source,
)
inlineinherited |
void OutgoingDataQueue::setNextSeqNum
(
uint32
seqNum )
inlineprotectedinherited |
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.
Definition at line 521 of file oqueue.h.
void OutgoingDataQueue::setOutQueueCryptoContext
(
CryptoContext *
cc )
inherited |
Set ouput queue CryptoContext.
The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts.
- Parameters
-
void OutgoingDataQueue::setPadding
(
uint8
paddinglen )
inlineinherited |
Set padding.
All outgoing packets will be transparently padded to a multiple of paddinglen.
- Parameters
-
paddinglen pad packets to a length multiple of paddinglen.
Definition at line 323 of file oqueue.h.
size_t OutgoingDataQueue::setPartial
(
uint32
timestamp,
unsigned char *
data,
size_t
offset,
size_t
max
)
inherited |
Set partial data for an already queued packet.
This is often used for multichannel data.
- Parameters
-
timestamp Timestamp of packet.
offset Offset to copy from.
max Maximum data size.
- Returns
- Number of packet data bytes set.
void SyncSourceHandler::setParticipant
(
SyncSource &
source,
)
inlineinherited |
Set the payload format in use, for timing and payload type identification purposes.
- Parameters
-
pf payload format to use from now on.
- Returns
- whether the payload format has been successfully set.
Definition at line 180 of file queuebase.h.
void ParticipantHandler::setPRIVPrefix
(
Participant *
part,
const std::string
val
)
inlineinherited |
Set the default scheduling timeout to use when no data packets are waiting to be sent.
- Parameters
-
to timeout in milliseconds.
Definition at line 367 of file oqueue.h.
void ParticipantHandler::setSDESItem
(
Participant *
part,
const std::string &
val
)
inlineinherited |
void SyncSourceHandler::setSender
(
SyncSource &
source,
bool
active
)
inlineinherited |
void RTPDataQueue::setSessionBandwidth
(
uint32
bw )
inline |
void IncomingDataQueue::setSourceExpirationPeriod
(
uint8
intervals )
inlineprotectedinherited |
Set the number of RTCP intervals that the stack will wait to change the state of a source from stateActive to stateInactive, or to delete the source after being in stateInactive.
Note that this value should be uniform accross all participants and SHOULD be fixed for a particular profile.
- Parameters
-
intervals number of RTCP report intervals
- Note
- If RTCP is not being used, the RTCP interval is assumed to be the default: 5 seconds.
-
The default for this value is, as RECOMMENDED, 5.
Definition at line 1122 of file iqueue.h.
void SyncSourceHandler::setState
(
SyncSource &
source,
)
inlineinherited |
void RTPDataQueue::setTimeclock
(
)
inline |
Set the packet timeclock for synchronizing timestamps.
Definition at line 229 of file ioqueue.h.
void RTPDataQueue::setTypeOfService
(
Tos
tos )
inline |
Specify the kind of service the application expects to use.
- Parameters
-
tos type of service the application expects to use
- Note
- If enhanced service is specified but packet loss is high (the requested service does not appear to actually be delivered) ccRTP defaults to best-effort suitable behaviour: guarantee fair competition with TCP.
- Todo:
- Implement fair competition with tcp
Definition at line 119 of file ioqueue.h.
virtual size_t IncomingDataQueue::takeInDataPacket
(
)
protectedvirtualinherited |
This function is used by the service thread to process the next incoming packet and place it in the receive list.
- Returns
- number of payload bytes received. <0 if error.
Reimplemented in ZrtpQueue.
virtual void RTPDataQueue::timerTick
(
)
inlineprotectedvirtual |
A plugin point for timer tick driven events.
Definition at line 281 of file ioqueue.h.
void DestinationListHandler::unlockDestinationList
(
)
const
inlineinherited |
void DestinationListHandler::writeLockDestinationList
(
)
const
inlineprotectedinherited |
Field Documentation
bool OutgoingDataQueue::complete
inherited |
Mutex OutgoingDataQueue::cryptoMutex
mutableprotectedinherited |
Mutex IncomingDataQueue::cryptoMutex
mutableprotectedinherited |
volatile bool RTPDataQueue::dataServiceActive
private |
const uint16 IncomingDataQueue::defaultMaxPacketDropout
staticprotectedinherited |
const uint16 IncomingDataQueue::defaultMaxPacketMisorder
staticprotectedinherited |
const size_t MembershipBookkeeping::defaultMembersHashSize
staticprotectedinherited |
const size_t IncomingDataQueue::defaultMembersSize
staticprotectedinherited |
const uint8 IncomingDataQueue::defaultMinValidPacketSequence
staticprotectedinherited |
const uint32 RTPDataQueue::defaultSessionBw
staticprivate |
bool OutgoingDataQueue::marked
inherited |
uint16 IncomingDataQueue::maxPacketDropout
protectedinherited |
uint16 IncomingDataQueue::maxPacketMisorder
protectedinherited |
uint8 IncomingDataQueue::minValidPacketSequence
protectedinherited |
uint32 OutgoingDataQueue::octetCount
inherited |
timeval OutgoingDataQueue::overflowTime
inherited |
uint32 OutgoingDataQueue::packetCount
inherited |
uint8 OutgoingDataQueue::paddinglen
inherited |
mutableprotectedinherited |
uint16 OutgoingDataQueue::sendCC
inherited |
uint16 OutgoingDataQueue::sendSeq
inherited |
uint32 OutgoingDataQueue::sendSources[16]
inherited |
const uint32 MembershipBookkeeping::SEQNUMMOD
staticprotectedinherited |
uint32 RTPDataQueue::sessionBw
private |
uint8 IncomingDataQueue::sourceExpirationPeriod
protectedinherited |
Tos RTPDataQueue::typeOfService
private |
The documentation for this class was generated from the following file:
Generated on Dec 21, 2017 for
commoncpp2-1.8.1,
ccrtp-1.7.2,
libzrtpcpp-2.3.4,
ccscript3-1.1.7,
ccaudio2-1.0.0 and
bayonne2-2.3.2
(after installation in /usr/local/)
by
doxygen 1.8.6