From 2cb284545a2a0fd35762a104fee8107234808389 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 17 Aug 2013 01:30:25 +0200 Subject: GLMediaPlayer: Use URI instead of URL / Misc refinements - GLMediaPlayer: Use URI instead of URL, allowing passing a non resolved location - Java's URL doesn't allow 'other' protocols, i.e. RTSP - GLMediaPlayer: Add Table of test streams and their location .. - FFMPEGMediaPlayer - Handle av_read_play/pause response on java side, ignore error - simply dump in DEBUG_NATIVE mode --- .../jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/android/av') diff --git a/src/jogl/classes/jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java b/src/jogl/classes/jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java index 86e6bc121..f87df950c 100644 --- a/src/jogl/classes/jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java +++ b/src/jogl/classes/jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java @@ -187,15 +187,15 @@ public class AndroidGLMediaPlayerAPI14 extends GLMediaPlayerImpl { @Override protected final void initGLStreamImpl(GL gl, int vid, int aid) throws IOException { - if(null!=mp && null!=urlConn) { + if(null!=mp && null!=streamLoc) { if( GLMediaPlayer.STREAM_ID_NONE == aid ) { mp.setVolume(0f, 0f); // FIXME: Disable audio handling } // else FIXME: Select aid ! // Note: Both FIXMEs seem to be n/a via Android's MediaPlayer -> Switch to API level 16 MediaCodec/MediaExtractor .. try { - final Uri uri = Uri.parse(urlConn.getURL().toExternalForm()); - mp.setDataSource(StaticContext.getContext(), uri); + final Uri _uri = Uri.parse(streamLoc.toString()); + mp.setDataSource(StaticContext.getContext(), _uri); } catch (IllegalArgumentException e) { throw new RuntimeException(e); } catch (SecurityException e) { @@ -210,7 +210,7 @@ public class AndroidGLMediaPlayerAPI14 extends GLMediaPlayerImpl { try { mp.prepare(); } catch (IOException ioe) { - throw new IOException("MediaPlayer failed to process stream <"+urlConn.getURL().toExternalForm()+">: "+ioe.getMessage(), ioe); + throw new IOException("MediaPlayer failed to process stream <"+streamLoc.toString()+">: "+ioe.getMessage(), ioe); } final int r_aid = GLMediaPlayer.STREAM_ID_NONE == aid ? GLMediaPlayer.STREAM_ID_NONE : GLMediaPlayer.STREAM_ID_AUTO; final String icodec = "android"; -- cgit v1.2.3