Type and value range has been chosen to suit embedded CPUs
and characteristics of audio / video streaming and animations.
Milliseconds of type integer with a maximum value of Integer#MAX_VALUE
will allow tracking time up 2,147,483.647 seconds or
24 days 20 hours 31 minutes and 23 seconds.
Milliseconds granularity is also more than enough to deal with A-V synchronization, where the threshold usually lies within 22ms.
Milliseconds granularity for displaying video frames might seem inaccurate for each single frame, i.e. 60Hz != 16ms, however, accumulated values diminish this error and vertical sync is achieved by build-in V-Sync of the video drivers.
| Modifier and Type | Field and Description |
|---|---|
| protected int | |
| public static final int | END_OF_STREAM_PTS
Constant marking the end of the stream PTS, i.e. Integer.MIN_VALUE - 1 == 0x7FFFFFFF == . |
| public static final int | INVALID_PTS
Constant marking an invalid PTS, i.e. Integer.MIN_VALUE == 0x80000000 == . |
| protected int |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final int | |
| public final int | |
| public final void | |
| public final void | |
| public String |
| duration | back to summary |
|---|---|
| protected int duration | |
| END_OF_STREAM_PTS | back to summary |
|---|---|
| public static final int END_OF_STREAM_PTS Constant marking the end of the stream PTS, i.e. Integer.MIN_VALUE - 1 == 0x7FFFFFFF == . Sync w/ native code. | |
| INVALID_PTS | back to summary |
|---|---|
| public static final int INVALID_PTS Constant marking an invalid PTS, i.e. Integer.MIN_VALUE == 0x80000000 == . Sync w/ native code. | |
| pts | back to summary |
|---|---|
| protected int pts | |
| TimeFrameI | back to summary |
|---|---|
| public TimeFrameI() | |
| TimeFrameI | back to summary |
|---|---|
| public TimeFrameI(final int pts, final int duration) | |
| getDuration | back to summary |
|---|---|
| public final int getDuration() Get this frame's duration in milliseconds. | |
| getPTS | back to summary |
|---|---|
| public final int getPTS() Get this frame's presentation timestamp (PTS) in milliseconds. | |
| setDuration | back to summary |
|---|---|
| public final void setDuration(final int duration) Set this frame's duration in milliseconds. | |
| setPTS | back to summary |
|---|---|
| public final void setPTS(final int pts) Set this frame's presentation timestamp (PTS) in milliseconds. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |