![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
#include <tshlsTagAttributes.h>
Public Member Functions | |
| TagAttributes (const UString ¶ms=UString()) | |
| void | clear () |
| template<typename INT> requires std::integral<INT> | |
| void | getIntValue (INT &val, const UString &name, INT def_value=static_cast< INT >(0)) const |
| template<typename INT> requires std::integral<INT> | |
| void | getMilliValue (INT &val, const UString &name, INT def_value=static_cast< INT >(0)) const |
| template<class NUMBER> requires std::derived_from<NUMBER, AbstractNumber> | |
| void | getValue (NUMBER &val, const UString &name, const NUMBER &def_value=NUMBER()) const |
| bool | present (const UString &name) const |
| void | reload (const UString ¶ms=UString()) |
| UString | value (const UString &name, const UString &def_value=UString()) const |
Static Public Member Functions | |
| template<class Rep, class Period> | |
| static bool | ToMilliValue (cn::duration< Rep, Period > &value, const UString &str) |
| template<typename INT> requires std::integral<INT> | |
| static bool | ToMilliValue (INT &value, const UString &str) |
Attributes of a tag in an HLS playlist.
Constructor.
| [in] | params | String parameter of the tag in the playlist line. |
Reload the contents of the attributes.
| [in] | params | String parameter of the tag in the playlist line. |
|
inline |
Clear the content of the attributes.
| bool ts::hls::TagAttributes::present | ( | const UString & | name | ) | const |
Check if an attribute is present.
| [in] | name | Attribute name. |
| UString ts::hls::TagAttributes::value | ( | const UString & | name, |
| const UString & | def_value = UString() ) const |
Get the value of a string attribute.
| [in] | name | Attribute name. |
| [in] | def_value | Default value if not present. |
|
inline |
Get the value of an integer attribute.
| INT | An integer type. |
| [out] | val | Decoded value. |
| [in] | name | Attribute name. |
| [in] | def_value | Default value if not present. |
|
inline |
Get the value of an AbstractNumber attribute.
| NUMBER | A subclass of AbstractNumber. |
| [out] | val | Decoded value. |
| [in] | name | Attribute name. |
| [in] | def_value | Default value if not present. |
|
inline |
Get the value of a numerical attribute in milli-units.
| INT | An integer type. |
| [out] | val | Decoded value. If the value is an integer, return this value times 1000. If the value is a decimal one, use 3 decimal digits. Examples: "90" -> 90000, "1.12" -> 1120, "32.1234" -> 32123. |
| [in] | name | Attribute name. |
| [in] | def_value | Default value if not present. |
Get the value of a String in milli-units.
| INT | An integer type. |
| [out] | value | Decoded value. If the value is an integer, return this value times 1000. If the value is a decimal one, use 3 decimal digits. Examples: "90" -> 90000, "1.12" -> 1120, "32.1234" -> 32123. |
| [in] | str | String to decode. |
|
inlinestatic |
Get the value of a String in milli-units of a std::chrono::duration type.
| [out] | value | Decoded value. If the value is an integer, return this value times 1000. If the value is a decimal one, use 3 decimal digits. Examples: "90" -> 90000, "1.12" -> 1120, "32.1234" -> 32123. |
| [in] | str | String to decode. |