From 9e680fe86cd5b64aa758ce32666a6efa19118d3d Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 3 Apr 2012 22:39:27 +0200 Subject: GLMediaPlayer/MovieSimple: Refine API (split setStream(GL, URL) -> initStream(URL) + initGL(GL)) .. IllegalStateException if wrong. Using internet streams of BigBuckBunny, if avail. - Splitting the initialization in stream and GL allows using the stream information (eg: size, ..) for setting the GLDrawable properties .. - Make the impl. more bullet proof .. --- src/jogl/classes/jogamp/opengl/omx/OMXGLMediaPlayer.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/omx/OMXGLMediaPlayer.java') diff --git a/src/jogl/classes/jogamp/opengl/omx/OMXGLMediaPlayer.java b/src/jogl/classes/jogamp/opengl/omx/OMXGLMediaPlayer.java index 23eadcd27..1005abd80 100644 --- a/src/jogl/classes/jogamp/opengl/omx/OMXGLMediaPlayer.java +++ b/src/jogl/classes/jogamp/opengl/omx/OMXGLMediaPlayer.java @@ -65,7 +65,7 @@ public class OMXGLMediaPlayer extends EGLMediaPlayerImpl { } @Override - protected void setStreamImplPreGL() throws IOException { + protected void initStreamImplPreGL() throws IOException { if(0==moviePtr) { throw new GLException("OMX native instance null"); } @@ -95,11 +95,6 @@ public class OMXGLMediaPlayer extends EGLMediaPlayerImpl { System.out.println("setURL: p2 "+this); } - @Override - protected void setStreamImplPostGL() throws IOException { - - } - @Override public synchronized long getCurrentPosition() { if(0==moviePtr) { @@ -108,11 +103,6 @@ public class OMXGLMediaPlayer extends EGLMediaPlayerImpl { return _getCurrentPosition(moviePtr); } - @Override - public synchronized boolean isValid() { - return (moviePtr != 0); - } - @Override public synchronized void setPlaySpeed(float rate) { if(0==moviePtr) { @@ -153,7 +143,7 @@ public class OMXGLMediaPlayer extends EGLMediaPlayerImpl { /** @return time position after issuing the command */ @Override - public synchronized long seek(long msec) { + protected long seekImpl(long msec) { if(0==moviePtr) { throw new GLException("OMX native instance null"); } -- cgit v1.2.3