aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java17
1 files changed, 15 insertions, 2 deletions
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 8124ca6ca..f091056c2 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
@@ -43,7 +43,6 @@ import com.jogamp.common.av.TimeFrameI;
import com.jogamp.common.util.IOUtil;
import com.jogamp.common.util.PropertyAccess;
import com.jogamp.common.util.SecurityUtil;
-import com.jogamp.common.util.VersionNumber;
import com.jogamp.gluegen.runtime.ProcAddressTable;
import com.jogamp.opengl.util.GLPixelStorageModes;
import com.jogamp.opengl.util.av.GLMediaPlayer;
@@ -414,6 +413,21 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
}
@Override
+ protected void updateMetadata() {
+ final Chapter[] chapters = new Chapter[natives.getChapterCount0(moviePtr)];
+ for(int i=0; i<chapters.length; ++i) {
+ chapters[i] = new Chapter(natives.getChapterID0(moviePtr, i),
+ natives.getChapterStartPTS0(moviePtr, i), natives.getChapterEndPTS0(moviePtr, i),
+ natives.getChapterTitle0(moviePtr, i));
+ }
+ this.chapters = chapters;
+ }
+ private volatile Chapter[] chapters = new Chapter[0];
+
+ @Override
+ public Chapter[] getChapters() { return chapters; }
+
+ @Override
protected final void initGLImpl(final GL gl) throws IOException, GLException {
if(0==moviePtr) {
throw new GLException("FFMPEG native instance null");
@@ -973,6 +987,5 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
audioSink.enqueueData( audio_pts, sampleData, data_size);
}
}
-
}