From 1bdc495c19d3c8798a56d8476247084f0c870b48 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 8 Sep 2014 13:53:25 +0200 Subject: Bug 1063: Uri adoption - ShaderCode: - Using Uri - Also encode the rel. 'includeFile' (was missing earlier) - GLMediaPlayer - Exposes Uri in API, removed URI --- .../opengl/test/android/MovieCubeActivity0a.java | 13 ++++++----- .../opengl/test/android/MovieCubeActivity0b.java | 13 ++++++----- .../opengl/test/android/MovieSimpleActivity0.java | 13 ++++++----- .../opengl/test/android/MovieSimpleActivity1.java | 18 ++++++++-------- .../junit/graph/demos/GPUUISceneGLListener0A.java | 4 ++-- .../junit/jogl/demos/es2/av/CrossFadePlayer.java | 4 ++-- .../test/junit/jogl/demos/es2/av/MovieCube.java | 19 ++++++++-------- .../junit/jogl/demos/es2/av/MovieSBSStereo.java | 12 +++++------ .../test/junit/jogl/demos/es2/av/MovieSimple.java | 25 +++++++++++----------- .../test/junit/jogl/stereo/StereoDemo01.java | 11 +++++----- 10 files changed, 63 insertions(+), 69 deletions(-) (limited to 'src/test') diff --git a/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0a.java b/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0a.java index 79b6952ee..66959e90f 100644 --- a/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0a.java +++ b/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0a.java @@ -29,7 +29,6 @@ package com.jogamp.opengl.test.android; import java.io.IOException; import java.net.HttpURLConnection; -import java.net.URI; import java.net.URISyntaxException; import java.net.URLConnection; import java.util.Arrays; @@ -39,12 +38,12 @@ import javax.media.opengl.GLProfile; import jogamp.newt.driver.android.NewtBaseActivity; +import com.jogamp.common.net.Uri; import com.jogamp.common.util.IOUtil; import com.jogamp.newt.NewtFactory; import com.jogamp.newt.event.MouseAdapter; import com.jogamp.newt.event.MouseEvent; import com.jogamp.newt.opengl.GLWindow; - import com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube; import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.util.av.GLMediaPlayer; @@ -75,7 +74,7 @@ public class MovieCubeActivity0a extends NewtBaseActivity { System.getProperty("jnlp.media0_url0"), System.getProperty("jnlp.media0_url1"), System.getProperty("jnlp.media0_url2") }; - final URI streamLoc = getURI(streamLocs, 0, false); + final Uri streamLoc = getUri(streamLocs, 0, false); if(null == streamLoc) { throw new RuntimeException("no media reachable: "+Arrays.asList(streamLocs)); } // also initializes JOGL @@ -136,15 +135,15 @@ public class MovieCubeActivity0a extends NewtBaseActivity { Log.d(TAG, "onCreate - X"); } - static URI getURI(final String path[], final int off, final boolean checkAvail) { - URI uri = null; + static Uri getUri(final String path[], final int off, final boolean checkAvail) { + Uri uri = null; for(int i=off; null==uri && i0) { if( checkAvail ) { final URLConnection uc = IOUtil.getResource(path[i], null); if( null != uc ) { try { - uri = uc.getURL().toURI(); + uri = Uri.valueOf(uc.getURL()); } catch (final URISyntaxException e) { uri = null; } @@ -154,7 +153,7 @@ public class MovieCubeActivity0a extends NewtBaseActivity { } } else { try { - uri = new URI(path[i]); + uri = Uri.cast(path[i]); } catch (final URISyntaxException e) { uri = null; } diff --git a/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0b.java b/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0b.java index 5303276a6..33dbe8fc5 100644 --- a/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0b.java +++ b/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0b.java @@ -29,7 +29,6 @@ package com.jogamp.opengl.test.android; import java.io.IOException; import java.net.HttpURLConnection; -import java.net.URI; import java.net.URISyntaxException; import java.net.URLConnection; import java.util.Arrays; @@ -39,12 +38,12 @@ import javax.media.opengl.GLProfile; import jogamp.newt.driver.android.NewtBaseActivity; +import com.jogamp.common.net.Uri; import com.jogamp.common.util.IOUtil; import com.jogamp.newt.NewtFactory; import com.jogamp.newt.event.MouseAdapter; import com.jogamp.newt.event.MouseEvent; import com.jogamp.newt.opengl.GLWindow; - import com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube; import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.util.av.GLMediaPlayer; @@ -75,7 +74,7 @@ public class MovieCubeActivity0b extends NewtBaseActivity { System.getProperty("jnlp.media0_url0"), System.getProperty("jnlp.media0_url1"), System.getProperty("jnlp.media0_url2") }; - final URI streamLoc = getURI(streamLocs, 0, false); + final Uri streamLoc = getUri(streamLocs, 0, false); if(null == streamLoc) { throw new RuntimeException("no media reachable: "+Arrays.asList(streamLocs)); } // also initializes JOGL @@ -138,15 +137,15 @@ public class MovieCubeActivity0b extends NewtBaseActivity { Log.d(TAG, "onCreate - X"); } - static URI getURI(final String path[], final int off, final boolean checkAvail) { - URI uri = null; + static Uri getUri(final String path[], final int off, final boolean checkAvail) { + Uri uri = null; for(int i=off; null==uri && i0) { if( checkAvail ) { final URLConnection uc = IOUtil.getResource(path[i], null); if( null != uc ) { try { - uri = uc.getURL().toURI(); + uri = Uri.valueOf(uc.getURL()); } catch (final URISyntaxException e) { uri = null; } @@ -156,7 +155,7 @@ public class MovieCubeActivity0b extends NewtBaseActivity { } } else { try { - uri = new URI(path[i]); + uri = Uri.cast(path[i]); } catch (final URISyntaxException e) { uri = null; } diff --git a/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity0.java b/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity0.java index 47e1b1796..5991e28ee 100644 --- a/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity0.java +++ b/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity0.java @@ -28,7 +28,6 @@ package com.jogamp.opengl.test.android; import java.net.HttpURLConnection; -import java.net.URI; import java.net.URISyntaxException; import java.net.URLConnection; import java.util.Arrays; @@ -38,13 +37,13 @@ import javax.media.opengl.GLProfile; import jogamp.newt.driver.android.NewtBaseActivity; +import com.jogamp.common.net.Uri; import com.jogamp.common.util.IOUtil; import com.jogamp.newt.NewtFactory; import com.jogamp.newt.Window; import com.jogamp.newt.event.MouseAdapter; import com.jogamp.newt.event.MouseEvent; import com.jogamp.newt.opengl.GLWindow; - import com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple; import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.util.av.GLMediaPlayer; @@ -74,7 +73,7 @@ public class MovieSimpleActivity0 extends NewtBaseActivity { System.getProperty("jnlp.media0_url0"), System.getProperty("jnlp.media0_url1"), System.getProperty("jnlp.media0_url2") }; - final URI streamLoc = getURI(streamLocs, 0, false); + final Uri streamLoc = getUri(streamLocs, 0, false); if(null == streamLoc) { throw new RuntimeException("no media reachable: "+Arrays.asList(streamLocs)); } // also initializes JOGL @@ -129,15 +128,15 @@ public class MovieSimpleActivity0 extends NewtBaseActivity { Log.d(TAG, "onCreate - X"); } - static URI getURI(final String path[], final int off, final boolean checkAvail) { - URI uri = null; + static Uri getUri(final String path[], final int off, final boolean checkAvail) { + Uri uri = null; for(int i=off; null==uri && i0) { if( checkAvail ) { final URLConnection uc = IOUtil.getResource(path[i], null); if( null != uc ) { try { - uri = uc.getURL().toURI(); + uri = Uri.valueOf(uc.getURL()); } catch (final URISyntaxException e) { uri = null; } @@ -147,7 +146,7 @@ public class MovieSimpleActivity0 extends NewtBaseActivity { } } else { try { - uri = new URI(path[i]); + uri = Uri.cast(path[i]); } catch (final URISyntaxException e) { uri = null; } diff --git a/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java b/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java index 7c99e2cf3..0267db514 100644 --- a/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java +++ b/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java @@ -28,7 +28,6 @@ package com.jogamp.opengl.test.android; import java.net.HttpURLConnection; -import java.net.URI; import java.net.URISyntaxException; import java.net.URLConnection; import java.util.Arrays; @@ -41,6 +40,7 @@ import javax.media.opengl.GLRunnable; import jogamp.newt.driver.android.NewtBaseActivity; +import com.jogamp.common.net.Uri; import com.jogamp.common.util.IOUtil; import com.jogamp.newt.NewtFactory; import com.jogamp.newt.Window; @@ -82,15 +82,15 @@ public class MovieSimpleActivity1 extends NewtBaseActivity { System.getProperty("jnlp.media0_url0"), System.getProperty("jnlp.media0_url1"), System.getProperty("jnlp.media0_url2") }; - final URI streamLoc0 = getURI(streamLocs, 2, false); + final Uri streamLoc0 = getUri(streamLocs, 2, false); if(null == streamLoc0) { throw new RuntimeException("no media reachable: "+Arrays.asList(streamLocs)); } - final URI streamLoc1; + final Uri streamLoc1; { - URI _streamLoc1 = null; + Uri _streamLoc1 = null; if(mPlayerHUD && !mPlayerSharedHUD) { final String[] urls1 = new String[] { System.getProperty("jnlp.media1_url0") }; - _streamLoc1 = getURI(urls1, 1, false); + _streamLoc1 = getUri(urls1, 1, false); } if(null == _streamLoc1) { _streamLoc1 = streamLoc0; } streamLoc1 = _streamLoc1; @@ -231,15 +231,15 @@ public class MovieSimpleActivity1 extends NewtBaseActivity { Log.d(TAG, "onCreate - X"); } - static URI getURI(final String path[], final int off, final boolean checkAvail) { - URI uri = null; + static Uri getUri(final String path[], final int off, final boolean checkAvail) { + Uri uri = null; for(int i=off; null==uri && i0) { if( checkAvail ) { final URLConnection uc = IOUtil.getResource(path[i], null); if( null != uc ) { try { - uri = uc.getURL().toURI(); + uri = Uri.valueOf(uc.getURL()); } catch (final URISyntaxException e) { uri = null; } @@ -249,7 +249,7 @@ public class MovieSimpleActivity1 extends NewtBaseActivity { } } else { try { - uri = new URI(path[i]); + uri = Uri.cast(path[i]); } catch (final URISyntaxException e) { uri = null; } diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java index 784fe1009..b10a89a8f 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java @@ -2,7 +2,6 @@ package com.jogamp.opengl.test.junit.graph.demos; import java.io.File; import java.io.IOException; -import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Arrays; @@ -17,6 +16,7 @@ import javax.media.opengl.GLEventListener; import javax.media.opengl.GLPipelineFactory; import javax.media.opengl.GLRunnable; +import com.jogamp.common.net.Uri; import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.RegionRenderer; import com.jogamp.graph.curve.opengl.RenderState; @@ -536,7 +536,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { } } ); buttons.add(mPlayerButton); try { - final URI streamLoc = new URI("http://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4"); + final Uri streamLoc = Uri.cast("http://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4"); mPlayer.initStream(streamLoc, GLMediaPlayer.STREAM_ID_AUTO, GLMediaPlayer.STREAM_ID_AUTO, GLMediaPlayer.TEXTURE_COUNT_DEFAULT); } catch (final URISyntaxException e1) { e1.printStackTrace(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/CrossFadePlayer.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/CrossFadePlayer.java index e5e752d96..b2ebc7068 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/CrossFadePlayer.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/CrossFadePlayer.java @@ -28,6 +28,7 @@ package com.jogamp.opengl.test.junit.jogl.demos.es2.av; +import com.jogamp.common.net.Uri; import com.jogamp.opengl.util.av.AudioSink; import com.jogamp.opengl.util.av.GLMediaPlayer; import com.jogamp.opengl.util.av.GLMediaPlayer.GLMediaEventListener; @@ -36,7 +37,6 @@ import com.jogamp.opengl.util.av.GLMediaPlayerFactory; import com.jogamp.opengl.util.texture.TextureSequence.TextureFrame; import java.io.File; -import java.net.URI; /** * Parallel media player that demonstrate CrossFade of audio volume during playback. @@ -141,7 +141,7 @@ public class CrossFadePlayer if(!file.exists()){ System.out.println("File do not exist"); } else { - final URI uri = file.toURI(); + final Uri uri = Uri.valueOf(file); System.out.println("State of player "+ i +": " + player[i].getState().toString()); System.out.println("...initializing stream "+ i +"..."); player[i].initStream(uri, GLMediaPlayer.STREAM_ID_NONE, GLMediaPlayer.STREAM_ID_AUTO, GLMediaPlayer.TEXTURE_COUNT_DEFAULT); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java index 607bfd1b0..428eea42c 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java @@ -30,7 +30,6 @@ package com.jogamp.opengl.test.junit.jogl.demos.es2.av; import java.io.File; import java.io.IOException; -import java.net.URI; import java.net.URISyntaxException; import javax.media.opengl.GL; @@ -42,7 +41,7 @@ import javax.media.opengl.GLEventListener; import javax.media.opengl.GLException; import javax.media.opengl.GLProfile; -import com.jogamp.common.util.IOUtil; +import com.jogamp.common.net.Uri; import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.GLRegion; import com.jogamp.graph.curve.opengl.RegionRenderer; @@ -81,13 +80,13 @@ public class MovieCube implements GLEventListener { private volatile boolean resetGLState = false; /** Blender's Big Buck Bunny: 24f 416p H.264, AAC 48000 Hz, 2 ch, mpeg stream. */ - public static final URI defURI; + public static final Uri defURI; static { - URI _defURI = null; + Uri _defURI = null; try { // Blender's Big Buck Bunny Trailer: 24f 640p VP8, Vorbis 44100Hz mono, WebM/Matroska Stream. // _defURI = new URI("http://video.webmfiles.org/big-buck-bunny_trailer.webm"); - _defURI = new URI("http://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4"); + _defURI = Uri.cast("http://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4"); } catch (final URISyntaxException e) { e.printStackTrace(); } @@ -151,7 +150,7 @@ public class MovieCube implements GLEventListener { mPlayer = GLMediaPlayerFactory.createDefault(); } - public void initStream(final URI streamLoc, final int vid, final int aid, final int textureCount) { + public void initStream(final Uri streamLoc, final int vid, final int aid, final int textureCount) { mPlayer.initStream(streamLoc, vid, aid, textureCount); System.out.println("pC.1b "+mPlayer); } @@ -252,7 +251,7 @@ public class MovieCube implements GLEventListener { mPlayer.getAID(), mPlayer.getAudioBitrate()/1000, mPlayer.getAudioCodec()); final String text3 = String.format("video: id %d, kbps %d, codec %s", mPlayer.getVID(), mPlayer.getVideoBitrate()/1000, mPlayer.getVideoCodec()); - final String text4 = mPlayer.getURI().getRawPath(); + final String text4 = mPlayer.getUri().path.decode(); if( displayOSD && null != renderer ) { gl.glClearColor(1.0f, 1.0f, 1.0f, 0.0f); if( null != regionFPS ) { @@ -517,11 +516,11 @@ public class MovieCube implements GLEventListener { } origSize = _origSize; } - final URI streamLoc; + final Uri streamLoc; if( null != url_s ) { - streamLoc = new URI(url_s); + streamLoc = Uri.cast( url_s ); } else if( null != file_s ) { - streamLoc = IOUtil.toURISimple(new File(file_s)); + streamLoc = Uri.valueOf(new File(file_s)); } else { streamLoc = defURI; } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSBSStereo.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSBSStereo.java index 9098ad00f..7a3a1ffc7 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSBSStereo.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSBSStereo.java @@ -28,7 +28,6 @@ package com.jogamp.opengl.test.junit.jogl.demos.es2.av; -import java.net.URI; import java.net.URISyntaxException; import java.nio.FloatBuffer; @@ -41,6 +40,7 @@ import javax.media.opengl.GLException; import javax.media.opengl.GLUniformData; import javax.media.opengl.fixedfunc.GLMatrixFunc; +import com.jogamp.common.net.Uri; import com.jogamp.common.os.Platform; import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.GLRegion; @@ -117,13 +117,13 @@ public class MovieSBSStereo implements StereoGLEventListener { private static final String myTextureLookupName = "myTexture2D"; /** Blender's Big Buck Bunny: 24f 416p H.264, AAC 48000 Hz, 2 ch, mpeg stream. */ - public static final URI defURI; + public static final Uri defURI; static { - URI _defURI = null; + Uri _defURI = null; try { // Blender's Big Buck Bunny Trailer: 24f 640p VP8, Vorbis 44100Hz mono, WebM/Matroska Stream. // _defURI = new URI("http://video.webmfiles.org/big-buck-bunny_trailer.webm"); - _defURI = new URI("http://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4"); + _defURI = Uri.cast("http://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4"); } catch (final URISyntaxException e) { e.printStackTrace(); } @@ -189,7 +189,7 @@ public class MovieSBSStereo implements StereoGLEventListener { mPlayer.getAID(), mPlayer.getAudioBitrate()/1000, mPlayer.getAudioCodec()); final String text3 = String.format("video: id %d, kbps %d, codec %s", mPlayer.getVID(), mPlayer.getVideoBitrate()/1000, mPlayer.getVideoCodec()); - final String text4 = mPlayer.getURI().getRawPath(); + final String text4 = mPlayer.getUri().path.decode(); if( displayOSD && null != renderer ) { // We share ClearColor w/ MovieSimple's init ! final float pixelSize = font.getPixelSize(fontSize, dpiH); @@ -327,7 +327,7 @@ public class MovieSBSStereo implements StereoGLEventListener { System.out.println("pC.1a "+mPlayer); } - public void initStream(final URI streamLoc, final int vid, final int aid, final int textureCount) { + public void initStream(final Uri streamLoc, final int vid, final int aid, final int textureCount) { mPlayer.initStream(streamLoc, vid, aid, textureCount); System.out.println("pC.1b "+mPlayer); } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java index 0d1191528..d963294b4 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java @@ -30,7 +30,6 @@ package com.jogamp.opengl.test.junit.jogl.demos.es2.av; import java.io.File; import java.io.IOException; -import java.net.URI; import java.net.URISyntaxException; import java.nio.FloatBuffer; @@ -46,8 +45,8 @@ import javax.media.opengl.GLProfile; import javax.media.opengl.GLUniformData; import javax.media.opengl.fixedfunc.GLMatrixFunc; +import com.jogamp.common.net.Uri; import com.jogamp.common.os.Platform; -import com.jogamp.common.util.IOUtil; import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.GLRegion; import com.jogamp.graph.curve.opengl.RegionRenderer; @@ -122,13 +121,13 @@ public class MovieSimple implements GLEventListener { private static final String myTextureLookupName = "myTexture2D"; /** Blender's Big Buck Bunny: 24f 416p H.264, AAC 48000 Hz, 2 ch, mpeg stream. */ - public static final URI defURI; + public static final Uri defURI; static { - URI _defURI = null; + Uri _defURI = null; try { // Blender's Big Buck Bunny Trailer: 24f 640p VP8, Vorbis 44100Hz mono, WebM/Matroska Stream. // _defURI = new URI("http://video.webmfiles.org/big-buck-bunny_trailer.webm"); - _defURI = new URI("http://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4"); + _defURI = Uri.cast("http://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4"); } catch (final URISyntaxException e) { e.printStackTrace(); } @@ -194,7 +193,7 @@ public class MovieSimple implements GLEventListener { mPlayer.getAID(), mPlayer.getAudioBitrate()/1000, mPlayer.getAudioCodec()); final String text3 = String.format("video: id %d, kbps %d, codec %s", mPlayer.getVID(), mPlayer.getVideoBitrate()/1000, mPlayer.getVideoCodec()); - final String text4 = mPlayer.getURI().getRawPath(); + final String text4 = mPlayer.getUri().path.decode(); if( displayOSD && null != renderer ) { // We share ClearColor w/ MovieSimple's init ! final float pixelSize = font.getPixelSize(fontSize, dpiH); @@ -388,7 +387,7 @@ public class MovieSimple implements GLEventListener { System.out.println("pC.1a shared "+mPlayerShared+", "+mPlayer); } - public void initStream(final URI streamLoc, final int vid, final int aid, final int textureCount) { + public void initStream(final Uri streamLoc, final int vid, final int aid, final int textureCount) { mPlayer.initStream(streamLoc, vid, aid, textureCount); System.out.println("pC.1b "+mPlayer); } @@ -988,14 +987,14 @@ public class MovieSimple implements GLEventListener { } origSize = _origSize; } - final URI streamLoc0; + final Uri streamLoc0; if( null != urls_s[0] ) { - streamLoc0 = new URI(urls_s[0]); + streamLoc0 = Uri.cast( urls_s[0] ); } else if( null != file_s1 ) { final File movieFile = new File(file_s1); - streamLoc0 = movieFile.toURI(); + streamLoc0 = Uri.valueOf(movieFile); } else if( null != file_s2 ) { - streamLoc0 = IOUtil.toURISimple(new File(file_s2)); + streamLoc0 = Uri.valueOf(new File(file_s2)); } else { streamLoc0 = defURI; } @@ -1049,12 +1048,12 @@ public class MovieSimple implements GLEventListener { windows[i].setVisible(true); anim.add(windows[i]); - final URI streamLocN; + final Uri streamLocN; if( 0 == i ) { streamLocN = streamLoc0; } else { if( null != urls_s[i] ) { - streamLocN = new URI(urls_s[i]); + streamLocN = Uri.cast(urls_s[i]); } else { streamLocN = defURI; } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java b/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java index 142c941a5..89f69e000 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java @@ -28,7 +28,6 @@ package com.jogamp.opengl.test.junit.jogl.stereo; import java.io.File; -import java.net.URI; import java.net.URISyntaxException; import java.util.Arrays; @@ -40,7 +39,7 @@ import javax.media.opengl.GLProfile; import jogamp.opengl.util.stereo.GenericStereoDevice; -import com.jogamp.common.util.IOUtil; +import com.jogamp.common.net.Uri; import com.jogamp.newt.event.KeyAdapter; import com.jogamp.newt.event.KeyEvent; import com.jogamp.newt.opengl.GLWindow; @@ -180,14 +179,14 @@ public class StereoDemo01 { } final StereoGLEventListener upstream; final MovieSBSStereo movieSimple; - final URI movieURI; + final Uri movieURI; if( null != useFilmFile ) { movieSimple = new MovieSBSStereo(); - movieURI = IOUtil.toURISimple(new File(useFilmFile)); + movieURI = Uri.valueOf(new File(useFilmFile)); upstream = movieSimple; } else if( null != useFilmURI ) { movieSimple = new MovieSBSStereo(); - movieURI = new URI(useFilmURI); + movieURI = Uri.cast(useFilmURI); upstream = movieSimple; } else { final GearsES2 demo = new GearsES2(0); @@ -204,7 +203,7 @@ public class StereoDemo01 { } public void doIt(final StereoDeviceFactory.DeviceType deviceType, final int deviceIndex, final int posx, final int posy, - final StereoGLEventListener upstream, final MovieSBSStereo movieSimple, final URI movieURI, + final StereoGLEventListener upstream, final MovieSBSStereo movieSimple, final Uri movieURI, final boolean biLinear, final int numSamples, final boolean useSingleFBO, final boolean useRecommendedDistortionBits, final boolean useVignette, final boolean useChromatic, final boolean useTimewarp, final boolean useAutoSwap, final boolean useAnimator, final boolean exclusiveContext) throws InterruptedException { -- cgit v1.2.3