Presentation Timestamp (PTS) with added System Clock Reference (SCR) via set(long, int) and its interpolation via get(long), as well as giving raw access via getLast().
More...
|
| | PTS (final FloatValue speed) |
| | Create new instance, initializing pts with TimeFrameI#INVALID_PTS and system-clock timestamp with zero. More...
|
| |
| | PTS (final FloatValue speed, final long scr, final int pts) |
| | Create new instance. More...
|
| |
| | PTS (final PTS other) |
| | Copy constructor. More...
|
| |
| boolean | isValid () |
| | Returns true if getLast() is unequal to TimeFrameI#INVALID_PTS. More...
|
| |
| boolean | isEOS () |
| | Returns true if getLast() equals to TimeFrameI#END_OF_STREAM_PTS, indicating end of stream (EOS). More...
|
| |
| long | getSCR () |
| | Returns the System Clock Reference (SCR) in milliseconds of last PTS update via set(long, int). More...
|
| |
| String | getSCRTimeStr (final boolean addFractions) |
| | Returns getSCR() as time string representation via toTimeStr(long, boolean). More...
|
| |
| int | getLast () |
| | Returns the last updated PTS value via set(long, int) w/o System Clock Reference (SCR) interpolation. More...
|
| |
| String | getLastTimeStr (final boolean addFractions) |
| | Returns getLast() as time string representation via toTimeStr(long, boolean). More...
|
| |
| float | getSpeed () |
| | Returns the external playback speed. More...
|
| |
| void | set (final long scr, final int pts) |
| | Updates the PTS value with given System Clock Reference (SCR) in milliseconds. More...
|
| |
| void | setPTS (final int pts) |
| | Sets the PTS value, see set(long, int). More...
|
| |
| void | setSCR (final long currentMillis) |
| | Sets the System Clock Reference (SCR) in milliseconds of last PTS update, see set(long, int). More...
|
| |
| void | set (final PTS other) |
| | Updates the PTS value with values from other PTS instance. More...
|
| |
| int | get (final long currentMillis) |
| | Returns the last updated PTS, interpolated by System Clock Reference (SCR) delta to given currentMillis and playback speed. More...
|
| |
| int | getCurrent () |
| | Returns get(long) passing Clock#currentMillis(). More...
|
| |
| String | getTimeStr (final long currentMillis, final boolean addFractions) |
| | Returns get(long) as time string representation via toTimeStr(long, boolean). More...
|
| |
| int | diffLast (final PTS rhs) |
| | Returns getLast() - rhs. More...
|
| |
| int | diff (final long currentMillis, final PTS rhs) |
| | Returns get(long) - rhs. More...
|
| |
| String | toString () |
| |
| String | toString (final long currentMillis) |
| |
|
| static String | toTimeStr (final long millis, final boolean addFractions) |
| | Returns a time string representation '[HH:]mm:ss[.SSS]', dropping unused hour quantities and fractions of seconds optionally. More...
|
| |
| static String | toTimeStr (final long millis) |
| | Returns a full time string representation 'HH:mm:ss.SSS'. More...
|
| |
| static int | toMillis (final String v, final boolean throwException) |
| | Returns milliseconds from given string representation in '[H[H]:]m[m]:s[s][.S*]'. More...
|
| |
| static int | toMillis (final String v) |
| | Returns milliseconds from given string representation in '[H[H]:]m[m]:s[s][.S*]' or -1 for parsing error. More...
|
| |
Presentation Timestamp (PTS) with added System Clock Reference (SCR) via set(long, int) and its interpolation via get(long), as well as giving raw access via getLast().
The relative millisecond PTS since start of the presentation stored in integer covers a time span of 2'147'483'647 ms (see Integer#MAX_VALUE or 2'147'483 seconds or 24.855 days.
Definition at line 46 of file PTS.java.
◆ PTS() [1/3]
| com.jogamp.common.av.PTS.PTS |
( |
final FloatValue |
speed | ) |
|
◆ PTS() [2/3]
| com.jogamp.common.av.PTS.PTS |
( |
final FloatValue |
speed, |
|
|
final long |
scr, |
|
|
final int |
pts |
|
) |
| |
Create new instance.
- Parameters
-
| speed | external FloatValue getter for playback speed. |
| scr | System Clock Reference (SCR) in milliseconds of taken pts value, i.e. Clock#currentMillis(). |
| pts | the presentation timestamp (PTS) in milliseconds |
- See also
- set(long, int)
Definition at line 74 of file PTS.java.
◆ PTS() [3/3]
| com.jogamp.common.av.PTS.PTS |
( |
final PTS |
other | ) |
|
Copy constructor.
Definition at line 79 of file PTS.java.
◆ diff()
| int com.jogamp.common.av.PTS.diff |
( |
final long |
currentMillis, |
|
|
final PTS |
rhs |
|
) |
| |
◆ diffLast()
| int com.jogamp.common.av.PTS.diffLast |
( |
final PTS |
rhs | ) |
|
◆ get()
| int com.jogamp.common.av.PTS.get |
( |
final long |
currentMillis | ) |
|
◆ getCurrent()
| int com.jogamp.common.av.PTS.getCurrent |
( |
| ) |
|
◆ getLast()
| int com.jogamp.common.av.PTS.getLast |
( |
| ) |
|
Returns the last updated PTS value via set(long, int) w/o System Clock Reference (SCR) interpolation.
Definition at line 97 of file PTS.java.
◆ getLastTimeStr()
| String com.jogamp.common.av.PTS.getLastTimeStr |
( |
final boolean |
addFractions | ) |
|
◆ getSCR()
| long com.jogamp.common.av.PTS.getSCR |
( |
| ) |
|
Returns the System Clock Reference (SCR) in milliseconds of last PTS update via set(long, int).
Definition at line 91 of file PTS.java.
◆ getSCRTimeStr()
| String com.jogamp.common.av.PTS.getSCRTimeStr |
( |
final boolean |
addFractions | ) |
|
◆ getSpeed()
| float com.jogamp.common.av.PTS.getSpeed |
( |
| ) |
|
Returns the external playback speed.
Definition at line 104 of file PTS.java.
◆ getTimeStr()
| String com.jogamp.common.av.PTS.getTimeStr |
( |
final long |
currentMillis, |
|
|
final boolean |
addFractions |
|
) |
| |
◆ isEOS()
| boolean com.jogamp.common.av.PTS.isEOS |
( |
| ) |
|
◆ isValid()
| boolean com.jogamp.common.av.PTS.isValid |
( |
| ) |
|
◆ set() [1/2]
| void com.jogamp.common.av.PTS.set |
( |
final long |
scr, |
|
|
final int |
pts |
|
) |
| |
Updates the PTS value with given System Clock Reference (SCR) in milliseconds.
- Parameters
-
| scr | System Clock Reference (SCR) in milliseconds of taken PTS value, i.e. Clock#currentMillis(). |
| pts | the presentation timestamp (PTS) in milliseconds |
Definition at line 111 of file PTS.java.
◆ set() [2/2]
| void com.jogamp.common.av.PTS.set |
( |
final PTS |
other | ) |
|
◆ setPTS()
| void com.jogamp.common.av.PTS.setPTS |
( |
final int |
pts | ) |
|
◆ setSCR()
| void com.jogamp.common.av.PTS.setSCR |
( |
final long |
currentMillis | ) |
|
◆ toMillis() [1/2]
| static int com.jogamp.common.av.PTS.toMillis |
( |
final String |
v | ) |
|
|
static |
Returns milliseconds from given string representation in '[H[H]:]m[m]:s[s][.S*]' or -1 for parsing error.
Definition at line 232 of file PTS.java.
◆ toMillis() [2/2]
| static int com.jogamp.common.av.PTS.toMillis |
( |
final String |
v, |
|
|
final boolean |
throwException |
|
) |
| |
|
static |
Returns milliseconds from given string representation in '[H[H]:]m[m]:s[s][.S*]'.
- Parameters
-
| v | the timestamp string to parse. |
| throwException | if true, forwards DateTimeParseException to caller, otherwise return -1. |
Definition at line 220 of file PTS.java.
◆ toString() [1/2]
| String com.jogamp.common.av.PTS.toString |
( |
| ) |
|
◆ toString() [2/2]
| String com.jogamp.common.av.PTS.toString |
( |
final long |
currentMillis | ) |
|
◆ toTimeStr() [1/2]
| static String com.jogamp.common.av.PTS.toTimeStr |
( |
final long |
millis | ) |
|
|
static |
Returns a full time string representation 'HH:mm:ss.SSS'.
- Parameters
-
| millis | complete time in milliseconds |
- See also
- toTimeStr(long, boolean)
Definition at line 205 of file PTS.java.
◆ toTimeStr() [2/2]
| static String com.jogamp.common.av.PTS.toTimeStr |
( |
final long |
millis, |
|
|
final boolean |
addFractions |
|
) |
| |
|
static |
Returns a time string representation '[HH:]mm:ss[.SSS]', dropping unused hour quantities and fractions of seconds optionally.
- Parameters
-
| millis | complete time in milliseconds |
| addFractions | toggle for fractions of seconds |
- See also
- toTimeStr(long)
Definition at line 170 of file PTS.java.
The documentation for this class was generated from the following file: