diff options
author | Sven Göthel <[email protected]> | 2024-01-27 07:58:44 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-27 07:58:44 +0100 |
commit | b2bd320e2b688097f0d5171eb6e89e985909c7b7 (patch) | |
tree | 43a5d38fa41137c550a08de71e8bb8a06b43ff4e /src/graphui/classes/com/jogamp | |
parent | 0b908ee7fc80344118d3fa6d4d92ebb082968cb3 (diff) |
GLMediaPlayer: Support tile metadata
Diffstat (limited to 'src/graphui/classes/com/jogamp')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java | 20 |
1 files changed, 3 insertions, 17 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 283e566f5..14d438abc 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java +++ b/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java @@ -618,22 +618,8 @@ public class MediaPlayer extends Widget { return getInfo(mPlayer.getPTS().get(currentMillis), mPlayer.getDuration(), mPlayer, full); } public static String getInfo(final int ptsMS, final int durationMS, final GLMediaPlayer mPlayer, final boolean full) { - final String name, chapter; + final String chapter; { - final String basename; - final String s = mPlayer.getUri().path.decode(); - final int li = s.lastIndexOf('/'); - if( 0 < li ) { - basename = s.substring(li+1); - } else { - basename = s; - } - final int di = basename.lastIndexOf('.'); - if( 0 < di ) { - name = basename.substring(0, di); - } else { - name = basename; - } final GLMediaPlayer.Chapter c = mPlayer.getChapter(ptsMS); if( null != c ) { chapter = " - "+c.title; @@ -652,7 +638,7 @@ public class MediaPlayer extends Widget { mPlayer.getSID(), mPlayer.getLang(mPlayer.getSID()) ); final String text3 = String.format("video: id %d, kbps %d, codec %s", mPlayer.getVID(), mPlayer.getVideoBitrate()/1000, mPlayer.getVideoCodec()); - return text1+"\n"+text2+"\n"+text3+"\n"+name+chapter; + return text1+"\n"+text2+"\n"+text3+"\n"+mPlayer.getTitle()+chapter; } else { final String vinfo, ainfo, sinfo; if( mPlayer.getVID() != GLMediaPlayer.STREAM_ID_NONE ) { @@ -673,7 +659,7 @@ public class MediaPlayer extends Widget { final String text1 = String.format("%s / %s (%.0f %%), %s (%01.2fx, vol %1.2f), A/R %.2f%s%s%s", PTS.millisToTimeStr(ptsMS, false), PTS.millisToTimeStr(durationMS, false), pct*100, mPlayer.getState().toString().toLowerCase(), mPlayer.getPlaySpeed(), mPlayer.getAudioVolume(), aspect, vinfo, ainfo, sinfo); - return text1+"\n"+name+chapter; + return text1+"\n"+mPlayer.getTitle()+chapter; } } public static String getMultilineTime(final long currentMillis, final GLMediaPlayer mPlayer) { |