B
Ben Jeurissen
Hello,
I have to deal with the following issue in C++:
Two threads are started from the main thread, both capturing images from
a different firewire camera. Both threads take shots of 460800 bytes at
a rate of 30 frames per second. This works fine, without frame loss, and
I can display the two framestreams on screen.
Now I would like to write these frames to my disk too (2 10000rpm in
striping mode raid), but my first naive attempts (just writing the
images to disk image by image), causes the fwrite()'s to block after a
while. What appraoch is suitable for this kind of problem? Is there some
sort of "pattern" for it? Some buffering strategy which avoids those blocks?
(The images don't actually have to be saved as individual files on disk,
they can be written in lager blocks and separated later (whitout having
to worry about the 30 frames per second constraint).)
Any advice greatly appreciated.
Ben
I have to deal with the following issue in C++:
Two threads are started from the main thread, both capturing images from
a different firewire camera. Both threads take shots of 460800 bytes at
a rate of 30 frames per second. This works fine, without frame loss, and
I can display the two framestreams on screen.
Now I would like to write these frames to my disk too (2 10000rpm in
striping mode raid), but my first naive attempts (just writing the
images to disk image by image), causes the fwrite()'s to block after a
while. What appraoch is suitable for this kind of problem? Is there some
sort of "pattern" for it? Some buffering strategy which avoids those blocks?
(The images don't actually have to be saved as individual files on disk,
they can be written in lager blocks and separated later (whitout having
to worry about the 30 frames per second constraint).)
Any advice greatly appreciated.
Ben