Dear all,
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. Anand |
Administrator
|
Hi
Have you tried to use that? http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/util/av/package-summary.html
Julien Gouesse | Personal blog | Website
|
Dear sir,
Thanks for your reply.... No I am not used this interface... Please Let me know how I can use this interface class in my GLJpanel and is it will meet the requirement of multithreaded fps rate. Anand |
Administrator
|
There is a full example here:
https://github.com/sgothel/jogl/blob/master/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java You can use a GLMediaPlayer player instance per canvas. Use GLJPanel only if you can't use GLCanvas or GLWindow in your case.
Julien Gouesse | Personal blog | Website
|
Dear sir,
I will try to use this package you mentioned later. What I want to clear from you guys is, whether JOGl works like multithreaded or single threaded for multiple GLJpanel instances. Anand |
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). Anand |
Administrator
|
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). 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. [1] 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. [2] 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 [1]. 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 .. ~Sven > > Anand signature.asc (907 bytes) Download Attachment |
Dear Sven, Thanks for your guidelines. 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. Anand |
Free forum by Nabble | Edit this page |