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

Abstract base class for AVC data, either access units or structures. More...

#include <tsAbstractVideoData.h>

Inheritance diagram for ts::AbstractVideoData:
Collaboration diagram for ts::AbstractVideoData:

Public Member Functions

 AbstractVideoData ()=default
 Constructor.
 
virtual void clear ()
 Clear all values.
 
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.
 
virtual bool parse (const uint8_t *addr, size_t size, std::initializer_list< uint32_t > params=std::initializer_list< uint32_t >())=0
 Parse a memory area containing binary video data of the expected type.
 

Public Attributes

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.
 

Detailed Description

Abstract base class for AVC data, either access units or structures.

Typically used in:

  • AVC, Advanced Video Coding, ISO 14496-10, ITU-T Rec. H.264.
  • HEVC, High Efficiency Video Coding, ITU-T Rec. H.265.
  • VVC, Versatile Video Coding, ITU-T Rec. H.266.

There is no strict encapsulation of data. Each subclass exposes public fields. This base class declares a common interface to parse, display and validate the data.

Member Function Documentation

◆ clear()

◆ parse()

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

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.

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

◆ 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
inlineprotected

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
inlineprotected

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::HEVCHRDParameters, ts::HEVCProfileTierLevel, ts::HEVCScalingListData, ts::HEVCShortTermReferencePictureSetList, ts::ModulationArgs, ts::SignalState, ts::AVCHRDParameters, ts::HEVCAccessUnitDelimiter, ts::HEVCVUIParameters, ts::AVCAccessUnitDelimiter, ts::AVCSequenceParameterSet, ts::AVCVUIParameters, ts::HEVCSequenceParameterSet, and ts::VVCAccessUnitDelimiter.

Member Data Documentation

◆ valid

bool ts::AbstractVideoData::valid = false

Valid flag.

Other fields are significant only if valid is true.


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