TSDuck v3.46-4985
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::DTVProperties Class Reference

#include <tsDTVProperties.h>

Public Member Functions

 DTVProperties ()
virtual ~DTVProperties ()
size_t add (uint32_t cmd, uint32_t data=-1)
size_t addStat (uint32_t cmd)
template<typename ENUM>
requires std::integral<ENUM> || std::is_enum_v<ENUM>
void addVar (uint32_t cmd, const std::optional< ENUM > &data)
void clear ()
size_t count () const
uint32_t getByCommand (uint32_t cmd) const
uint32_t getByIndex (size_t index) const
::dtv_properties * getIoctlParam ()
const ::dtv_properties * getIoctlParam () const
bool getStatByCommand (int64_t &value, ::fecap_scale_params &scale, uint32_t cmd, size_t layer) const
template<typename INT>
requires std::integral<INT> || std::is_enum_v<INT>
void getValuesByCommand (std::set< INT > &values, uint32_t cmd) const
template<typename INT>
requires std::integral<INT> || std::is_enum_v<INT>
void getValuesByIndex (std::set< INT > &values, size_t index) const
void report (Report &report, int severity) const
void reportStat (Report &report, int severity) const
size_t search (uint32_t cmd) const

Static Public Member Functions

static const char * CommandName (uint32_t cmd)

Static Public Attributes

static constexpr uint32_t UNKNOWN = ~0U

Detailed Description

Encapsulation of Linux DVB property lists.

Constructor & Destructor Documentation

◆ DTVProperties()

ts::DTVProperties::DTVProperties ( )

Default constructor.

◆ ~DTVProperties()

virtual ts::DTVProperties::~DTVProperties ( )
virtual

Destructor.

Member Function Documentation

◆ count()

size_t ts::DTVProperties::count ( ) const
inline

Get the number of properties in the buffer.

Returns
The number of properties in the buffer.

◆ clear()

void ts::DTVProperties::clear ( )
inline

Clear all previously added commands.

◆ add()

size_t ts::DTVProperties::add ( uint32_t cmd,
uint32_t data = -1 )

Add a new property.

Parameters
[in]cmdCommand code.
[in]dataOptional command data.
Returns
The index in property buffer, or NPOS if the buffer is full. Note that no modulation requires more parameters than allowed in the buffer. So, no error is expected.

◆ addVar()

template<typename ENUM>
requires std::integral<ENUM> || std::is_enum_v<ENUM>
void ts::DTVProperties::addVar ( uint32_t cmd,
const std::optional< ENUM > & data )
inline

Add a new property if a variable is set.

Parameters
[in]cmdCommand code.
[in]dataOptional command data.

◆ addStat()

size_t ts::DTVProperties::addStat ( uint32_t cmd)

Add a new property to get statistics.

Parameters
[in]cmdCommand code.
Returns
The index in property buffer, or NPOS if the buffer is full. Note that no modulation requires more parameters than allowed in the buffer. So, no error is expected.

◆ search()

size_t ts::DTVProperties::search ( uint32_t cmd) const

Search a property in the buffer.

Parameters
[in]cmdCommand code.
Returns
The index of cmd in buffer or count() if not found.

◆ getByCommand()

uint32_t ts::DTVProperties::getByCommand ( uint32_t cmd) const

Get the value of a property in the buffer.

Parameters
[in]cmdCommand code.
Returns
The data value of cmd in buffer or UNKNOWN if not found.

◆ getByIndex()

uint32_t ts::DTVProperties::getByIndex ( size_t index) const

Get the value of the property at a specified index.

Parameters
[in]indexIndex in buffer.
Returns
The data value at index or UNKNOWN if out of range.

◆ getStatByCommand()

bool ts::DTVProperties::getStatByCommand ( int64_t & value,
::fecap_scale_params & scale,
uint32_t cmd,
size_t layer ) const

Get the value of a statistics property in the buffer.

Parameters
[out]valueStatistics value.
[out]scaleRepresentation of the value.
[in]cmdCommand code.
[in]layerStatistics layer. 0 in most case, 1..3 for ISDB sub-layers.
Returns
True on success, false on error or not available.

◆ getValuesByCommand()

template<typename INT>
requires std::integral<INT> || std::is_enum_v<INT>
void ts::DTVProperties::getValuesByCommand ( std::set< INT > & values,
uint32_t cmd ) const

Get the multiple values of a property in the buffer. To be used with properties which return a set of integer values.

Template Parameters
INTAn integer or enum type, any size, signed or unsigned.
Parameters
[out]valuesA set receiving all integer values.
[in]cmdCommand code.

◆ getValuesByIndex()

template<typename INT>
requires std::integral<INT> || std::is_enum_v<INT>
void ts::DTVProperties::getValuesByIndex ( std::set< INT > & values,
size_t index ) const

Get the multiple values of a property at a specified index. To be used with properties which return a set of integer values.

Template Parameters
INTAn integer or enum type, any size, signed or unsigned.
Parameters
[out]valuesA set receiving all integer values.
[in]indexIndex in buffer.

◆ getIoctlParam() [1/2]

const ::dtv_properties * ts::DTVProperties::getIoctlParam ( ) const
inline

Get the address of the dtv_properties structure for ioctl() call.

Returns
The address of the dtv_properties structure.

◆ getIoctlParam() [2/2]

::dtv_properties * ts::DTVProperties::getIoctlParam ( )
inline

Get the address of the dtv_properties structure for ioctl() call.

Returns
The address of the dtv_properties structure.

◆ report()

void ts::DTVProperties::report ( Report & report,
int severity ) const

Display the content of the object (for debug purpose).

Parameters
[in,out]reportWhere to display the content.
[in]severitySeverity level of messages (typically a debug level).

◆ reportStat()

void ts::DTVProperties::reportStat ( Report & report,
int severity ) const

Display the statistics content of the object (for debug purpose).

Parameters
[in,out]reportWhere to display the content.
[in]severitySeverity level of messages (typically a debug level).

◆ CommandName()

const char * ts::DTVProperties::CommandName ( uint32_t cmd)
inlinestatic

Return the name of a command.

Parameters
[in]cmdCommand code.
Returns
A name for cmd or a null pointer if unknown.

Member Data Documentation

◆ UNKNOWN

uint32_t ts::DTVProperties::UNKNOWN = ~0U
staticconstexpr

Returned value for unknown data.


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