Skip to content
The Jenkins Controller is preparing for shutdown. No new builds can be started.
Success

Changes

Summary

  1. Bug 927: Fix minor MT issues w/ libav/ffmpeg (details)
  2. Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Refine (details)
  3. Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Fix (details)
  4. GLContextImpl/GLDrawableImpl.getDefaultReadBuffer(..): Pass hint whether (details)
  5. Bug 980: Use Bitsream class for JPEGDecoder (details)
  6. Cleanup imports TestGLReadBuffer01GL* (details)
  7. Bug 927: demos/es2/av/CrossFadePlayer (details)
  8. Match Bitstream changes of gluegen commit (details)
  9. Bug 927 - Multithreading (MT) issues libav/ffmpeg (details)
  10. Bug 927 - Multithreading (MT) issues ALAudioSink (details)
  11. ALAudioSink: Add thread-name to exceptions; stopImpl shall not throw an (details)
  12. Bug 927 - Multithreading (MT) - GLMediaPlayer.GLMediaEventListener: (details)
Commit e685f79ec7071e266a1bd3d3ce3e742397b5372e by Sven Gothel
Bug 927: Fix minor MT issues w/ libav/ffmpeg

Issue:
  [NULL @ 0x35bde60] insufficient thread locking around avcodec_open/close()

Decorating said libav functions w/ mutex lock/release.

Abstract impl. to either use pthread or JNI Monitor,
but using the latter to reduce dependencies (ming64 windows).

FFMPEGNatives is now an abstract class containing the
  'static final Object mutex_avcodec_openclose'
The file was modifiedsrc/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java (diff)
The file was modifiedsrc/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java (diff)
The file was modifiedmake/scripts/tests.sh (diff)
The file was modifiedsrc/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java (diff)
The file was modifiedsrc/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java (diff)
The file was modifiedsrc/jogl/native/libav/ffmpeg_tool.h (diff)
The file was modifiedsrc/jogl/native/libav/ffmpeg_impl_template.c (diff)
Commit d46d9ad8f998a7128d9f023294d5f489673d6d8a by Sven Gothel
Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Refine unit test for visual validation of 'no frame lag'

To validate whether a 'display' command w/o animator results to the desired frame
we introduce a 'userCounter' in TextRendererGLEL.

The latter gets increased and maybe visually validated by a key-press -> display.

Results: In all modes, MSAA or !MSAA, or flip - the result is valid.

Tested on windows and linux.
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00Base.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLJPanelAWT.java (diff)
Commit 41190c3830157abdf9649cbf7767e57108f55075 by Sven Gothel
Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Fix auto-swap mechanism ; Refined API doc getDefaultReadBuffer() ; Add GLDrawableUtil.swapBuffersBeforeRead(..)

Commit 82f679b064784213591b460fc5eaa1f5f196fbd1 which introduces the default swap-buffers
mechanism is erroneous:

The OffscreenBack backend requires the following operation order:

Order-1:
  [1] - GL display
  [2] - GL swapBuffers (always due to single-buffer non-MSAA or MSAA offscreen drawable)
  [3] - readPixels

+++

Commit 82f679b064784213591b460fc5eaa1f5f196fbd1 however introduced:

Order-2:
  [a] - GL display
  [b] - readPixels
  [c] - GL swapBuffers (always due to single-buffer non-MSAA or MSAA offscreen drawable)

since [a] and [b] happened in Updater's display method, and [c] followed the same
triggered by GLAutoDrawableHelper.

+++

The proof, commit d46d9ad8f998a7128d9f023294d5f489673d6d8a, is faulty,
since it always included the 'snapshot' GL event listener
which turned-off auto-swap and swapped before read-pixels.
TL;DR it enforced proper Order-1.

+++

This fix allows the Backend to intercept disable GLDrawableHelper's setAutoSwapBufferMode(..)
and perform the auto-swap mode itself in the proper Order-1.

The unit test has been refined to optionally disable the snapshot
to validate auto-swap mode.

+++

Refined GLBase and GLContext's API doc for 'getDefaultReadBuffer()'

+++

Add GLDrawableUtil.swapBuffersBeforeRead(..)
and reuse it for TileRendererBase (original impl.).
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLJPanelAWT.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/util/UITestCase.java (diff)
The file was modifiedsrc/jogl/classes/javax/media/opengl/GLBase.java (diff)
The file was modifiedsrc/jogl/classes/javax/media/opengl/awt/GLJPanel.java (diff)
The file was modifiedsrc/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java (diff)
The file was modifiedsrc/jogl/classes/javax/media/opengl/GLContext.java (diff)
The file was modifiedsrc/jogl/classes/com/jogamp/opengl/util/GLDrawableUtil.java (diff)
Commit b96fc594f15fcf9ee0fd238ce8d7a10aea781d32 by Sven Gothel
GLContextImpl/GLDrawableImpl.getDefaultReadBuffer(..): Pass hint whether dedicated read-drawable is being used (double buffering)
The file was modifiedsrc/jogl/classes/jogamp/opengl/GLDrawableImpl.java (diff)
The file was modifiedsrc/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java (diff)
The file was modifiedsrc/jogl/classes/jogamp/opengl/GLContextImpl.java (diff)
Commit ef2a1bf80f8afe9d9249a196d1842de0b74251a5 by Sven Gothel
Bug 980: Use Bitsream class for JPEGDecoder
The file was modifiedsrc/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java (diff)
Commit c6c04751a04bd05d71e54404fa61681c57d7352d by Sven Gothel
Cleanup imports TestGLReadBuffer01GL*
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLJPanelAWT.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java (diff)
Commit 37b57106f4ef6d64b38cd9cbfccfcf5f332b5525 by xerxes
Bug 927: demos/es2/av/CrossFadePlayer
Parallel media player that demonstrate CrossFade of audio volume during playback.
This player also demonstrate audio only playback of the GLMediaPlayer.

The CrossFadePlayer is a reproducer for
FFMPEGMediaPlayer libav multithreading initialization errors.
[NULL @ 0x7ff904065280] insufficient thread locking around avcodec_open/close()

reproducer:
java -cp gluegen/build/gluegen-rt.jar:jogl/build/jar/jogl-all-mobile.jar:jogl/build/jar/jogl-test.jar:joal/build/jar/joal.jar com.jogamp.opengl.test.junit.jogl.demos.es2.av.CrossFadePlayer *.mp3

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
The file was addedsrc/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/CrossFadePlayer.java
Commit dc67f891de5ef31ed8e0e83e7a53e4bdcd881d29 by Sven Gothel
Match Bitstream changes of gluegen commit 4447232af0d95a4348d09d4ed03fbef48394ca3a
The file was modifiedsrc/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java (diff)
Commit b9e89c35dac3c19e026d2a0161649a065b3dceee by Sven Gothel
Bug 927 - Multithreading (MT) issues libav/ffmpeg

FFMPEG Natives:

  - Move 'mutex_avcodec_openclose' to local static and initialize at initSymbols0

  - setStream0:
    - Add another locked mutex block around:
       - [ sp_avformat_open_input .. sp_avformat_find_stream_info ]

  This solves the issue of:

    [NULL @ 0x89d20c60] insufficient thread locking around avcodec_open/close()
The file was modifiedsrc/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java (diff)
The file was modifiedsrc/jogl/native/libav/ffmpeg_impl_template.c (diff)
The file was modifiedsrc/jogl/native/libav/ffmpeg_tool.h (diff)
The file was modifiedsrc/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java (diff)
The file was modifiedsrc/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java (diff)
The file was modifiedsrc/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java (diff)
Commit 13d850c7bf93648dc24e3f01f6f8c9550fba0d97 by Sven Gothel
Bug 927 - Multithreading (MT) issues ALAudioSink

Add global synchronization around ALAudioSink constructor code,
which 'magically' solves the openal-soft multithreading issues ..

This is a workaround.
The file was modifiedsrc/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java (diff)
Commit c4368e89c0fc3ee4de659cd760bc812092bba054 by Sven Gothel
ALAudioSink: Add thread-name to exceptions; stopImpl shall not throw an exception at destroy
The file was modifiedsrc/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java (diff)
Commit c67de337a8aaf52e36104c3f13e273aa19d21f1f by Sven Gothel
Bug 927 - Multithreading (MT) - GLMediaPlayer.GLMediaEventListener: Remind that commands shall be off-loaded on another thread!
The file was modifiedsrc/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/CrossFadePlayer.java (diff)
The file was modifiedsrc/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java (diff)
The file was modifiedmake/scripts/tests.sh (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java (diff)