aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-26 03:00:36 +0100
committerSven Gothel <[email protected]>2014-01-26 03:00:36 +0100
commit323476249dd94e605b6627582ad0dbcaede0159e (patch)
tree6aa545dfda4e419388f33613337b00e8c219222d /src/jogl/classes/com/jogamp/opengl/util
parent87135467c4f292f7e43bc3957784b0e43769c9cc (diff)
GLMediaPlayer: Add user attached objects, similar to GLContext - Allowing GLMediaEventListener impl. to access GLMediaPlayer associated objects
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java20
1 files changed, 19 insertions, 1 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 22a5cfb32..9957f2093 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
@@ -391,7 +391,7 @@ public interface GLMediaPlayer extends TextureSequence {
public AudioSink getAudioSink();
/**
- * Releases the GL and stream resources.
+ * Releases the GL, stream and other resources, including {@link #attachObject(String, Object) attached user objects}.
* <p>
* <a href="#lifecycle">Lifecycle</a>: <code>ANY</code> -> {@link State#Uninitialized}
* </p>
@@ -626,4 +626,22 @@ public interface GLMediaPlayer extends TextureSequence {
/** Return all {@link GLMediaEventListener} of this player. */
public GLMediaEventListener[] getEventListeners();
+
+ /**
+ * Returns the attached user object for the given name.
+ */
+ public Object getAttachedObject(String name);
+
+ /**
+ * Attaches the user object for the given name.
+ * Returns the previously set object, may be null.
+ */
+ public Object attachObject(String name, Object obj);
+
+ /**
+ * Detaches the user object for the given name.
+ * Returns the previously set object, may be null.
+ */
+ public Object detachObject(String name);
+
}