View Source Membrane.RTP.H264.NAL.Header (Membrane RTP H264 Plugin v0.13.0)
Defines a structure representing Network Abstraction Layer Unit Header
Defined in RFC 6184
+---------------+
|0|1|2|3|4|5|6|7|
+-+-+-+-+-+-+-+-+
|F|NRI| Type |
+---------------+
Link to this section Summary
Types
NRI stands for nal_ref_idc. This value represents importance of frame that is being parsed.
Specifies the type of RBSP data structure contained in the NAL unit.
Link to this section Types
@type nri() :: 0..3
NRI stands for nal_ref_idc. This value represents importance of frame that is being parsed.
The higher the value the more important frame is (for example key frames have nri value of 3) and a value of 00 indicates that the content of the NAL unit is not used to reconstruct reference pictures for inter picture prediction. NAL units with NRI equal 0 can be discarded without risking the integrity of the reference pictures, although these payloads might contain metadata.
@type supported_types() :: :stap_a | :fu_a | :single_nalu
@type type() :: 1..31
Specifies the type of RBSP data structure contained in the NAL unit.
Types are defined as follows.
ID | RBSP Type |
---|---|
0 | Unspecified |
1-23 | NAL unit types |
24 | STAP-A |
25 | STAP-B |
26 | MTAP-16 |
27 | MTAP-24 |
28 | FU-A |
29 | FU-B |
Reserved | 30-31 |
RBSP stands for Raw Byte Sequence Payload
RBSP types are described in detail here
@type types() :: supported_types() | unsupported_types() | :reserved
@type unsupported_types() :: :stap_b | :mtap_16 | :mtap_24 | :fu_b
Link to this section Functions
Adds NAL header to payload
Parses type stored in NAL Header
Encodes given NAL type