aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
Commit message (Collapse)AuthorAgeFilesLines
* GraphUI MediaPlayer: seek from display-thread, don't act on ↵Sven Göthel2024-01-271-3/+3
| | | | SliderAdapter.clicked() as dragged is always called
* GLMediaPlayerImpl: Throw out video_queue_growthSven Göthel2024-01-271-35/+2
|
* GLMediaPlayer: Fix playing with single-threaded mode w/ texture-count 1Sven Göthel2024-01-261-6/+12
|
* Bug 1491: GLMediaPlayerImpl: Use a shared *GraphicsDevice for all compatible ↵Sven Göthel2024-01-251-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shared GLContext, removing resource restrictions In a use case with hundreds of GLMediaPlayer instances, this causes the application to bail out due to running out of resources. +++ GLMediaPlayer exposes resource restrictions and locking related with the created off-thread shared GLContext due to its newly created NativeWindow *GraphicsDevice instance (on X11). On the X11 platform, the *GraphicsDevice actually uses a native resource (X11 Display handle) and hence creating such device is costly and limited. To operate an off-thread GLContext w/o actual X11 input handling, it is *NOT* required to use a new instance. +++ Further more, the device is using locking. To operate an off-thread GLContext, it is *NOT* required to use locking on it as it does not perform actual X11 input handling etc. All operations are performed on the shared GL context. +++ Solution is to create a shared non-locking device clone compatible with the source. A share counter shall determine that the last one actually gets destructed. The usual ..
* Bug 1491: FFMPEGMediaPlayer: Lock moviePtr lifecycle phase in-between ↵Sven Göthel2024-01-251-69/+73
| | | | | | | | | [initStreamImpl - destruction] initStreamImpl() calls ffmpeg natives.setStream0(..), which in turn callsback to the GLMediaPlayerImpl and FFMPEGPlayer and hence requires a valid moviePtr. In total, it covers a longer time period. This patch uses a moviePtrLock object avoiding destruction while within initStreamImpl.
* NativeWindowFactory.createDevice(..) w/ unitID for cloning; ↵Sven Göthel2024-01-251-3/+7
| | | | | | | | | | DefaultGraphicsDevice: Move ownership (Object) code into base class ensuring same code NativeWindowFactory.createDevice(..) w/ unitID - Allows cloning a device instance with same parameter. DefaultGraphicsDevice: Move ownership (Object) code final into base class ensuring same code - Rename DefaultGraphicsDevice.swapDeviceHandleAndOwnership() -> swapHandleAndOwnership()
* Bug 1488: FFMPEGMediaPlayer: Fix getTextureFragmentShaderHashID(), i.e. use ↵Sven Göthel2024-01-221-6/+3
| | | | actual tc_w_1 = (float)getWidth() / (float)texWidth value as hardcoded within the shader.
* Graph/GraphUI: Revise Graph Region ShaderMapping, fix AABBox-Clipping for ↵Sven Göthel2024-01-142-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass2-AA, revise Pass2 AA Quality parameter .. Misc: - Graph VBORegion2PVBAAES2: Drop unused FBO rescale - Move MIN/MAX QUALITY/SAMPLE from GraphUI Scene -> Graph Region +++ Quality -> Pass2 AA Quality - Drop quality field in region - Pass quality to GLRegion.draw(..) similar to sampleCount for dynamic shader and switch - TODO: Pass quality parameter in TextRegionUtil's functions Fix RegionRenderer Shader Mapping - Use ShaderKey class to properly implement the hash value and equals method - For this, TextureSequence.getTextureFragmentShaderHashID() has been added to provide actual shader-snippet for the equals function - All required criterias are included in the hash value and equals method Fix AABBox Clipping for Pass-2 AA - Clipping in pass2-AA must happen in pass2 on actual gcu_PMVMatrix01 (not ortho) +++ GraphUI GraphShape - Rename: [get,set]{->AA}Quality() GraphUI Scene - Rename: mark{All->}ShapesDirty(), set{AllShapes->}Sharpness(), set{AllShapes->AA}Quality() - Fix setSampleCount(..), i.e. markStatesDirty() not markShapesDirty() - Fix setAAQuality(), markShapesDirty() and markStatesDirty(): Use forAll(..) to traverse through all shapes and groups. GraphUI Group - Add setFixedSize() - Add setClipOnBox() - Document setRelayoutOnDirtyShapes(), isShapeDirty()
* GraphUI MediaPlayer / GLMediaPlayer: Add current chapter-title to info-fieldSven Göthel2024-01-072-2/+14
|
* GLMediaPlayer/FFMPEGMediaPlayer: Add chapter metadata support and use ↵Sven Gothel2023-12-307-9/+70
| | | | | | | | com.jogamp.common.av.PTS.millisToTimeStr(..) Chapter metadata is now supported via our FFMPEGMediaPlayer implementation. Added public method: 'Chapters[] GLMediaPlayer.getChapters()'
* OMXGLMediaPlayer: Add 'printNativeInfo(..)' - completes commit ↵Sven Gothel2023-12-181-0/+6
| | | | d99c2d8b28470d335ab5b30124ef8b0607b3b90f
* GLMediaPlayer: Add printNativeInfo(..) exposing used native library ↵Sven Gothel2023-12-185-38/+86
| | | | information (if any), FFMPEG* utilizes NativeLibrary.get[Native]LibraryPath()
* Bug 1479 - NativeLibrary: Add getNativeLibraryPath() returning actual native ↵Sven Gothel2023-11-263-5/+14
| | | | 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-161-2/+5
| | | | user from selecting video or audio PTS.
* 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-155-211/+401
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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
* 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-231-5/+22
| | | | | | | | 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
* 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-2010-46/+36
| | | | | | | | | | | | | | | | | | | | 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-162-3/+3
| | | | certain debug output to keep most silence for debugAll()
* Minor cleanup of imports, etc: FBObject, GLContext*, Texture, ..Sven Gothel2023-08-132-13/+6
| | | | TODO: Full cleanup perhaps
* Texture ctor w/ external textureID: Pass `ownsTextureID` where true hands ↵Sven Gothel2023-08-131-1/+10
| | | | | | | | | over ownership and allows destroy() to delete it, otherwise not. Fixes GraphUI's GLButton. GraphUI's GLButton uses the offscreen's FBO texture and hence can't pass over ownership of the texture. Hence the Texture instance is created w/o handing over ownership! GLMediaPlayerImpl does hand over ownership of the generated and passed texture to the Texture ctor.
* GLMediaPlayer: Show more reasonable DEBUG output in factory; Impl initGL(GL) ↵Sven Gothel2023-08-111-4/+6
| | | | shall handle null streamWorker, i.e. when using NullGLMediaPlayer
* GLStateTracker: Add tracking of blending states (part-1)Sven Gothel2023-08-011-2/+129
|
* GLStateTracker: Encapsulate PixelStateMap for PixelStorei states (prepare ↵Sven Gothel2023-08-011-44/+69
| | | | for tracking of blending states)
* Add {GL, GLContext}.getDefaultDrawBuffer() to complement getDefaultReadBuffer()Sven Gothel2023-07-153-0/+18
|
* GLMediaPlayer: Add setAudioChannelLimit(..), correlating with ↵Sven Gothel2023-05-232-1/+14
| | | | | | | AudioSink.setChannelLimit() .. May be utilized to enforce 1 channel (mono) downsampling in combination with JOAL/OpenAL to experience spatial 3D position effects.
* *MediaPlayer: Adop to JOAL 39a32fd56de313c31bd197ee6022288e97f9729aSven Gothel2023-05-212-2/+6
|
* FFMPEGMediaPlayer: Adjust to AudioFormat changesSven Gothel2023-05-201-2/+2
|
* FFMPEGMediaPlayer: AudioFormat is now a stand-alone class (gluegen ↵Sven Gothel2023-05-181-2/+2
| | | | 2b339721a4d6dd4f3af129a4654375b15c7ea340)
* Common av classes (*AudioSink, ..) are promoted to gluegen (commit ↵Sven Gothel2023-05-178-1430/+9
| | | | 270172bcbd91f96d4a38a3d73e23d744f57a25b8) and joal (commit 03f4bb63ce8a358b1c2ef303480e1887d72ecb2e)
* Fix GLMediaPlayerImpl.initGL(GL): Allow null==gl and audio-only mode ↵Sven Gothel2023-05-091-16/+33
| | | | (regression to initial implementation)
* GLMediaPlayer: Replace GLMediaEventListener.EVENT_CHANGE_* 'int event_mask' ↵Sven Gothel2023-05-091-41/+44
| | | | with EventMask.Bit/EventMask