|
SmolRTSP 0.2.0
A small, portable, extensible RTSP 1.0 implementation in C99
|
An RTP/NAL data transport. More...
#include <smolrtsp/droppable.h>#include <smolrtsp/nal.h>#include <smolrtsp/rtp_transport.h>#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_NalTransportConfig |
| The configuration structure for SmolRTSP_NalTransport. More... | |
Typedefs | |
| typedef struct SmolRTSP_NalTransport | SmolRTSP_NalTransport |
| An RTP/NAL data transport. | |
Functions | |
| SmolRTSP_NalTransportConfig | SmolRTSP_NalTransportConfig_default (void) SMOLRTSP_PRIV_MUST_USE |
| Returns the default SmolRTSP_NalTransportConfig. | |
| SmolRTSP_NalTransport * | SmolRTSP_NalTransport_new (SmolRTSP_RtpTransport *t) SMOLRTSP_PRIV_MUST_USE |
| Creates a new RTP/NAL transport with the default configuration. | |
| SmolRTSP_NalTransport * | SmolRTSP_NalTransport_new_with_config (SmolRTSP_RtpTransport *t, SmolRTSP_NalTransportConfig config) SMOLRTSP_PRIV_MUST_USE |
| Creates a new RTP/NAL transport with a custom configuration. | |
| int | SmolRTSP_NalTransport_send_packet (SmolRTSP_NalTransport *self, SmolRTSP_RtpTimestamp ts, bool is_au_end, SmolRTSP_NalUnit nalu) SMOLRTSP_PRIV_MUST_USE |
| Sends an RTP/NAL packet. | |
| declImplExtern99 (SmolRTSP_Droppable, SmolRTSP_NalTransport) | |
| Implements SmolRTSP_Droppable_IFACE for SmolRTSP_NalTransport. | |
| bool | SmolRTSP_NalTransport_is_full (SmolRTSP_NalTransport *self) |
An RTP/NAL data transport.
| declImplExtern99 | ( | SmolRTSP_Droppable | , |
| SmolRTSP_NalTransport | |||
| ) |
Implements SmolRTSP_Droppable_IFACE for SmolRTSP_NalTransport.
See Interface99 for the macro usage.
| SmolRTSP_NalTransport * SmolRTSP_NalTransport_new | ( | SmolRTSP_RtpTransport * | t | ) |
Creates a new RTP/NAL transport with the default configuration.
| [in] | t | The underlying RTP transport. |
t != NULL | SmolRTSP_NalTransport * SmolRTSP_NalTransport_new_with_config | ( | SmolRTSP_RtpTransport * | t, |
| SmolRTSP_NalTransportConfig | config | ||
| ) |
Creates a new RTP/NAL transport with a custom configuration.
| [in] | t | The underlying RTP transport. |
| [in] | config | The transmission configuration structure. |
t != NULL | int SmolRTSP_NalTransport_send_packet | ( | SmolRTSP_NalTransport * | self, |
| SmolRTSP_RtpTimestamp | ts, | ||
| bool | is_au_end, | ||
| SmolRTSP_NalUnit | nalu | ||
| ) |
Sends an RTP/NAL packet.
If nalu is larger than the limit values from SmolRTSP_NalTransportConfig (configured via SmolRTSP_NalTransport_new), nalu will be fragmented.
| [out] | self | The RTP/NAL transport for sending this packet. |
| [in] | ts | The RTP timestamp for this packet. |
| [in] | is_au_end | true if nalu is the last NAL unit of its access unit (frame). The RTP marker bit is set on the final RTP packet emitted for this NAL only when this is true. Callers that do not split a frame into multiple NALs (single coded slice per frame) should pass true. RFC 6184 §5.1 / RFC 7798 §4.4.1. |
| [in] | nalu | The NAL unit of this RTP packet. |
self != NULLerrno appropriately, 0 on success. | SmolRTSP_NalTransportConfig SmolRTSP_NalTransportConfig_default | ( | void | ) |
Returns the default SmolRTSP_NalTransportConfig.
The default values are:
max_h264_nalu_size is #SMOLRTSP_MAX_H264_NALU_SIZE.max_h265_nalu_size is #SMOLRTSP_MAX_H265_NALU_SIZE.max_h266_nalu_size is #SMOLRTSP_MAX_H266_NALU_SIZE.