#include <rtcpcompoundpacketbuilder.h>
Inheritance diagram for RTCPCompoundPacketBuilder:
Public Member Functions | |
RTCPCompoundPacketBuilder (RTPMemoryManager *memmgr=0) | |
Constructs an RTCPCompoundPacketBuilder instance, optionally installing a memory manager. | |
int | InitBuild (size_t maxpacketsize) |
Starts building an RTCP compound packet with maximum size maxpacketsize . | |
int | InitBuild (void *externalbuffer, size_t buffersize) |
Starts building a RTCP compound packet. | |
int | StartSenderReport (uint32_t senderssrc, const RTPNTPTime &ntptimestamp, uint32_t rtptimestamp, uint32_t packetcount, uint32_t octetcount) |
Adds a sender report to the compound packet. | |
int | StartReceiverReport (uint32_t senderssrc) |
Adds a receiver report to the compound packet. | |
int | AddReportBlock (uint32_t ssrc, uint8_t fractionlost, int32_t packetslost, uint32_t exthighestseq, uint32_t jitter, uint32_t lsr, uint32_t dlsr) |
Adds the report block information specified by the function's arguments. | |
int | AddSDESSource (uint32_t ssrc) |
Starts an SDES chunk for participant ssrc . | |
int | AddSDESNormalItem (RTCPSDESPacket::ItemType t, const void *itemdata, uint8_t itemlength) |
Adds a normal (non-private) SDES item of type t to the current SDES chunk. | |
int | AddSDESPrivateItem (const void *prefixdata, uint8_t prefixlength, const void *valuedata, uint8_t valuelength) |
Adds an SDES PRIV item described by the function's arguments to the current SDES chunk. | |
int | AddBYEPacket (uint32_t *ssrcs, uint8_t numssrcs, const void *reasondata, uint8_t reasonlength) |
Adds a BYE packet to the compound packet. | |
int | AddAPPPacket (uint8_t subtype, uint32_t ssrc, const uint8_t name[4], const void *appdata, size_t appdatalen) |
Adds the APP packet specified by the arguments to the compound packet. | |
int | EndBuild () |
Finishes building the compound packet. |
ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT
if the action would cause the maximum allowed size to be exceeded.
int RTCPCompoundPacketBuilder::InitBuild | ( | size_t | maxpacketsize | ) |
Starts building an RTCP compound packet with maximum size maxpacketsize
. New memory will be allocated to store the packet.
int RTCPCompoundPacketBuilder::InitBuild | ( | void * | externalbuffer, | |
size_t | buffersize | |||
) |
Starts building a RTCP compound packet. Data will be stored in externalbuffer
which can contain buffersize
bytes.
int RTCPCompoundPacketBuilder::StartSenderReport | ( | uint32_t | senderssrc, | |
const RTPNTPTime & | ntptimestamp, | |||
uint32_t | rtptimestamp, | |||
uint32_t | packetcount, | |||
uint32_t | octetcount | |||
) |
Tells the packet builder that the packet should start with a sender report which will contain the sender information specified by this function's arguments. Once the sender report is started, report blocks can be added using the AddReportBlock function.
int RTCPCompoundPacketBuilder::StartReceiverReport | ( | uint32_t | senderssrc | ) |
Tells the packet builder that the packet should start with a receiver report which will contain he sender SSRC senderssrc
. Once the sender report is started, report blocks can be added using the AddReportBlock function.
int RTCPCompoundPacketBuilder::AddReportBlock | ( | uint32_t | ssrc, | |
uint8_t | fractionlost, | |||
int32_t | packetslost, | |||
uint32_t | exthighestseq, | |||
uint32_t | jitter, | |||
uint32_t | lsr, | |||
uint32_t | dlsr | |||
) |
Adds the report block information specified by the function's arguments. If more than 31 report blocks are added, the builder will automatically use a new RTCP receiver report packet.
int RTCPCompoundPacketBuilder::AddSDESNormalItem | ( | RTCPSDESPacket::ItemType | t, | |
const void * | itemdata, | |||
uint8_t | itemlength | |||
) |
Adds a normal (non-private) SDES item of type t
to the current SDES chunk. The item's value will have length itemlength
and will contain the data itemdata
.
int RTCPCompoundPacketBuilder::AddBYEPacket | ( | uint32_t * | ssrcs, | |
uint8_t | numssrcs, | |||
const void * | reasondata, | |||
uint8_t | reasonlength | |||
) |
Adds a BYE packet to the compound packet. It will contain numssrcs
source identifiers specified in ssrcs
and will indicate as reason for leaving the string of length reasonlength
containing data reasondata
.
int RTCPCompoundPacketBuilder::AddAPPPacket | ( | uint8_t | subtype, | |
uint32_t | ssrc, | |||
const uint8_t | name[4], | |||
const void * | appdata, | |||
size_t | appdatalen | |||
) |
Adds the APP packet specified by the arguments to the compound packet. Note that appdatalen
has to be a multiple of four.
int RTCPCompoundPacketBuilder::EndBuild | ( | ) |
Finishes building the compound packet. If successful, the RTCPCompoundPacket member functions can be used to access the RTCP packet data.