dschreij / media_player

Plug-in to play movies for the Experiment builder OpenSesame
http://www.cogsci.nl/opensesame
Other
1 stars 1 forks source link

[minor] Temporary file cleanup issue #1

Closed smathot closed 13 years ago

smathot commented 13 years ago

It appears that video files are not released and as a result the file pool is not cleanup when opensesame is closed (the files cannot be deleted because Windows thinks they are being used). This leads to a lot of residue in the temp folder.

If you add a function to the experiment.cleanup_functions list, it is automatically executed when the experiment terminates. So something like this should fix it:

def release_video_file(self):

Do something to release the video file

....

def prepare(self): self.experiment.cleanup_functions.append(self.release_video) ...

dschreij commented 13 years ago

This error is now fixed: the video and audiostreams are now properly closed in the clean-up function thereby releasing the video files