SmolRTSP 0.1.3
A small, portable, extensible RTSP 1.0 implementation in C99
Loading...
Searching...
No Matches
h265.h
Go to the documentation of this file.
1
9#pragma once
10
11#include <stdbool.h>
12
13#include <slice99.h>
14
15#include <smolrtsp/priv/compiler_attrs.h>
16
20#define SMOLRTSP_H265_NAL_HEADER_SIZE sizeof(uint16_t)
21
27#define SMOLRTSP_H265_FU_HEADER_SIZE \
28 (/* payload-hdr */ sizeof(uint16_t) + /* fu-header */ sizeof(uint8_t))
29
33typedef struct {
38
42 uint8_t unit_type;
43
47 uint8_t nuh_layer_id;
48
54
69
74 uint8_t bytes[restrict static 2]) SMOLRTSP_PRIV_MUST_USE;
75
80 SMOLRTSP_PRIV_MUST_USE;
81
86 SMOLRTSP_PRIV_MUST_USE;
87
92 SMOLRTSP_PRIV_MUST_USE;
93
98 SMOLRTSP_PRIV_MUST_USE;
99
104 SMOLRTSP_PRIV_MUST_USE;
105
110 SMOLRTSP_PRIV_MUST_USE;
111
124 SmolRTSP_H265NalHeader self, uint8_t buffer[restrict],
125 bool is_first_fragment, bool is_last_fragment);
126
130#define SMOLRTSP_H265_NAL_UNIT_TRAIL_N 0
131
135#define SMOLRTSP_H265_NAL_UNIT_TRAIL_R 1
136
140#define SMOLRTSP_H265_NAL_UNIT_TSA_N 2
141
145#define SMOLRTSP_H265_NAL_UNIT_TSA_R 3
146
150#define SMOLRTSP_H265_NAL_UNIT_STSA_N 4
151
155#define SMOLRTSP_H265_NAL_UNIT_STSA_R 5
156
160#define SMOLRTSP_H265_NAL_UNIT_RADL_N 6
161
165#define SMOLRTSP_H265_NAL_UNIT_RADL_R 7
166
170#define SMOLRTSP_H265_NAL_UNIT_RASL_N 8
171
175#define SMOLRTSP_H265_NAL_UNIT_RASL_R 9
176
180#define SMOLRTSP_H265_NAL_UNIT_BLA_W_LP 16
181
185#define SMOLRTSP_H265_NAL_UNIT_BLA_W_RADL 17
186
190#define SMOLRTSP_H265_NAL_UNIT_BLA_N_LP 18
191
195#define SMOLRTSP_H265_NAL_UNIT_IDR_W_RADL 19
196
200#define SMOLRTSP_H265_NAL_UNIT_IDR_N_LP 20
201
205#define SMOLRTSP_H265_NAL_UNIT_CRA_NUT 21
206
210#define SMOLRTSP_H265_NAL_UNIT_VPS_NUT 32
211
215#define SMOLRTSP_H265_NAL_UNIT_SPS_NUT 33
216
220#define SMOLRTSP_H265_NAL_UNIT_PPS_NUT 34
221
225#define SMOLRTSP_H265_NAL_UNIT_AUD_NUT 35
226
230#define SMOLRTSP_H265_NAL_UNIT_EOS_NUT 36
231
235#define SMOLRTSP_H265_NAL_UNIT_EOB_NUT 37
236
240#define SMOLRTSP_H265_NAL_UNIT_FD_NUT 38
241
245#define SMOLRTSP_H265_NAL_UNIT_PREFIX_SEI_NUT 39
246
250#define SMOLRTSP_H265_NAL_UNIT_SUFFIX_SEI_NUT 40
bool SmolRTSP_H265NalHeader_is_sps(SmolRTSP_H265NalHeader self) SMOLRTSP_PRIV_MUST_USE
Checks whether self is SPS.
bool SmolRTSP_H265NalHeader_is_coded_slice_idr(SmolRTSP_H265NalHeader self) SMOLRTSP_PRIV_MUST_USE
Checks whether self is a coded slice IDR.
void SmolRTSP_H265NalHeader_write_fu_header(SmolRTSP_H265NalHeader self, uint8_t buffer[restrict], bool is_first_fragment, bool is_last_fragment)
Writes a FU header of self to buffer.
bool SmolRTSP_H265NalHeader_is_pps(SmolRTSP_H265NalHeader self) SMOLRTSP_PRIV_MUST_USE
Checks whether self is PPS.
bool SmolRTSP_H265NalHeader_is_coded_slice_non_idr(SmolRTSP_H265NalHeader self) SMOLRTSP_PRIV_MUST_USE
Checks whether self is a coded slice non-IDR.
SmolRTSP_H265NalHeader SmolRTSP_H265NalHeader_parse(uint8_t bytes[restrict static 2]) SMOLRTSP_PRIV_MUST_USE
Parses an H.265 NAL header from byte_header.
bool SmolRTSP_H265NalHeader_is_vps(SmolRTSP_H265NalHeader self) SMOLRTSP_PRIV_MUST_USE
Checks whether self is VPS.
uint16_t SmolRTSP_H265NalHeader_serialize(SmolRTSP_H265NalHeader self) SMOLRTSP_PRIV_MUST_USE
Converts self to a two-octet representation.
An H.265 NAL header.
Definition h265.h:33
bool forbidden_zero_bit
forbidden_zero_bit f(1).
Definition h265.h:37
uint8_t unit_type
unit_type u(6).
Definition h265.h:42
uint8_t nuh_layer_id
nuh_layer_id u(6).
Definition h265.h:47
uint8_t nuh_temporal_id_plus1
nuh_temporal_id_plus1 u(3).
Definition h265.h:52
An H.265 NAL unit.
Definition h265.h:58
U8Slice99 payload
The payload data of this NAL unit (not including the header).
Definition h265.h:67
SmolRTSP_H265NalHeader header
The NAL header of this NAL unit.
Definition h265.h:62