aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util/av
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-02-01 15:37:03 +0100
committerSven Göthel <[email protected]>2024-02-01 15:37:03 +0100
commit9ff736464e0d2762c424bab66bc6d03ccc6e6d11 (patch)
tree14e1a383a86bca406608841c7e3acf5d44cbee11 /src/jogl/classes/jogamp/opengl/util/av
parentca846bc67e6a074a182e97f29b3c34b90a12cac3 (diff)
Bug 805: Graph/GraphUI TextureSequence Scale: Move Region.COLORTEXTURE_LETTERBOX_RENDERING_BIT to TextureSequence and add enabling/disabling of aratio adjustment + letter-box back-color
TextureSequence color-texture params fetched from Graph VBORegion* and fed into shader. This allows more flexibility in aspect-ratio adjustment as well as setting a clipping background color for the added letter-box space.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/av')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
index ed03278b9..219cfb3e5 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
@@ -118,6 +118,8 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
private final int[] texMinMagFilter = { GL.GL_NEAREST, GL.GL_NEAREST };
private final int[] texWrapST = { GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE };
+ private boolean aRatioLbox = false;
+ private final Vec4f aRatioLboxBackColor = new Vec4f();
/** User requested URI stream location. */
private Uri streamLoc;
@@ -1032,6 +1034,26 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
@Override
+ public final boolean useARatioAdjustment() { return true; }
+
+ @Override
+ public void setARatioAdjustment(final boolean v) { } // intentionally not supported
+
+ @Override
+ public final boolean useARatioLetterbox() { return aRatioLbox; }
+
+ @Override
+ public Vec4f getARatioLetterboxBackColor() { return aRatioLboxBackColor; }
+
+ @Override
+ public void setARatioLetterbox(final boolean v, final Vec4f backColor) {
+ aRatioLbox = v;
+ if( null != backColor ) {
+ aRatioLboxBackColor.set(backColor);
+ }
+ };
+
+ @Override
public final boolean isTextureAvailable() {
return null != lastFrame; // Note: lastFrame is test-texture if using initGL() pre stream ready
}