webcam icon indicating copy to clipboard operation
webcam copied to clipboard

Add support for unbuffered streaming

Open rilendorf opened this issue 3 years ago • 1 comments

When using uncompressed formats its impossible to use the library on devices with little ram. E.g. a Raspberry Pi

rilendorf avatar Sep 23 '22 12:09 rilendorf

We (gostream) also need support for an unbuffered stream, though, for different reasons. We depend on mediadevices which in turn depends on this library for its linux implementation (see camera_linux.go). mediadevices calls camera.SetBufferCount(1) when opening a camera and later camera.ReadFrame() to get a frame from that camera. Because camera.ReadFrame() returns the last frame in the buffer we always get a stale image. Setting camera.SetBufferCount(2) gives us two stale frames and so forth. Is there currently a way to get the current frame from camera.ReadFrame() rather than a previously buffered image?

bazile-clyde avatar Oct 24 '22 18:10 bazile-clyde