RR and QT (was Re: Speed of RR vs SuperCard)

livfoss at blueyonder.co.uk livfoss at blueyonder.co.uk
Sun Apr 13 05:15:01 EDT 2003

On Fri, 11 Apr 2003 14:29:13 -0800, Richard Gaskin <ambassador at fourthworld.com> wrote:

>QT is an event loop hog, widely known for requiring the majority of
>processor cycles while active.  If you think about what it needs to do under
>the hood (parsing the file to grab a frame, decompress the frame, display
>the frame -- a dozen or two dozen times every second, all while handing off
>the event cue to the host application, the OS, and any other open program),
>it's easy to appreciate what it's going through.

>Have you been able to perform the same action in any other scripting tool?

Well, no...

>I can't think of a tool that can dynamically mask QT while it's playing and
>allow drag it around on the screen.  Maybe with the G5 and a lot of RAM, but
>I'd be surprised to see that done gracefully even in a more formal language.

Well, I do understand at least intuitively what kind of stuff is going on while QT runs a movie (or any activity) - that's why I only try to allow the user to drag **stopped** movies. I reasoned that this would be no different for RR than moving an image object, since the movie mechanism itself would be suspended - in effect the key frame became a simple image in my idea of what was going on. Sadly this is clearly not the case. AFAIK the unique issue with RR is the fact that the buffered version of a player object ignores the masking, so you get no transparent areas. I am not sure why this decsion was made.

>Your approach in hiding and showing the player seems optimal.

Yes, it suffers only from the fact that when the movie stops, what the user sees may not be what my proposed 'pseudo key frame' looks like. In the application I'm working on now this doesn't matter much, but in principle it could matter a lot if different parts of the movie are very different (a talking head being replaced by a landscape, a static frame being replaced by some image of rapid motion etc). I don't know a way of quickly extracting the last frame to be shown and using that as an image, although I see that it might be possible, perhaps via screen shot.

Thanks anyway for the good advice (as ever).


Graham Samuel / The Living Fossil Co. / UK & France

More information about the Use-livecode mailing list