|[hatari-devel] Re: Threading PNG saving in AVI recording|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On tiistai 16 huhtikuu 2013, Anders Eriksson wrote:
> For recording perfomance, the PNG saving would be wonderful to spread out
> on multithreading. PNG saving is by far the most costly during recording
> and all cores except one are idle.
That's a good idea.
Best place to drive that thread seems to b Avi_RecordVideoStream()
However, you need to:
* take a copy of the screen contents before calling the PNG saving
(and giving the copied surface for that), otherwise it's not correct
for rest of Hatari to proceed (and update screen contents) in
* use locking to serialize that operation.
* use (same) locking to prevent rest of the AVI recording functionality
from writing to the file before PNG frame is finished, at least in:
If Audio is written right before PNG data, instead of right after,
this may actually speed up things, instead of just complicating
Tested patches for this are welcome! :-)