aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* GraphUI UISceneDemo20: Only use ALAudioSink if its context is already ↵Sven Gothel2023-12-181-5/+9
| | | | created (ready)
* GraphUI MediaButton: Disable AA_RENDERING_MASK for GLMediaPlayer color ↵Sven Gothel2023-12-181-1/+2
| | | | | | | | | texture (effiency, less artifacts) 2-pass Graph-AA is not desired for video textures to enhance efficiency and reduce artifacts. Consider using 'mPlayer.setTextureMinMagFilter( new int[] { GL.GL_LINEAR, GL.GL_LINEAR } )' of passed GLMediaPlayer instance to use bilinear filtering for different sizes.
* MovieSBSStereo: GLMediaPlayer.setTextureMinMagFilter() must be called before ↵Sven Gothel2023-12-181-1/+1
| | | | initialization
* GraphUI Shape: Rename [set|is]{Enabled -> Visible}(..) for claritySven Gothel2023-12-188-26/+32
| | | | | Note that invisible shapes are still considered for picking/activation. To completely mute the shape, issue {@link #setInteractive(boolean)} as well.
* GraphUI Shape/Group: Group.isActive() also returns true if any child is ↵Sven Gothel2023-12-122-1/+12
| | | | active; Add isContainer() to avoid rfeflection
* GraphUI Shape: Use Shape.MoveListener for Shape.onMove(..) providing more ↵Sven Gothel2023-12-123-28/+34
| | | | details of the translation
* GraphUI Shape: Add IO_ACTIVABLE stateSven Gothel2023-12-121-17/+38
|
* GraphUI Shape: Simplify setIO(..) usage (private)Sven Gothel2023-12-121-7/+7
|
* GraphUI Scene: Allow attaching GLAutoDrawable manually and adding ↵Sven Gothel2023-12-041-2/+26
| | | | GLEventListener (API)
* FFMpeg: Just be nice and flush GL stream, no finish sync requiredSven Gothel2023-12-041-2/+8
|
* FFMpeg: Fix and clarify 'resend package' and 'continue draining frames' statesSven Gothel2023-12-041-21/+30
|
* Bug 1479 - NativeLibrary: Add getNativeLibraryPath() returning actual native ↵Sven Gothel2023-11-265-5/+20
| | | | 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-162-15/+29
| | | | 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-165-19/+43
| | | | 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-152-5/+10
| | | | | | | | | 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-158-242/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* GraphUI Shape: Complete commit c8ec6fa7cc16a0777db16af8b4d0d0b898f8b546Sven Gothel2023-10-031-2/+13
|
* GraphUI Shape: 'int name' -> 'int id' and add 'String name', change get/set ↵Sven Gothel2023-10-038-34/+71
| | | | methods accordingly
* GraphUI Scene: Add custom one-time GLRunnable disposable action list, ↵Sven Gothel2023-10-032-0/+24
| | | | | | | | allowing to properly take-down user resources at dispose(GLAutoDrawable) Used for UISceneDemo20 to stop and release SimpleSineSynth and its ALAudioSink. The latter causes a bad exit (crash at OpenAL32.dll) on OpenJDK's Window Binary if not stopped!
* Bug 1470 - FFmpeg / JNI: Perform exception check and rethrow for all Java ↵Sven Gothel2023-10-023-7/+48
| | | | Callbacks as recommended
* Bug 1471: Add a GLEventAdapter for GLEventListener similar to the other ↵Sven Gothel2023-10-021-0/+42
| | | | Adapter patterns
* Bug 1470 - NEWT/JNI: Perform exception check and rethrow for all Java ↵Sven Gothel2023-10-026-7/+67
| | | | Callbacks as recommended
* Bug 1469 - FFmpeg binding uses ReleaseStringChars instead of ↵Sven Gothel2023-10-021-12/+14
| | | | ReleaseStringUTFChars for GetStringUTFChars() acquired UTF
* Bug 1468 - SIGSEGV on use after free when destroying NEWT Window/Display via ↵Sven Gothel2023-10-0225-380/+814
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Bug 1468: Demos MiscUtil.destroyWindow() Call GLAutoDrawable.destroy() ↵Sven Gothel2023-10-013-7/+23
| | | | directly w/o mitigation attempts (off-thread)
* Bug 1467 - GraphUI: Don't de-activate a Shape if became active via ↵Sven Gothel2023-09-301-15/+24
| | | | | | | | 'mouseOver' (mouseDragged) When using a mouse, Scene activates a Shape if mouse is over it (mouseOver). Hence don't de-activate such Shape via mouse-button clicked or released.
* GraphUI: Shape: Add missing 'markShapeDirty()' on setBorderColor()Sven Gothel2023-09-301-0/+2
|
* Bug 1454 + Bug 1464: Maintain a Shape local 'zOffset' and only consider it ↵Sven Gothel2023-09-302-35/+43
| | | | | | | | | | for sorting w/o actually modifying the position (enogh to be painted on top and for selection) Also use a simplified comparison using only float relational operations w/o NaN/Inf bit-stuff or epsilon, as it should be accurate enough for this cause. This shall also resolve Bug 1454, as we no more modify the position directly but the local zOffset field .. but this has to be seen (data race).
* GraphUI: Group: Add attribute to allow not to relayout if child Shapes are ↵Sven Gothel2023-09-301-14/+24
| | | | dirty. Only issue validate on childs if theyre shape is dirty
* 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-3019-183/+587
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-294-14/+125
| | | | | | | | | | 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 1431: Fix NewtCanvasAWT resize on X11, broken since commit ↵Sven Gothel2023-09-295-12/+259
| | | | | | | | | | | | | | | | | | | | | ad38d1559854985b1131e5b6c7274a392b5bc265 Commit ad38d1559854985b1131e5b6c7274a392b5bc265 introduced XTranslateCoordinates(..) to savely validate the client-space window position against the parent (root). Totally missing in this change was the NEWT child window case since it always used the root-window as the destination. This change tracks the parent-window (valid parent Window or NULL) within the JavaWindow struct and either uses the parent-window if available or the root-window for XTranslateCoordinates(..). This results in the proper client-space position. Validated against - TestGearsES2NewtCanvasAWT - TestBug1431NewtCanvasAWT on Debian 12 w/ Java17.
* GraphUI Demos: Minor refinements..Sven Gothel2023-09-262-5/+5
|
* GraphUI Demo UISceneDemo20: Give 'Show FPS' a toggle text 'Hide FPS' .. and ↵Sven Gothel2023-09-261-1/+2
| | | | have the text resize being of fixed aspect-ratio (like the movie)