TSDuck v3.40-4033
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::AVCAccessUnitDelimiter Class Reference

Representation of an AVC access unit delimiter (AUD). More...

#include <tsAVCAccessUnitDelimiter.h>

Inheritance diagram for ts::AVCAccessUnitDelimiter:
Collaboration diagram for ts::AVCAccessUnitDelimiter:

Public Types

using SuperClass = AbstractAVCAccessUnit
 Reference to the superclass.
 

Public Member Functions

 AVCAccessUnitDelimiter (const uint8_t *data=nullptr, size_t size=0)
 Constructor from a binary area.
 
virtual void clear () override
 Clear all values.
 
virtual std::ostream & display (std::ostream &strm=std::cout, const UString &margin=UString(), int level=Severity::Info) const override
 Display the content of this object to a stream.
 
virtual bool parse (const uint8_t *, size_t, std::initializer_list< uint32_t >=std::initializer_list< uint32_t >()) override
 Parse a memory area containing binary video data of the expected type.
 

Public Attributes

uint8_t forbidden_zero_bit = 0
 See ISO/IEC 14496-10 section 7.3.1.
 
uint8_t nal_ref_idc = 0
 See ISO/IEC 14496-10 section 7.3.1.
 
uint8_t nal_unit_type = 0
 See ISO/IEC 14496-10 section 7.3.1.
 
uint8_t primary_pic_type = 0
 Primary picture type, 3 bits.
 
size_t rbsp_trailing_bits_count = 0
 rbsp_trailing_bits_count
 
bool rbsp_trailing_bits_valid = false
 rbsp_trailing_bits_valid
 
bool valid = false
 Valid flag.
 

Protected Member Functions

template<typename INT >
requires std::integral<INT>
void disp (std::ostream &out, const UString &margin, const UChar *name, INT n) const
 Display helper for subclasses.
 
template<typename INT >
requires std::integral<INT>
void disp (std::ostream &out, const UString &margin, const UChar *name, std::vector< INT > n) const
 Display helper for subclasses.
 
virtual bool parseBody (AVCParser &, std::initializer_list< uint32_t >=std::initializer_list< uint32_t >()) override
 Parse the body of the access unit up to but not including the rbsp_trailing_bits.
 
virtual bool parseHeader (const uint8_t *&, size_t &, std::initializer_list< uint32_t >=std::initializer_list< uint32_t >()) override
 Parse the header of the access unit.
 

Detailed Description

Representation of an AVC access unit delimiter (AUD).

AVC is Advanced Video Coding, ISO 14496-10, ITU H.264.

Constructor & Destructor Documentation

◆ AVCAccessUnitDelimiter()

ts::AVCAccessUnitDelimiter::AVCAccessUnitDelimiter ( const uint8_t *  data = nullptr,
size_t  size = 0 
)

Constructor from a binary area.

Parameters
[in]dataAddress of binary data to analyze.
[in]sizeSize in bytes of binary data to analyze.

Member Function Documentation

◆ clear()

virtual void ts::AVCAccessUnitDelimiter::clear ( )
overridevirtual

Clear all values.

Should be reimplemented by subclasses. The data are marked invalid.

Reimplemented from ts::AbstractAVCAccessUnit.

◆ display()

virtual std::ostream & ts::AVCAccessUnitDelimiter::display ( std::ostream &  stream = std::cout,
const UString margin = UString(),
int  level = Severity::Info 
) const
overridevirtual

Display the content of this object to a stream.

Parameters
[in,out]streamThe stream where to print the content. Standard output by default.
[in]marginThe prefix string on each line, empty by default.
[in]levelSeverity level (for instance, Severity::Info or Severity::Debug may display more information).
Returns
A reference to stream.

Implements ts::DisplayInterface.

◆ parseBody()

virtual bool ts::AVCAccessUnitDelimiter::parseBody ( AVCParser parser,
std::initializer_list< uint32_t >  params = std::initializer_list< uint32_t >() 
)
overrideprotectedvirtual

Parse the body of the access unit up to but not including the rbsp_trailing_bits.

Must be reimplemented by subclasses. The data are marked as valid or invalid.

Parameters
[in,out]parserThe parser of an AVC-like video stream.
[in]paramsAdditional parameters. May be needed by some structures.
Returns
The valid flag.

Implements ts::AbstractVideoAccessUnit.

◆ parseHeader()

virtual bool ts::AbstractAVCAccessUnit::parseHeader ( const uint8_t *&  addr,
size_t &  size,
std::initializer_list< uint32_t >  params = std::initializer_list< uint32_t >() 
)
overrideprotectedvirtualinherited

Parse the header of the access unit.

Must be reimplemented by subclasses. The data are marked as valid or invalid.

Parameters
[in,out]addrAddress of the binary data to parse. Adjusted after header.
[in,out]sizeSize in bytes of the binary data to parse. Adjusted as remaining size after header.
[in]paramsAdditional parameters. May be needed by some structures.
Returns
The valid flag.

Implements ts::AbstractVideoAccessUnit.

◆ parse()

virtual bool ts::AbstractVideoAccessUnit::parse ( const uint8_t *  addr,
size_t  size,
std::initializer_list< uint32_t >  params = std::initializer_list< uint32_t >() 
)
overridevirtualinherited

Parse a memory area containing binary video data of the expected type.

Must be reimplemented by subclasses. The data are marked as valid or invalid.

Parameters
[in]addrAddress of the binary data to parse.
[in]sizeSize in bytes of the binary data to parse.
[in]paramsAdditional parameters. May be needed by some structures.
Returns
The valid flag.

Implements ts::AbstractVideoData.

◆ disp() [1/2]

template<typename INT >
requires std::integral<INT>
void ts::AbstractVideoData::disp ( std::ostream &  out,
const UString margin,
const UChar name,
INT  n 
) const
inlineprotectedinherited

Display helper for subclasses.

Display an integer value.

Template Parameters
INTAn integer type.
Parameters
[in,out]outThe stream where to print the content.
[in]marginThe prefix string on each line.
[in]nameA name to display for the value.
[in]nThe integer value to display.

◆ disp() [2/2]

template<typename INT >
requires std::integral<INT>
void ts::AbstractVideoData::disp ( std::ostream &  out,
const UString margin,
const UChar name,
std::vector< INT n 
) const
inlineprotectedinherited

Display helper for subclasses.

Display a vector of integer value.

Template Parameters
INTAn integer type.
Parameters
[in,out]outThe stream where to print the content.
[in]marginThe prefix string on each line.
[in]nameA name to display for the value.
[in]nThe integer values to display.

Member Data Documentation

◆ valid

bool ts::AbstractVideoData::valid = false
inherited

Valid flag.

Other fields are significant only if valid is true.


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