Hi Valary,
ImageStream is updated by a background thread. The xine-lib and
QuickTime plugins both subclass
from ImageStream and OpenThreads::Thread to provide a class that
automatically runs updates on
itself - this thread updates the image data on the ImageStream and
then calls dirty to tell
Ok, but there are next difficulty: I use function setImage for setting
new image in my thread, and this function deletes old image when it sets
new image. Therefore if updating thread updates image while main thread
updates texture then... segmentation fault.
In this case I must not to delete old
Hi Valary,
Don't use setImage from within your frame loop until you are switching
between some fixed memory like the xine-lib plugin does.
It's better to update the data stored in the Image directly and call
dirty, or to allocate the image memory separately and disable the
deletion of the data
3 matches
Mail list logo