ifm3d
ifm3d::NalUnit Struct Reference

A single, fully reassembled H.264 NAL unit. More...

#include <ifm3d/rtsp/nal_unit.h>

Public Types

enum  Type : std::uint8_t {
  NON_IDR_SLICE = 1 , IDR_SLICE = 5 , SEI = 6 , SPS = 7 ,
  PPS = 8 , ACCESS_UNIT_DELIMITER = 9
}
 H.264 NAL unit type values (ITU-T H.264 Table 7-1, RFC 6184 ยง1.3).
 

Public Member Functions

std::size_t Size () const
 

Public Attributes

std::vector< std::uint8_t > data
 Raw NAL payload, NAL-header byte first, without an Annex-B start code and with emulation-prevention bytes still present.
 
std::uint8_t nal_ref_idc = 0
 nal_ref_idc field from the NAL header (0-3).
 
std::uint8_t nal_unit_type = 0
 nal_unit_type field from the NAL header (1-31).
 
std::uint64_t pts_us = 0
 Presentation timestamp derived from the RTP timestamp, in microseconds.
 
bool is_idr = false
 True when this NAL unit is an IDR slice (nal_unit_type == 5).
 
std::uint16_t first_sequence_number = 0
 RTP sequence number of the first packet this NAL originated from.
 
std::uint16_t last_sequence_number = 0
 RTP sequence number of the last packet this NAL originated from.
 

Detailed Description

A single, fully reassembled H.264 NAL unit.

A NalUnit is emitted for every complete NAL unit produced by the RTP depacketizer, after FU-A fragments have been reassembled and STAP-A aggregations have been expanded into individual units. The payload is the raw NAL byte stream without an Annex-B start code; the first byte is the NAL header (forbidden_zero_bit, nal_ref_idc, nal_unit_type).

NAL units are delivered to the RtspClient::OnNalUnit callback before the decoder host is invoked, allowing callers to inspect the raw bitstream even when decoding is disabled.

Member Function Documentation

◆ Size()

std::size_t ifm3d::NalUnit::Size ( ) const
inline
Returns
the number of bytes in the NAL payload.

The documentation for this struct was generated from the following file: