RFC 3550 Section 6-compliant RTCP packet types.
More...
#include <compy/priv/compiler_attrs.h>
#include <stddef.h>
#include <stdint.h>
#include <slice99.h>
Go to the source code of this file.
|
|
#define | COMPY_RTCP_SR 200 |
| |
|
#define | COMPY_RTCP_RR 201 |
| |
|
#define | COMPY_RTCP_SDES 202 |
| |
|
#define | COMPY_RTCP_BYE 203 |
| |
|
#define | COMPY_RTCP_APP 204 |
| |
|
#define | COMPY_RTCP_SDES_CNAME 1 |
| |
|
#define | COMPY_RTCP_MAX_PACKET_SIZE 512 |
| |
RFC 3550 Section 6-compliant RTCP packet types.
◆ Compy_RtcpBye_serialize()
| size_t Compy_RtcpBye_serialize |
( |
uint32_t |
ssrc, |
|
|
uint8_t |
buffer[restrict] |
|
) |
| |
Serializes a BYE packet into buffer.
- Parameters
-
| [in] | ssrc | The SSRC to include in the BYE. |
| [out] | buffer | Output buffer, must be at least 8 bytes. |
- Precondition
buffer != NULL
- Returns
- The total number of bytes written.
◆ Compy_RtcpHeader_deserialize()
| int Compy_RtcpHeader_deserialize |
( |
Compy_RtcpHeader *restrict |
self, |
|
|
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
Deserializes an RTCP common header from data.
- Parameters
-
| [out] | self | The parsed header. |
| [in] | data | The buffer to parse. |
| [in] | len | Length of data. |
- Precondition
self != NULL
-
data != NULL
- Returns
- 0 on success, -1 if data is too short or version is not 2.
◆ Compy_RtcpReportBlock_deserialize()
| int Compy_RtcpReportBlock_deserialize |
( |
Compy_RtcpReportBlock *restrict |
self, |
|
|
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
Deserializes an RTCP Receiver Report block from data.
- Parameters
-
| [out] | self | The parsed report block. |
| [in] | data | The buffer to parse (must point past the RTCP header). |
| [in] | len | Length of data. |
- Precondition
self != NULL
-
data != NULL
- Returns
- 0 on success, -1 if data is too short.
◆ Compy_RtcpSenderReport_serialize()
| size_t Compy_RtcpSenderReport_serialize |
( |
Compy_RtcpSenderInfo |
info, |
|
|
const char * |
cname, |
|
|
uint8_t |
buffer[restrict] |
|
) |
| |
Serializes a compound SR + SDES packet into buffer.
- Parameters
-
| [in] | info | The sender report information. |
| [in] | cname | The CNAME string for the SDES item. |
| [out] | buffer | Output buffer, must be at least COMPY_RTCP_MAX_PACKET_SIZE bytes. |
- Precondition
cname != NULL
-
buffer != NULL
- Returns
- The total number of bytes written.