aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
Commit message (Collapse)AuthorAgeFilesLines
* OMXGLMediaPlayer: Add 'printNativeInfo(..)' - completes commit ↵Sven Gothel2023-12-181-0/+6
| | | | d99c2d8b28470d335ab5b30124ef8b0607b3b90f
* GLMediaPlayer: TEXTURE_COUNT_DEFAULT 4 -> 3 as tested via UIMediaGrid01, ↵Sven Gothel2023-12-181-1/+1
| | | | usable w/ fix for Bug 1472 (Enhance A/V Sync)
* GLMediaPlayer: Add printNativeInfo(..) exposing used native library ↵Sven Gothel2023-12-186-38/+90
| | | | information (if any), FFMPEG* utilizes NativeLibrary.get[Native]LibraryPath()
* Graph Shader: Fix 'curverenderer01-single.vp' aligning w/ ↵Sven Gothel2023-12-181-2/+3
| | | | 'curverenderer01-pass1.vp' (commit 297c48f4fefd1ab59800524ea5f0dd56684d6786)
* Graph Region: Edit API doc for AA_RENDERING_MASKSven Gothel2023-12-181-1/+1
|
* Bug 1479 - NativeLibrary: Add getNativeLibraryPath() returning actual native ↵Sven Gothel2023-11-264-5/+16
| | | | library path, support throughout DynamicLibraryBundle[Info]
* GLMediaPlayer.getPerfString(): Don't show audio pts values is no_audio, ↵Sven Gothel2023-10-161-17/+19
| | | | misleading and wrong info (e.g. on mute)
* GLMediaPlayer: Don't resetAVPTS() on resume(), allowing less AV sync ↵Sven Gothel2023-10-161-13/+10
| | | | disruption after pause(flush:=false)
* GLMediaPlayer: Recognize !use_audio when repeating (caching) a video-frame, ↵Sven Gothel2023-10-161-26/+27
| | | | i.e. ignore audio_queued_ms in such case (Fixes video sync on SCR w/o audio)
* GLMediaPlayerImpl: Use a PTS av_scr_cpy from av_scr for getPTS() avoiding ↵Sven Gothel2023-10-161-7/+12
| | | | direct user-exposure and potential data-race
* GLMediaPlayerImpl: Don't reset SCR on video_scr_reset or irq'ed rendering ↵Sven Gothel2023-10-161-2/+2
| | | | w/o video-frame (fixes 'massive' seek'ing)
* FFMPEGMediaPlayer: Remove unconditional DEBUG outputSven Gothel2023-10-161-1/+1
| | | | Left behind hacking for AV sync ..
* Bug 1472: GLMediaPlayer.getNextTexture(): Fix playSpeed > 1; Handle ↵Sven Gothel2023-10-161-88/+86
| | | | | | !hasVideoFrame upfront, simplifying sync-block Fix playSpeed > 1: dt_v (keep playSpeed factor), allow drop frame on no-frames w/ playSpeed > 2
* Bug 1472: GLMediaPlayer: Handle setPlaySpeed() like setAudioVolume() if ↵Sven Gothel2023-10-161-15/+18
| | | | stream is not yet initialized or playing, cached clipped value and set at initGL(..)
* Bug 1472: GLMediaPlayer: Expose SCR PTS and encourage its usage, removes ↵Sven Gothel2023-10-162-4/+25
| | | | user from selecting video or audio PTS.
* GLJPanel: Fix DEBUG output USE_GLSL_TEXTURE_RASTERIZER -> ↵Sven Gothel2023-10-161-1/+1
| | | | USE_GLSL_VERTICAL_FLIP, changed names in commit d6cf89f22a5926b437c4430eb166972d90fd92be
* GLJPanel: Allow disabling GLSL vertical flip programmatically via ↵Sven Gothel2023-10-161-14/+26
| | | | | | | | | | | | | | setUseGLSLVerticalFlip(false) in addition to property 'jogl.gljpanel.noglsl' Suche setting would enable the slow path of flipping a potentially 'big' framebuffer via the CPU. The best performance path is using the GLSL shader to vertically flip the FBO, or - w/o using the shader - to render the GL scene vertically-flipped and set the flag 'flipVertical' to false. - property "jogl.gljpanel.noverticalflip" - setter setSkipGLOrientationVerticalFlip(boolean) If set to <code>true</code>, user needs to flip the OpenGL rendered scene <i>if {@link #isGLOriented()} == true</i>, e.g. via the projection matrix.<br/> See constraints of {@link #isGLOriented()}.
* Bug 1472: Enhance GLMediaPlayer AV Sync: Fine tune AV heuristics to ↵Sven Gothel2023-10-151-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | (multiple of) audio_dequeued_ms The case of lagging audio to the audio master-clock (by experience) is a rare and probably synthethic case of the AV async videos, was dt_a > MAX_VIDEO_ASYNC && d_apts > 0 now with increased threshold max_adelay = Math.max( 4*audio_dequeued_ms, 4*MAX_VIDEO_ASYNC ) dt_a > max_adelay && d_apts > 0 In conjunction the video-repeat case (video pts > SCR) shall use a higher threshold _when_ detecting, i.e. min1_audio_queued_ms = Math.max( 2*audio_dequeued_ms, 2*MAX_VIDEO_ASYNC ) to ensure enough buffered audio exists (2 audio-frames) before the next getNextTexture() hits within vsync. This early detection and min1_audio_queued_ms threshold is double of the late threshold for video-repeat min0_audio_queued_ms = Math.max( audio_dequeued_ms, MAX_VIDEO_ASYNC ), when the to-be repeated frame shall be displayed within getNextThreshold(). Failing this requirement (1 audio-frame) will discard it and gather the next video-frame, allowing to fill the audio-buffer. A subsequent AV sync shall correct the difference. Strategy is less intervention on less buffered-audio. This shorter tolerance also reduces some video lag or stuttering on 24fps -> 60fps films.
* Bug 1472: Enhance GLMediaPlayer AV Sync: Fix FFMPEGMediaPlayer's audio ↵Sven Gothel2023-10-151-2/+4
| | | | | | | | | resample: Use swr_get_out_samples(..) to calculate the required output sample count Notable when playing audio with e.g. 24k sample rate on a 48k OpenAL ALAudioSink, the sample duration was cut in half due to erroneous resampling missing half the required samples. Using swr_get_out_samples(..) resolves this issue pre swr_convert(..), the resampling.
* Bug 1472: Enhance GLMediaPlayer AV Sync: Utilize SCR aware audio PTS used as ↵Sven Gothel2023-10-156-218/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | | | master-clock, enabling proper AV sync w/ untouched audio We can finally utilize the added pass through audio PTS, see commits - GlueGen 52725b4c6525487f93407f529dc0a758b387a4fc - JOAL 12029f1ec1d8afa576e1ac61655f318cc37c1d16 This enables us to use the audio PTS as the master-clock and adjust video to the untouched audio. In case no audio is selected/playing or audio is muted, we sync merely on the system-clock (SCR) w/o audio. AV granularity is 22ms, however, since the ALAudioSink PTS may be a little late, it renders even a slightly better sync in case of too early audio (d_apts < 0). Since video frames are sync'ed to audio, the resync procedure may result in a hysteresis swinging into sync. This might be notable at start and when resumed audio or after seek. We leave the audio frames untouched to reduce processing burden and allow non-disrupted listening. Passed AV sync tests - Five-minute-sync-test.mp4 - Audio-Video-Sync-Test-Calibration-23.98fps-24fps.mp4 - Audio-Video-Sync-Test-2.mkv
* Bug 1472: GLMediaPlayerImpl: Track repeatedFrame countSven Gothel2023-10-041-5/+5
|
* Bug 1472: GLMediaPlayer AVSync: Refine AVSync debug output (WIP)Sven Gothel2023-10-041-12/+47
| | | | Using `-Djogl.debug.GLMediaPlayer.AVSync -Djogamp.debug.AudioSink` to trace AVSync issues for now.
* Bug 1473 - ALAudioSink: AV Synchronization: Adopt to JOAL ALAudioSink changesSven Gothel2023-10-041-6/+6
| | | | | FFMPEGMediaPlayer: This also effectively reduces the audio buffer size from 3000ms -> 768ms, the new default for audio streams with video.
* FFMPEGMediaPlayer: Always use own textureLookupShader and validate its ↵Sven Gothel2023-10-031-26/+65
| | | | | | | | | | | custom name against GLSL internal 'texture2D', add missing VideoPixelFormat conversions Always use own textureLookupShader, avoiding confusion or even race conditions. Validate textureLookupShader custom name against GLSL internal 'texture2D' (illegal override) Add missing VideoPixelFormat conversions: - RGB24, ARGB, RGBA, ABGR, BGRA
* TextureSequence.setTexCoordBBox(): Add 'verbose' parameter for debug output ↵Sven Gothel2023-10-034-7/+7
| | | | instead hard coded branch
* Bug 1471: Add a GLEventAdapter for GLEventListener similar to the other ↵Sven Gothel2023-10-021-0/+42
| | | | Adapter patterns
* Bug 1468 - SIGSEGV on use after free when destroying NEWT Window/Display via ↵Sven Gothel2023-10-022-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a native dispatch'ed event like key/mouse/touch input SIGSEGV on use after free of native X11 Display* at XEventsQueued in DisplayDriver.DispatchMessages0. This potentially happens when an application destroys the NEWT Window/Display from an action being called directly from DisplayDriver.DispatchMessages0 (itself), i.e. keyboard or mouse input. DisplayDriver.DispatchMessages0 stays in the event loop and the next XEventsQueued call causes a SIGSEGV due to already deleted display driver connection and hence invalid native X11 Display*. This issue also exist for other Windowing System drivers, where the native (dispatch) method sticks to a loop and still (re)uses the window or display handle. One is WindowsWindow, where touch events are looped, but such handler could have closed the window. Querying the status of a window / display instance before dispatching is not be good enough - resource could already be GC'ed, so we also would need to query jobject status - would imply an addition Java callback +++ This fix: Having the Java callbacks return a boolean with the value Window.isNativeValid(). This way the dispatch logic - can bail out right away w/o using the resource anymore - must be reviewed by myself due to changed Call{Void->Boolean}*(..) invocation change. This review shall resolve potential similar issues. +++ Tested on X11/Linux/GNU, Windows and MacOS with new TestDestroyGLAutoDrawableNewtAWT, which tests all destruction invocation variants.
* FFMPEGMediaPlayer: Insert GLSL comment-line documenting the addressed ↵Sven Gothel2023-09-301-1/+6
| | | | VideoPixelFormat conversion for easier debugging
* Bug 1465 - Graph / GraphUI: Render a Region's ColorTexture in proper ↵Sven Gothel2023-09-3013-81/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aspect-ratio, letter-boxed or zoomed (config) + Bug 1466 Fix color mixing Bug 1465: Region currently simply bloats a given texture to its region AABBox, which renders textures with the wrong aspect ratio. Add facility to program the texture-coordinates to either letter-box or scaled-up (and cut) true aspect-ratio. Default shall be zoom (scale-up and cut), but user shall be able to set a flag in the Region for letter-box. Have the shader clip texture coordinates properly, best w/o branching to soothe performance. See functions.glsl +++ Bug 1466: Current color mix: texture * color_channel * color_static is useless in GraphUI. color_static shall modulate the texture, which works. But in case of color_channel (attribute/varying) we want it to be mixed so it can become the more dominant color for e.g. a border. Desired is: color = vec4( mix( tex.rgb * gcu_ColorStatic.rgb, gcv_Color.rgb, gcv_Color.a ), mix( tex.a * gcu_ColorStatic.a, 1, gcv_Color.a) );
* Bug 1430 - Fix Background erase not disabled with AWT GLCanvas and NewtCanvasAWTSven Gothel2023-09-291-2/+10
| | | | | | | | | | Commit c5431f46b7bf64f109315ec78461859dd88f202a reduced the disableBackgroundErase(..) to SunToolkit's variation which doesn't work on Windows as it does not act upon the java.awt.Canvas peer post addNotify(). This re-introduces the java.awt.Canvas method via class JAWTUtil.BackgroundEraseControl and its called only after addNotify() on Windows and ASAP for everyone else. Method also calles the SunTookit variation just to be sure.
* Bug 1463 - Graph Font: Whitespace or undefined Glyphs shall not cover (any) ↵Sven Gothel2023-09-261-4/+7
| | | | | | | | | | | | | | | | | | height exceeding overall CharSequence TypecastFont using `metrics.getAscentFU() - metrics.getDescentFU()` for ascent used for all undefined and whitespace Glyphs w/o a spatial outline, leads to a potential exceeding height compared to the actual used bounding box of the rendered text. This in turn leads to layout issues, e.g. button labels are placed too low. Solution: - Whitespace/Undefined: Drop full height 'metrics.getAscentFU() - metrics.getDescentFU()', b/c of non-existing shape height. - Otherwise, layout on AABBox or created empty shape would pick up such default hhea-table ascent which might exceed actual string height. Sideeffect would be if user relies on height of a whitespace. However, knowing this fact - a user may always pick the hhea-table's ascent metric values as exposed in Font and Font.Metric. This resolves remaining layout issues, including button labels.
* Graph Font: API doc: Fix typos 'Return ' .. to 'Returns `.Sven Gothel2023-09-241-17/+20
|
* Bug 1462 - Graph Font: Add name + codepoint to ID and Glyph mapping plus ↵Sven Gothel2023-09-245-140/+293
| | | | | | | | | traversing through all Glyphs See UISceneDemo03 new Button(options.renderModes, fontSymbols, " "+fontSymbols.getUTF16String("pause")+" ", buttonWidth, buttonHeight); // pause Unicode codepoint symbol is also contained in FontGlyph
* Graph Fonts: Add 'Material Icons Round-Regular' (APL-2 license) and use it ↵Sven Gothel2023-09-244-0/+92
| | | | in UISceneDemo03 via hard coded unicode symbol numbers
* Graph Fonts UbuntuFontLoader: Factor out FontLoaderImpl and have get(..) ↵Sven Gothel2023-09-242-103/+139
| | | | synchronized for static fontMap field access
* Graph Fonts: Remove not required text files from Ubuntu fontsSven Gothel2023-09-243-409/+0
|
* GLMediaPlayer: Stop audio streaming to AudioSink on zero volume (Flush on ↵Sven Gothel2023-09-242-2/+10
| | | | mute and play on un-mute)
* Bug 1455 - GLMediaPlayer: Add isAutioMuted() query on volume and earmark ↵Sven Gothel2023-09-232-5/+25
| | | | | | | | audio-volume if not initialized and set it when AudioSink becomes available Setting the audio volume before initialization shall impact GLMediaPlayer when it becomes initialized. Further add a query if audio is muted, merely based on volume.
* GLMediaPlayerImpl: Recover lost StreamException information from commit ↵Sven Gothel2023-09-231-5/+17
| | | | 77eab439147af69089fa3ebf07d64ee3b4d67bfd
* Bug 1452: PMVMatrix4f: Drop redundant unused mulWith*(Vec*...) 'v_out = M * ↵Sven Gothel2023-09-231-102/+0
| | | | v_in', user can simply get the desired matrix and apply its mulVec*(..) operation
* GLMediaPlayerImpl: Replace StreamWorker thread management with GlueGen's new ↵Sven Gothel2023-09-221-222/+97
| | | | WorkerThread, helping to simplify code
* Bug 1452 - Decouple math functionality to 'com.jogamp.math' to be toolkit ↵Sven Gothel2023-09-2080-1440/+2571
| | | | | | | | | | | | | | | | | | | | agnostic (PMVMatrix, Matrix4f, Vec4f, ..) Math functionality (PMVMatrix, Matrix4f, Vec4f, ..) - shall be used toolkit agnostic, e.g. independent from OpenGL - shall be reused within our upcoming Vulkan implementation - may also move outside of JOGL, i.e. GlueGen or within its own package to be reused for other purposed. The 'com.jogamp.opengl.util.PMVMatrix' currently also used to feed in GLUniformData via the toolkit agnostic SyncAction and SyncBuffer shall also be split to a toolkit agnostic variant. An OpenGL PMVMatrix specialization implementing GLMatrixFunc can still exist, being derived from the toolkit agnostic base implementation. +++ Initial commit .. compile clean, passing most unit tests.
* Debug.debugExplicit(): Define and use explicit symbol debug flag; Use it for ↵Sven Gothel2023-09-168-12/+25
| | | | certain debug output to keep most silence for debugAll()
* FloatUtil.abs(a): Mark as deprecated, use Math.abs(a) directly. We assume it ↵Sven Gothel2023-09-044-13/+20
| | | | | | | | | | | | | | | | is an intrinsic + branch-less implementation Expected implementation is - return Float.intBitsToFloat(Float.floatToRawIntBits(a) & 0x7fffffff); replacing old implementation - return (a <= 0.0F) ? 0.0F - a : a; .. also market as @IntrinsicCandidate Hence we shall leave it to the JRE core-lib implementation...
* GraphUI Enhance: API doc; Scene/Button Z-offset and -epsilon; Push temp ↵Sven Gothel2023-09-041-0/+5
| | | | AffineTransform to local method; Simplify BaseButton setCorner(0) -> setPerp(); Protected abstract ctor ..
* FloatUtil.isEqual(..): Rename raw {isEqual->isEqualRaw}(a,b) varianr w/o ↵Sven Gothel2023-09-039-22/+84
| | | | | | EPSILON; Add isEqual(a,b) w/ default EPSILON; Use it where applicable Also add isEqual2(a,b) w/o corner cases (NaN, Inf) used for comparison in Graph Outline, OutlineShape and later GraphUI Shape.
* GraphUI Scene: Pass sampleCount in ctor variant and refine API doc, clip to ↵Sven Gothel2023-09-031-1/+12
| | | | [1..8]; Add clarity in Region; Demos CommandlineOptions adds actual graphAASamples set and utilized
* PMVMatrix.gluPerspective(): Redfine angle in radians instead of degrees ** ↵Sven Gothel2023-09-022-6/+18
| | | | | | | | API Change ** Since this is an extra implementation of PMVMatrix and not of GLMatrixFunc, we shall use the default ISO dimension avoiding conversion. This alsi redefined Graph's RegionRenderer.reshapePerspective() angle definition from degrees to radians
* Graph Font + Glyph: Fix whitespace definition: Include 'no original ↵Sven Gothel2023-09-012-20/+26
| | | | | | | | | | | | | | underlying shape' and add API doc Regression was introduced with commit 920e529516bb264f04138ed1caca80d4925e3773 'Robust detetection and API definition of non-contour/whitespace Glyphs'. Issue was mistaken a glyph as undefined if not having an underlying shape, which is true for some fonts (e.g. 'space'). +++ Also Use post table's name if no underlying shape exists.
* Graph Font: Make TypecastRenderer.DEBUG package private to be used by ↵Sven Gothel2023-08-281-1/+1
| | | | TypecastFont