I am newbie to JOGL and working on MAC for video rendering. Please help me out to solve below problems.
I am using JOGL for video rendering of multiple videos simultaneously using GLJPanel on MAC OSX. I am using FPSAnimator for frame rate control. If I set 30fps for FPSAnimator, it will work perfectly for single video playback. But for multiple videos rendering simultaneously, it is working like single threaded and FPSAnimator not achieving set frame rate. For ex: for 4 videos, maximum frame rate I can achieve is 20fps and for 8 videos, I can achieve 10fps. Looking like it is workng as single threaded, not as multithreaded. Please help me out, how I can solve this issue to make JOGL work as multithreaded on MAC OSX to get approximate set fps for each video.
I am using exported jar from eclipse to XCode and through XCode I am running the project using MAC JVM framework.
Why I asked this above question is. I have done timing tests for single video and multiple videos playback. The display function of each GLJPanel instance is not calling as per the frame rate. Too much delay is there between two consequent display function calls (If nothing is drawing inside display function) and this will be fine for one video and as number of video GLJPanel instanes increases, this is not maintaing frame rate as per single GLJPanel instance. So I need to solve this issue first, otherwise I can't use JOGl in my application (Because I am using MDI window with embedded JInternalFrame).
On 09/11/2012 01:26 PM, anandcta123 [via jogamp] wrote:
> Dear sir,
> Why I asked this above question is. I have done timing tests for single video
> and multiple videos playback. The display function of each GLJPanel instance
> is not calling as per the frame rate. Too much delay is there between two
> consequent display function calls (If nothing is drawing inside display
> function) and this will be fine for one video and as number of video GLJPanel
> instanes increases, this is not maintaing frame rate as per single GLJPanel
> instance. So I need to solve this issue first, otherwise I can't use JOGl in
> my application (Because I am using MDI window with embedded JInternalFrame).
Even though I would use NewtCanvasAWT w/ a NEWT GLWindow,
which operates w/ less overhead when it comes to rendering
due to GLJPanel / Swing offscreen compositor and AWT threading restrictions,
you can use GLJPanel ...
The issue you describe here looks more like an unclear threading
and multi-buffering implementation.
 I would implement a movie player having one thread producing
2 or more Textures in a sequence and sending notifications to
the OpenGL display thread, your ordinary animator.
This would require you to use 2 shared OpenGL context.
 The Texture maybe YUV based and the OpenGL display thread may convert
them on the fly using shaders.
Note: Our FFMPEGMediaPlayer implementation of GLMediaPlayer is currently
single threaded not using the above optimization w/ 2 threads .
The Android based GLMediaPlayer impl. utilizes multi threading.
Both use YUV shader conversion.
Again - this problem has really nothing todo w/ JOGL,
but more w/ media player architecture and implementation.
See the demos ..
My media player architecture is like this on MAC. I am using JDesktopPane with JInternalFrame (MDI window) and using GLJPanel for each JInternalFrame. So that JInternalFrame having one GLJPanel instance and one FPSAnimator instance. I know only using this much, I don't know how internally it is dealing with OpenGL.
I want to know, whether rendering each video in different window causes this threading issue. Please suggest me how to implement my media player for multiple video display simultaneously with proper frame rate (For me fps is very much important factor).
Also is it possible to implement MDI concept window using NewtCanvasAWT w/ a NEWT GLWindow.