GlueGen: com.jogamp.common.av.TimeFrameI Class Reference

GlueGen v2.6.0-rc-20250822 GlueGen, Native Binding Generator for Java™ (public API).

Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
com.jogamp.common.av.TimeFrameI Class Reference

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

Inheritance diagram for com.jogamp.common.av.TimeFrameI:
Collaboration diagram for com.jogamp.common.av.TimeFrameI:

## Public Member Functions

| TimeFrameI ()
| Ctor w/ zero duration and `INVALID_PTS`. More...
| TimeFrameI (final int pts, final int duration)
| Create a new instance. More...
final int | getPTS ()
| Returns this frame's presentation timestamp (PTS) in milliseconds. More...
final void | setPTS (final int pts)
| Set this frame's presentation timestamp (PTS) in milliseconds. More...
final int | getDuration ()
| Get this frame's duration in milliseconds. More...
final void | setDuration (final int duration)
| Set this frame's duration in milliseconds. More...
String | toString ()

## Static Public Attributes

static final int | INVALID_PTS = 0x80000000
| Constant marking an invalid PTS, i.e. More...
static final int | END_OF_STREAM_PTS = 0x7FFFFFFF
| Constant marking the end of the stream PTS, i.e. More...

## Protected Attributes

int | pts
int | duration

## Detailed Description

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, see `getPTS()` and `getDuration()`.

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.

Definition at line 49 of file TimeFrameI.java.

## Constructor & Destructor Documentation

## ◆ TimeFrameI() [1/2]

com.jogamp.common.av.TimeFrameI.TimeFrameI | ( |  | ) |

Ctor w/ zero duration and `INVALID_PTS`.

Definition at line 62 of file TimeFrameI.java.

## ◆ TimeFrameI() [2/2]

com.jogamp.common.av.TimeFrameI.TimeFrameI | ( | final int | pts,
|  | final int | duration
| ) |  |

Create a new instance.

Parameters

  pts | frame pts in milliseconds, see `getPTS()`
  duration | frame duration in milliseconds, see `getDuration()`

See also
  getPTS()
  getDuration()

Definition at line 73 of file TimeFrameI.java.

## Member Function Documentation

## ◆ getDuration()

final int com.jogamp.common.av.TimeFrameI.getDuration | ( |  | ) |

Get this frame's duration in milliseconds.

The duration stored in integer covers 2'147'483'647 ms (see `Integer#MAX_VALUE` or 2'147'483 seconds or 24.855 days.

Definition at line 99 of file TimeFrameI.java.

## ◆ getPTS()

final int com.jogamp.common.av.TimeFrameI.getPTS | ( |  | ) |

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

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 86 of file TimeFrameI.java.

## ◆ setDuration()

final void com.jogamp.common.av.TimeFrameI.setDuration | ( | final int | duration | ) |

Set this frame's duration in milliseconds.

See also
  getDuration()

Definition at line 104 of file TimeFrameI.java.

## ◆ setPTS()

final void com.jogamp.common.av.TimeFrameI.setPTS | ( | final int | pts | ) |

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

See also
  getPTS()

Definition at line 91 of file TimeFrameI.java.

## ◆ toString()

String com.jogamp.common.av.TimeFrameI.toString | ( |  | ) |

Reimplemented in com.jogamp.common.av.AudioSink.AudioFrame, and com.jogamp.common.av.AudioSink.AudioDataFrame.

Definition at line 107 of file TimeFrameI.java.

## Member Data Documentation

## ◆ duration

int com.jogamp.common.av.TimeFrameI.duration

protected

Definition at line 57 of file TimeFrameI.java.

## ◆ END_OF_STREAM_PTS

final int com.jogamp.common.av.TimeFrameI.END_OF_STREAM_PTS = 0x7FFFFFFF

static

Constant marking the end of the stream PTS, i.e.

Integer.MIN_VALUE - 1 == 0x7FFFFFFF == {@value}. Sync w/ native code.

Definition at line 54 of file TimeFrameI.java.

## ◆ INVALID_PTS

final int com.jogamp.common.av.TimeFrameI.INVALID_PTS = 0x80000000

static

Constant marking an invalid PTS, i.e.

Integer.MIN_VALUE == 0x80000000 == {@value}. Sync w/ native code.

Definition at line 51 of file TimeFrameI.java.

## ◆ pts

int com.jogamp.common.av.TimeFrameI.pts

protected

Definition at line 56 of file TimeFrameI.java.

The documentation for this class was generated from the following file:

- src/java/com/jogamp/common/av/TimeFrameI.java