[osg-users] ...movie plugin unloads when every movie in the scene is released...

Stephan Huber ratzfatz at digitalmind.de
Sat Jul 28 13:45:52 PDT 2007


alessandro terenzi schrieb:
> Hi,
> I don't know if what I experienced is the desired behaviour or a 
> little mistake, anyway here is what happens:
>  
> I'm trying to manage many movies in my application, so, in order not 
> to waste resourses, I release ImageStreams when the corrensponding 
> movie is not visible...(in this way the corresponding thread is 
> killed... if I'm not wrong).
>  
> Later, as soon as I realize that the movie should be visible again, I 
> re-load the movie and re-create the ImageStream ...everything works 
> fine if at least one movie remains visible but, when I release ALL the 
> ImageStreams and movies, if I try to re-load one movie again, I got an 
> error that says that the corrensponding plugin is not initialized ... 
>  
> Why is there such a behaviour? Should I reload the plugin manually? Is 
> this the expected behaviour or maybe is there something wrong?
You spotted a bug in the quicktime-plugin.

The quicktime-plugin tracks all instances of quicktime movies. If all 
quicktime movies got deallocated, a call is made to deinitialize the 
quicktime media layer. This is done to prevent a crash on exit. You 
can't deinitialize the quicktime media layer when unloading a dll on 
windows, so we deinitialize the qtml- when no movie is allocated.

So what's going wrong on your side: the quicktime-layer does not get 
reinitialized when you open a new movie, there's a bug in the 
corresponding code. Please replace the QTUtils.cpp file in 
src/osgPlugins/quicktime and do a recompile. If the new code fixes your 
problem then I'll send it to osg-submissions so it gets added to svn. I 
have no windows machine here, so I can't test the code.

the quicktime pugin needs a complete rewrite. But I'm too busy with 
other tasks, so this has to wait.

cheers,
Stephan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QTUtils.cpp.zip
Type: application/zip
Size: 1447 bytes
Desc: not available
Url : http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070728/7f4dae9d/attachment.zip 


More information about the osg-users mailing list