From e1883b6402231044cc6bdf67a45c1b3610e34535 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 30 Aug 2013 09:38:01 +0200 Subject: FFMPEGMediaPlayer: Handle v-flipped 'bottom-up' pictures ; Refine API doc 'camera ID' If linesize is < 0, it is not invalid as assumed in commit eca6a5cb1e2beda84dfbafc31ed225e272f4f3fb, but vertically flipped (bottom-up). We have to adjust the data pointers, which are moved to the upper end of memory as well and can proceed as usual. TODO: - Update texture 'mustFlipVertically' to 'false' in this case. - Later: - Allow updating texture size .. - Whole pixel-fmt/texture-lookup-shader association must scale better, i.e. extract the 'knowledge' into one class, use a static shader code using uniforms instead of hard-coded values .. etc. --- src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/com') 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 7f57138a7..1fb0608fb 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java +++ b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java @@ -197,10 +197,14 @@ public interface GLMediaPlayer extends TextureSequence { * {@link URI#getScheme() URI scheme} name {@value} for camera input. E.g. camera://0 * for the 1st camera device. *

- * The {@link URI#getRawPath() URI path} is being used to identify the camera, + * The {@link URI#getRawPath() URI path} is being used to identify the camera (ID), * where the root fwd-slash is being cut-off. *

*

+ * The ID is usually an integer value indexing the camera + * ranging from [0..max-number]. + *

+ *

* The {@link URI#getRawQuery() URI query} is used to pass options to the camera. *

*
@@ -359,11 +363,10 @@ public interface GLMediaPlayer extends TextureSequence {
      * 
      * @param gl current GL object. Maybe null, for audio only.
      * @throws IllegalStateException if not invoked in {@link State#Initialized}. 
-     * @throws IllegalArgumentException if arguments are invalid
      * @throws StreamException forwarded from the off-thread stream initialization
      * @throws GLException in case of difficulties to initialize the GL resources
      */
-    public void initGL(GL gl) throws IllegalStateException, IllegalArgumentException, StreamException, GLException;
+    public void initGL(GL gl) throws IllegalStateException, StreamException, GLException;
     
     /** 
      * If implementation uses a {@link AudioSink}, it's instance will be returned.
-- 
cgit v1.2.3