Re: Request for function

"Gerard Juyn" <gjuyn-qWit8jRvyhVmR6Xm/[email protected]> Sat, 21 Feb 2004 09:47:06 +0100
Newsgroups gmane.comp.graphics.mng.general
Organization Triple-T
Message-ID <4037291A.28697.123401AB@localhost>
Yup. And if you handle the processterm() callback, you'll know what the 
author intended for the maximum number of loops.

But please be aware that this way you effectively cripple playback of more 
advanced MNG's. Eg. the ones that contain LOOP-ENDL constructs. Tho it will 
be functional for anything that's been created from an ani-GIF, it will fail on a 
fair bit of the MNG testsuite.

If you want to stop playback after 1 full run, set the processmend() callback. 
This is always called just before the MNG loops back to the beginning (if a 
TERM was present of course).

Again there's a little caveat with certain MNG's, but they are far less about 
(actually none to my knowledge right now...). The LOOP-ENDL construct also 
allows for an infinity number, which effectively means the LOOP will be run 
until the program ends. Eg. the processmend() callback will never be reached!
SO if you want to catch these sob's, you'll have to keep an internal track of 
the amount of frames having been displayed, and call it quits if a certain (high) 
amount is reached. This situation may be useful to add a callback function for, 
which is called only if an "infinit" LOOP is encountered, and allows the app to 
actually set a more useful number (eg. 1).

> I don't know if that helps, but if you set mng_set_cacheplayback to
> FALSE, it won't loop at all, but will just stop after the last frame.
> 
> Markus
> 
> Am Sam, den 21.02.2004 schrieb Alexander Opitz um 03:51:
> > Hi,
> > 
> > i need a function like
> > 
> > mng_uint32 mng_get_totalloops(mng_handle) // returning total loops of
> > the mng
> > 
> > So I know how much loops are done and I can stop the mng after one
> > loop. (It's one of the mozilla animation option) it will be like
> > "mng_get_currentframe div mng_get_totalframes" but for this I must
> > undef MNG_NO_CURRENT_INFO and you know for mozilla codesize matters
> > *argl*
> > 
> > Greetings Alex//


--
Send the message body "help" to [email protected]