Skip to main content

Detecting player capabilities

6 replies [Last post]
cbonniot
Offline
Joined: 2009-11-16
Points: 0

Hi everybody,

I would like to know if there is a way to detect the performances of a player. I have to do animations and according to the performances of the player, the animations will be more or less elaborate.

I'm sorry if my English is bad but I'm French, I'm warning you :).

Thank you for your help.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cbonniot
Offline
Joined: 2009-11-16
Points: 0

Thanks to both of you, i'll try this !

terymas
Offline
Joined: 2007-09-03
Points: 0

La PSR 31 ne te donnera que la version du profil...
Que cherches-tu à faire ?

And for the no french people :

With the PSR 31 you can get the profile version...
What are you trying to do ?

tery

billf
Offline
Joined: 2004-02-13
Points: 0

S'il s'agit d'une question des performances animations, je suggerais de faire une animation, et de mesurer le résultat. Voir par exemple, com.hdcookbook.grin.animator.DirectDrawEngine, et l'explanation de l'algorithme à https://hdcookbook.dev.java.net/javadocs/grin/javame/com/hdcookbook/grin... . Le boucle d'animation est décrit sous "Animation Framework Overview"; il y a deux étapes intéressants pour la measurement:

Avancer le modèle au prochaine frame

et

si l'animation est à l'heure, pour chaque AnimationClient c dis a c que nous sommes à l'heure

Ça corresponed à AnimationClient.nextFrame() et AnimationClient.setCaughtUp(). Avec ces deux mèthodes, on peut détecter si l'animation soit trop lourd. Par example, si on met le DirectDrawEngine à 24fps, et que le logiciel detecte plusiers appels nextFrame() pour chaque setCaughtUp(), cela vaut que la bécane Blu-ray n'attient pas le 24 fps, et il faut donc diminuer soit la vitesse d'animation, soit la taille.

cf. aussi les outils de mesurement situes à https://hdcookbook.dev.java.net/profiler.html -- la, il y a un profiling du boucle d'animation, avec le modèle en bleu, et les opérations graphiques en orange, magenta et vert (grande image à https://hdcookbook.dev.java.net/images/profile_grinbunny_5_4_to_5_8.png). Les résultats sont plus intéressants sur un vrai joueur Blu-ray!

Bonne recherche,

Bill

=== and for those who aren't fans of the Grey Cup Champion Alouettes de Montréal (go Als!):

If it's a question of animation performance, I'd suggest running an animation, and measuring the result. See, for example, com.hdcookbook.grin.animator.DirectDrawEngine, and the explanation of the algorithm at https://hdcookbook.dev.java.net/javadocs/grin/javame/com/hdcookbook/grin... . The animation loop is described under "Animation Framework Overview"; two steps there are interesting for measurement:

Advance the model to the next frame

and

If the animation isn't behind, for each AnimationClient c say to c that we're caught up

That corresponds to AnimationClient.nextFrame() and AnimationClient.setCaughtUp(). With those two methods, one can detect if the animation is too demanding. For example, if one sets the DirectDrawEngine to 24fps, and your program detects several calls to nextFrame() fore each setCaughtUp(), that means the Blu-ray player isn't delivering 24 fps, and you need to either decrease the animation rate, or the amount being animated.

See also the measurement utilities found at https://hdcookbook.dev.java.net/profiler.html - there you'll find a profiling run of the animation loop, with the model updates in blue, and the drawing operations in orange, magenta and green (big image at https://hdcookbook.dev.java.net/images/profile_grinbunny_5_4_to_5_8.png). The results derived from a real Blu-ray player are more interesting than these!

Wishing you success in your researches,

Bill

flat8
Offline
Joined: 2008-02-24
Points: 0

Hi! cbonniot,

PSR31 indicates player's some capabilities and performace.

flat8

utuk
Offline
Joined: 2007-01-18
Points: 0

Hello,

If you are going to use FrameAccurateAnimation class to create animations getCompletedFrameCount() method which could be used as player's performance analyzer. If the number of completed frames for started FrameAccurateAnimation is too low then the animation probably should be updated (images size, frames number reduced etc).

Thanks,
Andrew

cbonniot
Offline
Joined: 2009-11-16
Points: 0

No one can help me ?