It seems that "in their great wisdom", Apple decided to handle movie drawing
differently from everything else.
If I have a movie in my window and I dispose of it and then immediately draw
a photo in that space, the movie is still overlayed over the photo even
though it should have been erased. What's worse, it doesn't go away at all.
I found I have to move the movie and its controller somewhere off the
window (negative coordinates) before I dispose of the controller. This
will cause the window in question to be updated twice: first the picture
is drawn underneath the movie, then a second update event is generated
for where the movie used to be and the picture is again drawn over the
movie.
The window contents ends up updating correctly, but having to draw the picture
twice over the movie is of course slowing things down. Overall, the effect
is as if I had a movie window floating over the main window, then the
contents of the main window was changed and the movie window was closed.
Has anyone found a good solution to this problem?
--
Juri Munkki jmu...@iki.fi What you see isn't all you get.
http://www.iki.fi/jmunkki Windsurfing: Faster than the wind.
I found a solution (although the code still looks a bit kludgey in places):
I used to dispose of the movie within BeginUpdate and EndUpdate. Moving
the movie disposal & creation outside BeginUpdate manages to merge the
update event generated by the disposal into the current update event and
thus removes the double update.
The remaining kludge is related to EraseRect and EraseRgn. For some
reason, calling EraseRect works OK when erasing a large movie to make
space for a smaller one (when you resize a movie for instance), but
calling EraseRgn is a no-op. I think I smell a patched Quickdraw call
somewhere in there...
Normally Cameraid will only erase the difference between the previous
photo and the new one. This saves time and eliminates flicker. With
QT movies, the whole frame is erased with EraseRect, but magically
if there's a movie there before the erase, it doesn't flicker or get
erased...
Hi ya;
Another thing to consider is if Hardware acceleration is being used, in
which case the problem may be that your video is being displayed using
Hardware Overlay. Any video that can be displayed using YUV like
Component Video, DV, MPEG, Sorenson, MJPEG etc. will have the video
overlayed in the Graphics cards hardware.
So the double update might be neccessary because of the YUV hardware
overlay. Yo might want to try displaying movies that are RGB only (NONe
or Animation codecs) and see if they are treated differnetly.
Just a thought..
Milton