Top Description Fields Constructors Methods
com.jogamp.opengl.util

public Class TimeFrameI

extends Object
Class Inheritance
Known Direct Subclasses
com.jogamp.opengl.util.av.AudioSink.AudioFrame, com.jogamp.opengl.util.texture.TextureSequence.TextureFrame

Integer time frame in milliseconds, maybe specialized for texture/video, audio, .. animated content.

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.

Field Summary

Modifier and TypeField 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

Constructor Summary

AccessConstructor and Description
public
public
TimeFrameI(final int pts, final int duration)

Method Summary

Modifier and TypeMethod and Description
public final int
getDuration()

Get this frame's duration in milliseconds.

public final int
getPTS()

Get this frame's presentation timestamp (PTS) in milliseconds.

public final void
setDuration(final int duration)

Set this frame's duration in milliseconds.

public final void
setPTS(final int pts)

Set this frame's presentation timestamp (PTS) in milliseconds.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

durationback to summary
protected int duration
END_OF_STREAM_PTSback 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_PTSback to summary
public static final int INVALID_PTS

Constant marking an invalid PTS, i.e. Integer.MIN_VALUE == 0x80000000 == . Sync w/ native code.

ptsback to summary
protected int pts

Constructor Detail

TimeFrameIback to summary
public TimeFrameI()
TimeFrameIback to summary
public TimeFrameI(final int pts, final int duration)

Method Detail

getDurationback to summary
public final int getDuration()

Get this frame's duration in milliseconds.

getPTSback to summary
public final int getPTS()

Get this frame's presentation timestamp (PTS) in milliseconds.

setDurationback to summary
public final void setDuration(final int duration)

Set this frame's duration in milliseconds.

setPTSback to summary
public final void setPTS(final int pts)

Set this frame's presentation timestamp (PTS) in milliseconds.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override