|
SmolRTSP 0.2.0
A small, portable, extensible RTSP 1.0 implementation in C99
|
AV1 RTP aggregation-header types, LEB128 helpers, and OBU constants. More...
#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <smolrtsp/priv/compiler_attrs.h>

Go to the source code of this file.
Data Structures | |
| struct | SmolRTSP_Av1AggregationHeader |
| The AV1 RTP aggregation header byte (AOMedia AV1 RTP §4.4). More... | |
Macros | |
| #define | SMOLRTSP_AV1_AGGREGATION_HEADER_SIZE 1 |
| The size in bytes of the AV1 RTP aggregation header (AOMedia AV1 RTP §4.4). | |
| #define | SMOLRTSP_AV1_LEB128_MAX_SIZE 10 |
| Maximum number of bytes that an unsigned 64-bit value can occupy when LEB128-encoded (used for OBU element lengths in AV1 RTP §4.5 and for obu_size inside AV1 OBU headers). | |
| #define | SMOLRTSP_AV1_OBU_RESERVED_0 0 |
| AV1 OBU types (AV1 spec §6.2.1). | |
| #define | SMOLRTSP_AV1_OBU_SEQUENCE_HEADER 1 |
| #define | SMOLRTSP_AV1_OBU_TEMPORAL_DELIMITER 2 |
| #define | SMOLRTSP_AV1_OBU_FRAME_HEADER 3 |
| #define | SMOLRTSP_AV1_OBU_TILE_GROUP 4 |
| #define | SMOLRTSP_AV1_OBU_METADATA 5 |
| #define | SMOLRTSP_AV1_OBU_FRAME 6 |
| #define | SMOLRTSP_AV1_OBU_REDUNDANT_FRAME_HEADER 7 |
| #define | SMOLRTSP_AV1_OBU_TILE_LIST 8 |
| #define | SMOLRTSP_AV1_OBU_PADDING 15 |
Functions | |
| void | SmolRTSP_Av1AggregationHeader_serialize (SmolRTSP_Av1AggregationHeader self, uint8_t buffer[restrict]) |
Serializes self into the single byte at buffer (network order). | |
| size_t | smolrtsp_av1_leb128_encode (uint64_t value, uint8_t buffer[restrict]) SMOLRTSP_PRIV_MUST_USE |
Encodes value as a LEB128 unsigned varint into buffer. | |
| size_t | smolrtsp_av1_leb128_decode (const uint8_t *buffer, size_t buffer_len, uint64_t *value) SMOLRTSP_PRIV_MUST_USE |
Decodes one LEB128 unsigned varint from buffer. | |
| size_t | smolrtsp_av1_leb128_size (uint64_t value) SMOLRTSP_PRIV_MUST_USE |
Returns the number of bytes that smolrtsp_av1_leb128_encode would write for value. | |
AV1 RTP aggregation-header types, LEB128 helpers, and OBU constants.
| #define SMOLRTSP_AV1_AGGREGATION_HEADER_SIZE 1 |
The size in bytes of the AV1 RTP aggregation header (AOMedia AV1 RTP §4.4).
Each RTP packet's payload begins with this single byte before any OBU elements.
| size_t smolrtsp_av1_leb128_decode | ( | const uint8_t * | buffer, |
| size_t | buffer_len, | ||
| uint64_t * | value | ||
| ) |
Decodes one LEB128 unsigned varint from buffer.
| [in] | buffer | Input buffer. |
| [in] | buffer_len | Number of bytes available at buffer. |
| [out] | value | Decoded value (only written on success). |
[1, SMOLRTSP_AV1_LEB128_MAX_SIZE]), or 0 if the input was truncated or malformed. | size_t smolrtsp_av1_leb128_encode | ( | uint64_t | value, |
| uint8_t | buffer[restrict] | ||
| ) |
Encodes value as a LEB128 unsigned varint into buffer.
| [in] | value | The value to encode. |
| [out] | buffer | Output buffer; must hold at least SMOLRTSP_AV1_LEB128_MAX_SIZE bytes. |
[1, SMOLRTSP_AV1_LEB128_MAX_SIZE]).