aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
index 191b96e56..6eab3fd6f 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
@@ -285,6 +285,8 @@ public interface GLMediaPlayer extends TextureSequence {
public Chapter(final int i, final int s, final int e, final String t) {
id = i; start = s; end = e; title = t;
}
+ /** Returns chapter duration, i.e. {@code end - start + 1}. */
+ public int duration() { return end - start + 1; }
@Override
public String toString() {
return String.format("%02d: [%s .. %s] %s", id, PTS.toTimeStr(start), PTS.toTimeStr(end), title);