A capture backend the test drives byte by byte.
Stands in for ffmpeg under MuonTrap so that every event capture has to cope with — a frame split across reads, a truncated image, an unexpected exit status, a consumer falling behind — is a function call in the test rather than something to wait for and hope for.
Every operation is synchronous. feed/2 returns once the data message is in
the capture's mailbox, so a test can feed bytes and then assert on what came
out without a sleep anywhere in between.
It reports what the capture does to it — opening, acknowledging, asking to
stop, closing — to :report_to, which is a pid or a registered name.
It ships in lib, not test/support, so that camera drivers built on this
package can declare it as their backend in a test robot. A dependency's
test/support is never compiled. It is for tests only.
Summary
Functions
Returns a specification to start this module under a supervisor.
Report that the captured process exited with status.
Deliver data to the capture as one read.
Deliver each binary in turn as a separate read.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Report that the captured process exited with status.
Deliver data to the capture as one read.
Deliver each binary in turn as a separate read.