Forum Discussion
kbenson
15 years agoVisitor
Hmm, can you keep the messageport separate, so you can implement the event loop outside of the video creation?
E.g.
I imagine there might be a problem with the video object being reclaimed by the garbage collector before it's entirely finished closing (not sure if it blocks until complete), in which case you would want to assign it to a variable called oldvideo or something before reassigning it.
E.g.
mp = CreateObject("roMessagePort")
video = StartVideoFunc(options, mp)
while true
message = wait(1000,mp)
if NewVideoConditionMet()
video.close()
video = StartVideoFunc(newoptions, mp)
end if
end while
I imagine there might be a problem with the video object being reclaimed by the garbage collector before it's entirely finished closing (not sure if it blocks until complete), in which case you would want to assign it to a variable called oldvideo or something before reassigning it.