Skip to main content

Pause using DirectDraw

4 replies [Last post]
Anonymous

We are evaluating the capabilities of the BD-J platform and have written a test app that displays simple animations traveling around the screen over a static background. Using a normal "paint" loop, we can achieve around 50 fps with relatively smooth updates. Using DirectDraw, we can achieve around 70 fps but every 7 to 10 seconds, there is a pause of about .25 to .5 seconds where all video updates stop. Even with sleeps or a fixed, lower framerate this occurs. I don't believe this is a garbage collection issue (but it's still possible). Does anyone have any ideas on what could be happening? As a side note, this issue does not appear on the PC-based player (though it could be but it's not visible), just on the actual hardware.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
veritastr
Offline
Joined: 2008-11-24

i have same problem on ps3 with direct draw. any ideas on what it could be?

jaya_h
Offline
Joined: 2005-07-11

One option is to use a profiler to get a better understanding of overall performance of your application.

Have you tried this?
https://hdcookbook.dev.java.net/profiler.html

The profiler itself is built to be light weight there by not adding to the application's garbage. You will have to manually insert the timers in your application as shown below.

http://hdcookbook.dev.java.net/javadocs/grin/javame/com/hdcookbook/grin/...

Also, here is a description about visualizing the profiler result:

http://blogs.sun.com/jaya_hangal/

-Jaya

agentike
Offline
Joined: 2009-11-08

Hi,

I'm about to use the Profiler but I have a problem getting the data from the animation framework. When I use the Grinviewer I get all the data but in my PowerDVD I only get Packages that I send myself using Profile.sendMessage(..)
How can I get it to work in the Player too?

Best Regards

Christian

billf
Offline
Joined: 2004-02-13

Profiling is probably just turned off. You can turn it on by changing the constant values in com.hdcookbook.grin.util.Debug. Make sure you modify the right version of this class -- the build uses different source for this class depending on the settings. If you're using GrinXlet, you want one of these two:

billf@~/java.net/hdcookbook/xlets/GrinXlet$ find . -name Debug.java -print
./src/debug/com/hdcookbook/grin/util/Debug.java
./src/deploy/com/hdcookbook/grin/util/Debug.java