TSDuck Version 3.32-2769 (TSDuck - The MPEG Transport Stream Toolkit)
ts::AbstractVideoStructure Class Referenceabstract

Base class for sub-structures inside video access units. More...

Inheritance diagram for ts::AbstractVideoStructure:
Collaboration diagram for ts::AbstractVideoStructure:

Public Types

typedef AbstractVideoData SuperClass
 Unified name for superclass.
 

Public Member Functions

 AbstractVideoStructure ()=default
 Constructor.
 
virtual void clear ()
 Clear all values. More...
 
virtual std::ostream & display (std::ostream &stream=std::cout, const UString &margin=UString(), int level=Severity::Info) const =0
 Display the content of this object to a stream. More...
 
virtual bool parse (AVCParser &parser, std::initializer_list< uint32_t > params=std::initializer_list< uint32_t >())=0
 Parse the structure. More...
 
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. More...
 

Public Attributes

bool valid
 Valid flag. More...
 

Protected Member Functions

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
void disp (std::ostream &out, const UString &margin, const UChar *name, INT n) const
 Display helper for subclasses. More...
 
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
void disp (std::ostream &out, const UString &margin, const UChar *name, std::vector< INT > n) const
 Display helper for subclasses. More...
 

Detailed Description

Base class for sub-structures inside video access units.

Member Function Documentation

◆ parse() [1/2]

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

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.

Reimplemented in ts::AVCVUIParameters, ts::AVCHRDParameters, ts::HEVCVUIParameters, ts::HEVCShortTermReferencePictureSetList, ts::HEVCScalingListData, ts::HEVCProfileTierLevel, and ts::HEVCHRDParameters.

◆ parse() [2/2]

virtual bool ts::AbstractVideoStructure::parse ( AVCParser parser,
std::initializer_list< uint32_t >  params = std::initializer_list< uint32_t >() 
)
pure virtual

Parse the structure.

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

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

Implemented in ts::AVCVUIParameters, ts::HEVCVUIParameters, ts::HEVCShortTermReferencePictureSetList, ts::HEVCScalingListData, ts::HEVCProfileTierLevel, ts::HEVCHRDParameters, and ts::AVCHRDParameters.

◆ clear()

◆ disp() [1/2]

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
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 , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
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.

◆ display()

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

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.

Implemented in ts::VVCAccessUnitDelimiter, ts::HEVCSequenceParameterSet, ts::AVCVUIParameters, ts::AVCSequenceParameterSet, ts::AVCAccessUnitDelimiter, ts::HEVCVUIParameters, ts::HEVCAccessUnitDelimiter, ts::AVCHRDParameters, ts::SignalState, ts::ModulationArgs, ts::HEVCShortTermReferencePictureSetList, ts::HEVCScalingListData, ts::HEVCProfileTierLevel, and ts::HEVCHRDParameters.

Member Data Documentation

◆ valid

bool ts::AbstractVideoData::valid
inherited

Valid flag.

Other fields are significant only if valid is true.


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