SmolRTSP
0.1.3
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 <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... | |
Macros | |
#define | SMOLRTSP_MAX_H264_NALU_SIZE 1200 |
The default value for SmolRTSP_NalTransportConfig.max_h264_nalu_size. | |
#define | SMOLRTSP_MAX_H265_NALU_SIZE 1200 |
The default value for SmolRTSP_NalTransportConfig.max_h265_nalu_size. | |
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. More... | |
SmolRTSP_NalTransport * | SmolRTSP_NalTransport_new (SmolRTSP_RtpTransport *t) SMOLRTSP_PRIV_MUST_USE |
Creates a new RTP/NAL transport with the default configuration. More... | |
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. More... | |
int | SmolRTSP_NalTransport_send_packet (SmolRTSP_NalTransport *self, SmolRTSP_RtpTimestamp ts, SmolRTSP_NalUnit nalu) SMOLRTSP_PRIV_MUST_USE |
Sends an RTP/NAL packet. More... | |
declImplExtern99 (SmolRTSP_Droppable, SmolRTSP_NalTransport) | |
Implements SmolRTSP_Droppable_IFACE for SmolRTSP_NalTransport. More... | |
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, | ||
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] | nalu | The NAL unit of this RTP packet. |
self != NULL
errno
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.is_coded_slice
is false
.