#include <libmpd++/FrameRate.hh>
Public Types | |
using | size_type = size_t |
Type used to hold numerators and denominators. | |
Public Member Functions | |
FrameRate () | |
FrameRate (const std::string &frame_rate_str) | |
FrameRate (size_type numerator, size_type denominator=1) | |
FrameRate (const FrameRate &other) | |
FrameRate (FrameRate &&other) | |
virtual | ~FrameRate () |
FrameRate & | operator= (const FrameRate &other) |
FrameRate & | operator= (FrameRate &&other) |
bool | operator== (const FrameRate &other) const |
bool | operator!= (const FrameRate &other) const |
operator std::string () const | |
size_type | numerator () const |
FrameRate & | numerator (size_type num) |
size_type | denominator () const |
FrameRate & | denominator (size_type den) |
FrameRate class
This is a container for DASH MPD XML @frameRate attributes and follows the definition of FrameRateType from ISO 23009-1:2022 Clause 5.3.3.3.
Although the original definition in ISO 23009-1:2022 is simply a restricted string type, this class breaks the string down into a useful numerator and denominator pair.
using com::bbc::libmpdpp::FrameRate::size_type = size_t |
Type used to hold numerators and denominators.
|
inline |
Default constructor
This will create a new FrameRate value of "0/1".
com::bbc::libmpdpp::FrameRate::FrameRate | ( | const std::string & | frame_rate_str | ) |
Construct from string value
This will parse a DASH MPD XML FrameRateType value and store it in a new FrameRate object. The string should be in the form "<numerator>[/<denominator>]". If the optional denominator part is omitted then the denominator will default to 1.
frame_rate_str | The string to parse. |
ParseError | Thrown if the string cannot be parsed correctly. |
Construct by value
Construct a new FrameRate from the numerator
and denominator
provided.
numerator | The numerator for the frame rate. |
denominator | The denominator for the frame rate. |
|
inline |
|
inline |
|
inlinevirtual |
Destructor
|
inline |
Get the denominator
|
inline |
Get the numerator
com::bbc::libmpdpp::FrameRate::operator std::string | ( | ) | const |
|
inline |
|
inline |