Skip to main content

Detecting player capabilities

6 replies [Last post]
Joined: 2009-11-16

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.
Joined: 2009-11-16

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

Joined: 2007-09-03

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 ?


Joined: 2004-02-13

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 à . 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


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 à -- 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 à Les résultats sont plus intéressants sur un vrai joueur Blu-ray!

Bonne recherche,


=== 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 . The animation loop is described under "Animation Framework Overview"; two steps there are interesting for measurement:

Advance the model to the next frame


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 - 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 The results derived from a real Blu-ray player are more interesting than these!

Wishing you success in your researches,


Joined: 2008-02-24

Hi! cbonniot,

PSR31 indicates player's some capabilities and performace.


Joined: 2007-01-18


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).


Joined: 2009-11-16

No one can help me ?