|
Compy 0.2.0
A lightweight RTSP 1.0 server library for embedded systems
|
RFC 3550-compliant RTP implementation. More...
#include <compy/priv/compiler_attrs.h>#include <stdbool.h>#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Data Structures | |
| struct | Compy_RtpHeader |
| An RTP header. More... | |
Functions | |
| size_t | Compy_RtpHeader_size (Compy_RtpHeader self) COMPY_PRIV_MUST_USE |
Computes the size of the binary self. | |
| uint8_t * | Compy_RtpHeader_serialize (Compy_RtpHeader self, uint8_t buffer[restrict]) COMPY_PRIV_MUST_USE |
Writes self to buffer. | |
| int | Compy_RtpHeader_deserialize (Compy_RtpHeader *restrict self, const uint8_t *data, size_t len) COMPY_PRIV_MUST_USE |
| Parses an RTP header from a binary buffer. | |
RFC 3550-compliant RTP implementation.
| int Compy_RtpHeader_deserialize | ( | Compy_RtpHeader *restrict | self, |
| const uint8_t * | data, | ||
| size_t | len | ||
| ) |
Parses an RTP header from a binary buffer.
Fields in self will be in network byte order, matching the convention used by Compy_RtpHeader_serialize.
| [out] | self | The parsed RTP header. |
| [in] | data | The buffer to parse from. |
| [in] | len | The length of data in bytes. |
self != NULL data != NULLlen is too small or the version field is not 2. | uint8_t * Compy_RtpHeader_serialize | ( | Compy_RtpHeader | self, |
| uint8_t | buffer[restrict] | ||
| ) |
Writes self to buffer.
| [in] | self | The RTP header to write. |
| [out] | buffer | The pointer to write to. Must be at least of size Compy_RtpHeader_size(self). |