TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
Encapsulation of Linux DVB property lists. More...
#include <tsDTVProperties.h>
Public Member Functions | |
DTVProperties () | |
Default constructor. | |
virtual | ~DTVProperties () |
Destructor. | |
size_t | add (uint32_t cmd, uint32_t data=-1) |
Add a new property. | |
size_t | addStat (uint32_t cmd) |
Add a new property to get statistics. | |
template<typename ENUM , typename std::enable_if< std::is_integral< ENUM >::value||std::is_enum< ENUM >::value >::type * = nullptr> | |
void | addVar (uint32_t cmd, const std::optional< ENUM > &data) |
Add a new property if a variable is set. | |
void | clear () |
Clear all previously added commands. | |
size_t | count () const |
Get the number of properties in the buffer. | |
uint32_t | getByCommand (uint32_t cmd) const |
Get the value of a property in the buffer. | |
uint32_t | getByIndex (size_t index) const |
Get the value of the property at a specified index. | |
::dtv_properties * | getIoctlParam () |
Get the address of the dtv_properties structure for ioctl() call. | |
const ::dtv_properties * | getIoctlParam () const |
Get the address of the dtv_properties structure for ioctl() call. | |
bool | 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. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value||std::is_enum< INT >::value >::type * = nullptr> | |
void | getValuesByCommand (std::set< INT > &values, uint32_t cmd) const |
Get the multiple values of a property in the buffer. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value||std::is_enum< INT >::value >::type * = nullptr> | |
void | getValuesByIndex (std::set< INT > &values, size_t index) const |
Get the multiple values of a property at a specified index. | |
void | report (Report &report, int severity) const |
Display the content of the object (for debug purpose). | |
void | reportStat (Report &report, int severity) const |
Display the statistics content of the object (for debug purpose). | |
size_t | search (uint32_t cmd) const |
Search a property in the buffer. | |
Static Public Member Functions | |
static const char * | CommandName (uint32_t cmd) |
Return the name of a command. | |
Static Public Attributes | |
static constexpr uint32_t | UNKNOWN = ~0U |
Returned value for unknown data. | |
Encapsulation of Linux DVB property lists.
|
inline |
Get the number of properties in the buffer.
size_t ts::DTVProperties::add | ( | uint32_t | cmd, |
uint32_t | data = -1 |
||
) |
Add a new property.
[in] | cmd | Command code. |
[in] | data | Optional command data. |
|
inline |
Add a new property if a variable is set.
[in] | cmd | Command code. |
[in] | data | Optional command data. |
size_t ts::DTVProperties::addStat | ( | uint32_t | cmd | ) |
Add a new property to get statistics.
[in] | cmd | Command code. |
size_t ts::DTVProperties::search | ( | uint32_t | cmd | ) | const |
Search a property in the buffer.
[in] | cmd | Command code. |
uint32_t ts::DTVProperties::getByCommand | ( | uint32_t | cmd | ) | const |
Get the value of a property in the buffer.
[in] | cmd | Command code. |
uint32_t ts::DTVProperties::getByIndex | ( | size_t | index | ) | const |
Get the value of the property at a specified index.
[in] | index | Index in buffer. |
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.
[out] | value | Statistics value. |
[out] | scale | Representation of the value. |
[in] | cmd | Command code. |
[in] | layer | Statistics layer. 0 in most case, 1..3 for ISDB sub-layers. |
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.
INT | An integer or enum type, any size, signed or unsigned. |
[out] | values | A set receiving all integer values. |
[in] | cmd | Command code. |
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.
INT | An integer or enum type, any size, signed or unsigned. |
[out] | values | A set receiving all integer values. |
[in] | index | Index in buffer. |
|
inline |
Get the address of the dtv_properties
structure for ioctl()
call.
dtv_properties
structure.
|
inline |
Get the address of the dtv_properties
structure for ioctl()
call.
dtv_properties
structure. void ts::DTVProperties::report | ( | Report & | report, |
int | severity | ||
) | const |
Display the content of the object (for debug purpose).
[in,out] | report | Where to display the content. |
[in] | severity | Severity level of messages (typically a debug level). |
void ts::DTVProperties::reportStat | ( | Report & | report, |
int | severity | ||
) | const |
Display the statistics content of the object (for debug purpose).
[in,out] | report | Where to display the content. |
[in] | severity | Severity level of messages (typically a debug level). |
|
inlinestatic |
Return the name of a command.
[in] | cmd | Command code. |