Attributes of a tag in an HLS playlist.
More...
#include <tshlsTagAttributes.h>
|
template<class Rep , class Period > |
static bool | ToMilliValue (cn::duration< Rep, Period > &value, const UString &str) |
| Get the value of a String in milli-units of a std::chrono::duration type.
|
|
template<typename INT >
requires std::integral<INT> |
static bool | ToMilliValue (INT &value, const UString &str) |
| Get the value of a String in milli-units.
|
|
Attributes of a tag in an HLS playlist.
◆ TagAttributes()
ts::hls::TagAttributes::TagAttributes |
( |
const UString & |
params = UString() | ) |
|
Constructor.
- Parameters
-
[in] | params | String parameter of the tag in the playlist line. |
◆ reload()
void ts::hls::TagAttributes::reload |
( |
const UString & |
params = UString() | ) |
|
Reload the contents of the attributes.
- Parameters
-
[in] | params | String parameter of the tag in the playlist line. |
◆ present()
bool ts::hls::TagAttributes::present |
( |
const UString & |
name | ) |
const |
Check if an attribute is present.
- Parameters
-
- Returns
- True if the attribute is present.
◆ value()
Get the value of a string attribute.
- Parameters
-
[in] | name | Attribute name. |
[in] | defValue | Default value if not present. |
- Returns
- Attribute value.
◆ getIntValue()
template<typename
INT >
requires std::integral<
INT>
void ts::hls::TagAttributes::getIntValue |
( |
INT & |
val, |
|
|
const UString & |
name, |
|
|
INT |
defValue = static_cast<INT>(0) |
|
) |
| const |
|
inline |
Get the value of an integer attribute.
- Template Parameters
-
- Parameters
-
[out] | val | Decoded value. |
[in] | name | Attribute name. |
[in] | defValue | Default value if not present. |
◆ getValue()
template<class NUMBER >
requires std::derived_from<NUMBER,
AbstractNumber>
void ts::hls::TagAttributes::getValue |
( |
NUMBER & |
val, |
|
|
const UString & |
name, |
|
|
const NUMBER & |
defValue = NUMBER() |
|
) |
| const |
|
inline |
Get the value of an AbstractNumber attribute.
- Template Parameters
-
- Parameters
-
[out] | val | Decoded value. |
[in] | name | Attribute name. |
[in] | defValue | Default value if not present. |
◆ getMilliValue()
template<typename
INT >
requires std::integral<
INT>
void ts::hls::TagAttributes::getMilliValue |
( |
INT & |
val, |
|
|
const UString & |
name, |
|
|
INT |
defValue = static_cast<INT>(0) |
|
) |
| const |
|
inline |
Get the value of a numerical attribute in milli-units.
- Template Parameters
-
- Parameters
-
[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] | defValue | Default value if not present. |
◆ ToMilliValue() [1/2]
template<typename
INT >
requires std::integral<
INT>
static bool ts::hls::TagAttributes::ToMilliValue |
( |
INT & |
value, |
|
|
const UString & |
str |
|
) |
| |
|
inlinestatic |
Get the value of a String in milli-units.
- Template Parameters
-
- Parameters
-
[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. |
- Returns
- True on success, false on error.
◆ ToMilliValue() [2/2]
template<class Rep , class Period >
static bool ts::hls::TagAttributes::ToMilliValue |
( |
cn::duration< Rep, Period > & |
value, |
|
|
const UString & |
str |
|
) |
| |
|
inlinestatic |
Get the value of a String in milli-units of a std::chrono::duration type.
- Parameters
-
[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. |
- Returns
- True on success, false on error.
The documentation for this class was generated from the following file: