java.lang.Object
org.mbari.vcr4j.time.MediaTime
Time modeled after Apple's CoreMedia CMTime.
A MediaTime is represented as a rational number, with a numerator (an long value),
and a denominator (an int timescale). Conceptually, the timescale specifies
the fraction of a second each unit in the numerator occupies. Thus if the
timescale is 4, each unit represents a quarter of a second; if the timescale
is 10, each unit represents a tenth of a second, and so on.
- Since:
- 2015-09-24T10:45:00
- Author:
- Brian Schlining
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MediaTimefromSeconds(double seconds, int timescale) doubleintlonggetValue()booleantoString()
-
Constructor Details
-
MediaTime
public MediaTime(long value, int timescale, boolean rounded) For example to create a MediaTime that's 200 seconds into a video that has 29.97 frame rate usenew MediaTime(20000, 2997)- Parameters:
value- numeratortimescale- denominatorrounded- Indiates if this value is estimated
-
MediaTime
public MediaTime(long value, int timescale)
-
-
Method Details