diff options
author | Sven Gothel <[email protected]> | 2023-05-21 16:51:52 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-05-21 16:51:52 +0200 |
commit | 3e8894de1b26caf93e7d7b395aff332a3c522d65 (patch) | |
tree | 66eeebbf5772fc588bf558f62af4c8a53733e725 /src/jogl/classes/jogamp/opengl/util | |
parent | 07da0949aae6d13c7cca12bc4728e98b161dbf42 (diff) |
*MediaPlayer: Adop to JOAL 39a32fd56de313c31bd197ee6022288e97f9729a
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java | 6 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java index e9a154bbb..9e390319a 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java +++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java @@ -1698,7 +1698,11 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { final String audioSinkInfo; final AudioSink audioSink = getAudioSink(); if( null != audioSink ) { - audioSinkInfo = "AudioSink[frames [p "+audioSink.getEnqueuedFrameCount()+", q "+audioSink.getQueuedFrameCount()+", f "+audioSink.getFreeFrameCount()+", c "+audioSink.getFrameCount()+"], time "+audioSink.getQueuedTime()+", bytes "+audioSink.getQueuedByteCount()+"]"; + audioSinkInfo = String.format("AudioSink[frames [p %d, q %d, f %d, c %d], dur %.1f ms, bytes %d]", + audioSink.getEnqueuedFrameCount(), audioSink.getQueuedFrameCount(), + audioSink.getFreeFrameCount(), audioSink.getFrameCount(), 1000f*audioSink.getQueuedTime(), + audioSink.getQueuedByteCount() + ); } else { audioSinkInfo = ""; } diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java index 25ef6fd8a..d6bbbdc5d 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java @@ -432,7 +432,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl { } else { final int frameDuration; if( audioSamplesPerFrameAndChannel > 0 ) { - frameDuration = avChosenAudioFormat.getSamplesDuration(audioSamplesPerFrameAndChannel); + frameDuration = Math.round( 1000f * avChosenAudioFormat.getSamplesDuration(audioSamplesPerFrameAndChannel) ); } else { frameDuration = AudioSink.DefaultFrameDuration; } |