aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos/com/jogamp
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-01-31 11:36:38 +0100
committerSven Göthel <[email protected]>2024-01-31 11:36:38 +0100
commitf93b6c570b94beab1656f0024bdc06a22b2431d6 (patch)
treed3823936226e022a1bfd92c506d030ad0785ca65 /src/demos/com/jogamp
parentb8b692e9cf3120d788ae912514f54948ddccacf5 (diff)
Utilize PTS.getCurrent() where applicable
Diffstat (limited to 'src/demos/com/jogamp')
-rw-r--r--src/demos/com/jogamp/opengl/demos/av/MovieCube.java4
-rw-r--r--src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java6
-rw-r--r--src/demos/com/jogamp/opengl/demos/av/MovieSimple.java4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/av/MovieCube.java b/src/demos/com/jogamp/opengl/demos/av/MovieCube.java
index 4add48503..a7b02d5c1 100644
--- a/src/demos/com/jogamp/opengl/demos/av/MovieCube.java
+++ b/src/demos/com/jogamp/opengl/demos/av/MovieCube.java
@@ -210,7 +210,7 @@ public class MovieCube implements GLEventListener {
final GLAnimatorControl anim = drawable.getAnimator();
final float lfps = null != anim ? anim.getLastFPS() : 0f;
final float tfps = null != anim ? anim.getTotalFPS() : 0f;
- final float pts = mPlayer.getPTS().get(Clock.currentMillis()) / 1000f;
+ final float pts = mPlayer.getPTS().getCurrent() / 1000f;
// Note: MODELVIEW is from [ -1 .. 1 ]
@@ -291,7 +291,7 @@ public class MovieCube implements GLEventListener {
return;
}
System.err.println("MC "+e);
- final int pts0 = mPlayer.getPTS().get(Clock.currentMillis());
+ final int pts0 = mPlayer.getPTS().getCurrent();
int pts1 = 0;
switch(e.getKeySymbol()) {
diff --git a/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java b/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java
index 8b0c0daac..576b271f2 100644
--- a/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java
+++ b/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java
@@ -171,7 +171,7 @@ public class MovieSBSStereo implements StereoGLEventListener {
final GLAnimatorControl anim = drawable.getAnimator();
final float lfps = null != anim ? anim.getLastFPS() : 0f;
final float tfps = null != anim ? anim.getTotalFPS() : 0f;
- final float pts = mPlayer.getPTS().get(Clock.currentMillis()) / 1000f;
+ final float pts = mPlayer.getPTS().getCurrent() / 1000f;
// Note: MODELVIEW is from [ 0 .. height ]
@@ -238,7 +238,7 @@ public class MovieSBSStereo implements StereoGLEventListener {
if(y>surfHeight/2) {
final float dp = (float)(x-prevMouseX)/(float)surfWidth;
- final int pts0 = mPlayer.getPTS().get(Clock.currentMillis());
+ final int pts0 = mPlayer.getPTS().getCurrent();
mPlayer.seek(pts0 + (int) (mPlayer.getDuration() * dp));
} else {
mPlayer.resume();
@@ -264,7 +264,7 @@ public class MovieSBSStereo implements StereoGLEventListener {
return;
}
System.err.println("MC "+e);
- final int pts0 = mPlayer.getPTS().get(Clock.currentMillis());
+ final int pts0 = mPlayer.getPTS().getCurrent();
int pts1 = 0;
switch(e.getKeySymbol()) {
case KeyEvent.VK_O: displayOSD = !displayOSD; break;
diff --git a/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java b/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java
index 42714b65c..b553210f5 100644
--- a/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java
+++ b/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java
@@ -259,7 +259,7 @@ public class MovieSimple implements GLEventListener {
if(y>surfHeight/2) {
final float dp = (float)(x-prevMouseX)/(float)surfWidth;
- final int pts0 = mPlayer.getPTS().get(Clock.currentMillis());
+ final int pts0 = mPlayer.getPTS().getCurrent();
mPlayer.seek(pts0 + (int) (mPlayer.getDuration() * dp));
} else {
mPlayer.resume();
@@ -291,7 +291,7 @@ public class MovieSimple implements GLEventListener {
return;
}
System.err.println("MC "+e);
- final int pts0 = mPlayer.getPTS().get(Clock.currentMillis());
+ final int pts0 = mPlayer.getPTS().getCurrent();
int pts1 = 0;
switch(e.getKeySymbol()) {
case KeyEvent.VK_V: {