#include <MP7Time.hpp>
Public Member Functions | |
MP7Time () | |
Default constructor. | |
bool | setTimePoint (uint value, uint ticksPerSecond=1) |
Set time point from a tick value. | |
bool | setTimePoint (const QString &mp7Value) |
Set time point from the MPEG-7 representation. | |
bool | setTimePoint (const MP7Time &otherTime) |
Copy time point from other MP7Time value. | |
bool | moveTimePoint (int value, uint ticksPerSecond) |
Move time point by the given number of ticks. | |
bool | setDuration (uint value, uint ticks) |
Set duration from a tick value. | |
bool | setDuration (const QString &mp7Value) |
Set duration from the MPEG-7 representation. | |
bool | setDuration (const MP7Time &duration) |
Set duration from another MP7Time instance. | |
bool | setDurationFromEnd (const MP7Time &end) |
Set the duration according to this object's time point and the given end time point. | |
bool | addDuration (const MP7Time &otherTime) |
Add the duration of otherTime . | |
QString | timePointPretty (bool forceSubSec=false) const |
Pretty-print time point. | |
QString | durationPretty () const |
Pretty-print duration. | |
MP7Time | endTimePoint () const |
Return end time point (time point + duration) of this interval. | |
QString | endTimePointPretty (bool forceSubSec=false) const |
Pretty-print end time point (time point + duration). | |
QString | toString () const |
Pretty-print time and duration. | |
QString | timePointMP7 () const |
Return MPEG-7 representation of time point. | |
QString | durationMP7 () const |
Return MPEG-7 representation of duration. | |
double | timeToSec () const |
Return time point in seconds. | |
int | timeToMSec () const |
Return time point in milliseconds. | |
int | durationToMSec () const |
Return duration in milliseconds. | |
double | durationToSec () const |
Return duration in seconds. | |
bool | timePointIsValid () const |
Return true if the time point is valid, i.e. | |
bool | durationIsNull () const |
Return true if the duration is 0. | |
int | compareTimePoint (const MP7Time &other) const |
Compare this time point to another one. | |
bool | contains (const MP7Time &time) const |
Return true if this interval contains the given time point or interval. |
It may denote a time point or a time interval. Note that this class may also represent media time.
|
Default constructor. Initializes to time point 0 with duration 0. |
|
Add the duration of This function supports non-negative durations only. If one of the operands has a negative duration, an error status is returned.
|
|
Compare this time point to another one. An invalid time point is considered to be earlier than any valid time point. Two invalid time points are considered to be equal. Note: The date part and time zone of the operands are currently ignored.
|
|
Return MPEG-7 representation of duration. If the duration is an IncrDuration type, only the timeUnit will be returned. |
|
Return end time point (time point + duration) of this interval. Note: This method currently ignores the date and time-zone parts of an MP7Time instance. |
|
Pretty-print end time point (time point + duration). Note: This method currently ignores the date and time-zone parts of an MP7Time instance.
|
|
Move time point by the given number of ticks. If the resulting time point would be negative, this time point is reset to 0 and an error status is returned. The date part and time zone of this object are ignored.
|
|
Set duration from another MP7Time instance. The time point value remains unchanged.
|
|
Set duration from the MPEG-7 representation.
|
|
Set duration from a tick value.
|
|
Set the duration according to this object's time point and the given end time point. Note: This function currently ignores the date part and time zone of the operands.
|
|
Copy time point from other MP7Time value. The duration value is not modified.
|
|
Set time point from the MPEG-7 representation.
|
|
Set time point from a tick value.
|
|
Return it has been set before. |
|
Pretty-print time point.
A fresh object returns
|
|
Return time point in milliseconds. The date and time zone parts of this instance are ignored. |
|
Return time point in seconds. The date and time zone parts of this instance are ignored. |