-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Milestone
Description
It is extremely funny that the go4vl library advertises "zero-copy IO using memory mapped buffers" and yet explicitly calls copy() on each frame.
I think this can be remedied:
- Do not call
Start()at all. Instead, callInitBuffersandMapMemoryBuffersmanually, by creating a customFrameAllocatorthat does this and using that frame allocator for the v4l source - The frame forwarder should be modified to allow more than one frame to be in the "writing" state
- The number of allocated frames should be split in two: some frames in the v4l writing queue (
Nw), and some frames available for readers (Nr) - On source startup, get
Nwframes from the frame forwarder for writing and enqueue them into v4l - On each dequeue, call
FinishedWritingon the frame, get a new frame for writing and enqueue it
This would basically be a zero-copy, sequential rewrite of the current v4l stream loop that should be much faster
Metadata
Metadata
Assignees
Labels
No labels