SmolRTSP  0.1.3
A small, portable, extensible RTSP 1.0 implementation in C99
nal_transport.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include <smolrtsp/droppable.h>
14 #include <smolrtsp/nal.h>
15 #include <smolrtsp/rtp_transport.h>
16 
17 #include <stddef.h>
18 #include <stdint.h>
19 
20 #include <smolrtsp/priv/compiler_attrs.h>
21 
25 #define SMOLRTSP_MAX_H264_NALU_SIZE 1200
26 
30 #define SMOLRTSP_MAX_H265_NALU_SIZE 1200
31 
35 typedef struct {
40 
45 
51 
62 SmolRTSP_NalTransportConfig_default(void) SMOLRTSP_PRIV_MUST_USE;
63 
68 
78 
89  SmolRTSP_NalTransportConfig config) SMOLRTSP_PRIV_MUST_USE;
90 
109  SmolRTSP_NalTransport *self, SmolRTSP_RtpTimestamp ts,
110  SmolRTSP_NalUnit nalu) SMOLRTSP_PRIV_MUST_USE;
111 
119 
120 bool SmolRTSP_NalTransport_is_full(SmolRTSP_NalTransport *self);
Droppable types support.
A generic NAL (Network Abstraction Layer) representation.
SmolRTSP_NalTransport * SmolRTSP_NalTransport_new(SmolRTSP_RtpTransport *t) SMOLRTSP_PRIV_MUST_USE
Creates a new RTP/NAL transport with the default configuration.
SmolRTSP_NalTransportConfig SmolRTSP_NalTransportConfig_default(void) SMOLRTSP_PRIV_MUST_USE
Returns the default SmolRTSP_NalTransportConfig.
declImplExtern99(SmolRTSP_Droppable, SmolRTSP_NalTransport)
Implements SmolRTSP_Droppable_IFACE for SmolRTSP_NalTransport.
int SmolRTSP_NalTransport_send_packet(SmolRTSP_NalTransport *self, SmolRTSP_RtpTimestamp ts, SmolRTSP_NalUnit nalu) SMOLRTSP_PRIV_MUST_USE
Sends an RTP/NAL packet.
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.
struct SmolRTSP_NalTransport SmolRTSP_NalTransport
An RTP/NAL data transport.
Definition: nal_transport.h:67
An RTP data transport.
struct SmolRTSP_RtpTransport SmolRTSP_RtpTransport
An RTP data transport.
Definition: rtp_transport.h:22
The configuration structure for SmolRTSP_NalTransport.
Definition: nal_transport.h:35
size_t max_h264_nalu_size
The maximum size of an H.264 NAL unit (including the header).
Definition: nal_transport.h:39
bool is_coded_slice
The encoder uses slice segments.
Definition: nal_transport.h:49
size_t max_h265_nalu_size
The maximum size of an H.265 NAL unit (including the header).
Definition: nal_transport.h:44
A generic NAL unit (either H.264 or H.265).
Definition: nal.h:115