diff options
author | Sven Göthel <[email protected]> | 2024-01-31 11:36:38 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-31 11:36:38 +0100 |
commit | f93b6c570b94beab1656f0024bdc06a22b2431d6 (patch) | |
tree | d3823936226e022a1bfd92c506d030ad0785ca65 /src/graphui/classes/com/jogamp/graph/ui/widgets | |
parent | b8b692e9cf3120d788ae912514f54948ddccacf5 (diff) |
Utilize PTS.getCurrent() where applicable
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/widgets')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java | 10 |
1 files changed, 5 insertions, 5 deletions
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); |