|
SmolRTSP 0.2.0
A small, portable, extensible RTSP 1.0 implementation in C99
|
An RTP/AV1 data transport. More...
#include <smolrtsp/av1.h>#include <smolrtsp/droppable.h>#include <smolrtsp/rtp_transport.h>#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <slice99.h>#include <smolrtsp/priv/compiler_attrs.h>
Go to the source code of this file.
Data Structures | |
| struct | SmolRTSP_Av1TransportConfig |
| The configuration structure for SmolRTSP_Av1Transport. More... | |
Macros | |
| #define | SMOLRTSP_MAX_AV1_PACKET_SIZE 1200 |
| The default value for SmolRTSP_Av1TransportConfig.max_packet_size. | |
Typedefs | |
| typedef struct SmolRTSP_Av1Transport | SmolRTSP_Av1Transport |
| An RTP/AV1 data transport. | |
Functions | |
| SmolRTSP_Av1TransportConfig | SmolRTSP_Av1TransportConfig_default (void) SMOLRTSP_PRIV_MUST_USE |
| Returns the default SmolRTSP_Av1TransportConfig: SMOLRTSP_MAX_AV1_PACKET_SIZE. | |
| SmolRTSP_Av1Transport * | SmolRTSP_Av1Transport_new (SmolRTSP_RtpTransport *t) SMOLRTSP_PRIV_MUST_USE |
| Creates a new RTP/AV1 transport with the default configuration. | |
| SmolRTSP_Av1Transport * | SmolRTSP_Av1Transport_new_with_config (SmolRTSP_RtpTransport *t, SmolRTSP_Av1TransportConfig config) SMOLRTSP_PRIV_MUST_USE |
| Creates a new RTP/AV1 transport with a custom configuration. | |
| int | SmolRTSP_Av1Transport_send_temporal_unit (SmolRTSP_Av1Transport *self, SmolRTSP_RtpTimestamp ts, U8Slice99 obus, bool is_new_cvs) SMOLRTSP_PRIV_MUST_USE |
| Sends a complete AV1 temporal unit (TU) as a sequence of RTP packets. | |
| declImplExtern99 (SmolRTSP_Droppable, SmolRTSP_Av1Transport) | |
| Implements SmolRTSP_Droppable_IFACE for SmolRTSP_Av1Transport. | |
| bool | SmolRTSP_Av1Transport_is_full (SmolRTSP_Av1Transport *self) |
An RTP/AV1 data transport.
| #define SMOLRTSP_MAX_AV1_PACKET_SIZE 1200 |
The default value for SmolRTSP_Av1TransportConfig.max_packet_size.
Includes the 1-byte AV1 aggregation header: the OBU-element bytes carried per RTP packet are at most max_packet_size - SMOLRTSP_AV1_AGGREGATION_HEADER_SIZE.
| declImplExtern99 | ( | SmolRTSP_Droppable | , |
| SmolRTSP_Av1Transport | |||
| ) |
Implements SmolRTSP_Droppable_IFACE for SmolRTSP_Av1Transport.
See Interface99 for the macro usage.
| SmolRTSP_Av1Transport * SmolRTSP_Av1Transport_new | ( | SmolRTSP_RtpTransport * | t | ) |
Creates a new RTP/AV1 transport with the default configuration.
| [in] | t | The underlying RTP transport. |
t != NULL. | SmolRTSP_Av1Transport * SmolRTSP_Av1Transport_new_with_config | ( | SmolRTSP_RtpTransport * | t, |
| SmolRTSP_Av1TransportConfig | config | ||
| ) |
Creates a new RTP/AV1 transport with a custom configuration.
| [in] | t | The underlying RTP transport. |
| [in] | config | The transmission configuration structure. |
t != NULL. config.max_packet_size > SMOLRTSP_AV1_AGGREGATION_HEADER_SIZE + 1. | int SmolRTSP_Av1Transport_send_temporal_unit | ( | SmolRTSP_Av1Transport * | self, |
| SmolRTSP_RtpTimestamp | ts, | ||
| U8Slice99 | obus, | ||
| bool | is_new_cvs | ||
| ) |
Sends a complete AV1 temporal unit (TU) as a sequence of RTP packets.
obus is the concatenated raw OBU stream for one TU exactly as emitted by an AV1 encoder (each OBU prefixed by its OBU header byte, optional extension header byte, and – if obu_has_size_field == 1 – a LEB128 obu_size field, followed by obu_size bytes of payload). The library:
obu_has_size_field bit and drops the obu_size LEB128 from each remaining OBU, per AOMedia AV1 RTP §4.5.W=1); if an OBU exceeds the MTU budget it is split across consecutive packets with the Z and Y continuation flags set per §4.4.The RTP marker bit is set on the very last packet of the TU. The N (new coded video sequence) bit is set on the first packet only when is_new_cvs is true; that packet must not be a continuation (Z=0) per the §4.4 constraint.
Each packet shares ts as its RTP timestamp.
| [in] | self | The transport. |
| [in] | ts | The RTP timestamp shared by every packet of the TU. |
| [in] | obus | The concatenated raw OBU bytes of this temporal unit. |
| [in] | is_new_cvs | true iff this TU begins a new coded video sequence (typically when it contains a sequence header OBU and the receiver should treat it as a sync point). |
self != NULL.errno set) or on an OBU stream that fails to parse.