1 | initial version |
When you record a stream, images are record only if you use the operator<<. Therefore, use a flag:
if(recording==true)
myrecorder << myimage;
Simply change the value of the flag when you want to record images. But initialize ``myrecorder'' before of course.