aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/shapes/MediaButton.java2
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java10
5 files changed, 13 insertions, 13 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: {
diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/MediaButton.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/MediaButton.java
index 2f8486068..fc0a6e0b2 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/shapes/MediaButton.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/MediaButton.java
@@ -251,7 +251,7 @@ public class MediaButton extends TexSeqButton {
private static final int SUB_MIN_DURATION = 5; // min duration 1s, broken ASS have <= 3ms
private final void drawSubtitle(final GL2ES2 gl, final RegionRenderer renderer) {
final GLMediaPlayer mPlayer = (GLMediaPlayer)texSeq;
- final int pts = mPlayer.getPTS().get(Clock.currentMillis());
+ final int pts = mPlayer.getPTS().getCurrent();
// Validate draw_lastASS timeout
ASSEventLine lastASS = draw_lastASS;
diff --git a/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java b/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java
index 1c62bde9c..d06020eba 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java
@@ -278,7 +278,7 @@ public class MediaPlayer extends Widget {
final long t1 = anim.getTotalFPSDuration();
if( t1 - t0 >= 333) {
t0 = t1;
- final int ptsMS = mPlayer.getPTS().get(Clock.currentMillis());
+ final int ptsMS = mPlayer.getPTS().getCurrent();
final int durationMS = mPlayer.getDuration();
infoLabel.setText(getInfo(ptsMS, durationMS, mPlayer, info_full[0]));
timeLabel.setText(getMultilineTime(ptsMS, durationMS));
@@ -379,12 +379,12 @@ public class MediaPlayer extends Widget {
button.setName("rew5");
button.setSpacing(SymSpacing, FixedSymSize).setPerp().setColor(CtrlCellCol);
button.onClicked((final Shape s) -> {
- mPlayer.seek(mPlayer.getPTS().get(Clock.currentMillis()) - 5000);
+ mPlayer.seek(mPlayer.getPTS().getCurrent() - 5000);
});
button.addMouseListener(new Shape.MouseGestureAdapter() {
@Override
public void mouseWheelMoved(final MouseEvent e) {
- final int pts0 = mPlayer.getPTS().get(Clock.currentMillis());
+ final int pts0 = mPlayer.getPTS().getCurrent();
final int pts1 = pts0 + (int)(e.getRotation()[1]*1000f);
if( DEBUG ) {
System.err.println("Seek: "+pts0+" -> "+pts1);
@@ -400,12 +400,12 @@ public class MediaPlayer extends Widget {
button.setName("fwd5");
button.setSpacing(SymSpacing, FixedSymSize).setPerp().setColor(CtrlCellCol);
button.onClicked((final Shape s) -> {
- mPlayer.seek(mPlayer.getPTS().get(Clock.currentMillis()) + 5000);
+ mPlayer.seek(mPlayer.getPTS().getCurrent() + 5000);
});
button.addMouseListener(new Shape.MouseGestureAdapter() {
@Override
public void mouseWheelMoved(final MouseEvent e) {
- final int pts0 = mPlayer.getPTS().get(Clock.currentMillis());
+ final int pts0 = mPlayer.getPTS().getCurrent();
final int pts1 = pts0 + (int)(e.getRotation()[1]*1000f);
if( DEBUG ) {
System.err.println("Seek: "+pts0+" -> "+pts1);