Just for the record, I kind of solved this problem.
Instead of sharing actual Movies, you share QT TimeBase's. So for each
movie you are multiplying, you have a master movie, that you take the
TimeBase from, using GetMovieTimeBase, and then you apply this to all
the slave movies. Then the system doesnt have to waste resources trying
to control all the movies at once, as the the master movie ticks
through, it pulls all the slaves along with it, and keeps them perfectly
synced in the process.
There's an ancient article here describing the process:
You then render the frames in the usual way with
QTVisualContextIsNewImageAvailable and QTVisualContextCopyImageForTime.
The reduced overhead involved in not processing these duplicated movies
was considerable enough to get things running nice again.
Joe Baskerville wrote:
Hi list,
I have a problem with playing multiple quicktime movies across multiple
monitors.
I have an app that renders a list of compositions which I duplicate
across 4 monitors being driven from 4 graphics cards. Each display uses
glViewport to render a different view of these compositions so the whole
scene gets tiled properly across the screens.
This all is working fine. The problem comes when the compositions need
to show frames from quicktime movies. I've been using the Image with
Movie patch to show the movie frames, which is fine, but when the number
of movies gets above 1 or 2, the perfomance drops, due to the fact that
the app now has to deal with 8 movies instead of 2.
So I've been playing around with the possibility of sharing movies
across the 4 virtual screens. Following the many examples of how to
render Quicktime into opengl space, I can create a
QTOpenGLTextureContext per movie, get frames from the movie as textures
using QTVisualContextIsNewImageAvailable and
QTVisualContextCopyImageForTime, and pass them into QC fine. But only if
I load 1 movie per visual context. This leaves me in the same position
as before.
If I create an opengl context which I share with all of my virtual
screen contexts, I can create a QTOpenGLTextureContext per screen for
each movie. Then when each screen needs to render a movie frame, I can
call SetMovieVisualContext to switch the movie's visual context to the
correct one. This works, but the overhead in switching
QTOpenGLTextureContexts slows it to a crawl.
So does anybody have any ideas of the best way to do this?