public class TimeFrameI extends Object
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 |
---|---|
static int |
END_OF_STREAM_PTS
Constant marking the end of the stream PTS, i.e.
|
static int |
INVALID_PTS
Constant marking an invalid PTS, i.e.
|
Constructor and Description |
---|
TimeFrameI() |
TimeFrameI(int pts,
int duration) |
Modifier and Type | Method and Description |
---|---|
int |
getDuration()
Get this frame's duration in milliseconds.
|
int |
getPTS()
Get this frame's presentation timestamp (PTS) in milliseconds.
|
void |
setDuration(int duration)
Set this frame's duration in milliseconds.
|
void |
setPTS(int pts)
Set this frame's presentation timestamp (PTS) in milliseconds.
|
String |
toString() |
public static final int INVALID_PTS
public static final int END_OF_STREAM_PTS
public TimeFrameI()
public TimeFrameI(int pts, int duration)
public final int getPTS()
public final void setPTS(int pts)
public final int getDuration()
public final void setDuration(int duration)
Copyright 2010 JogAmp Community.