Documentation
¶
Overview ¶
Package ffmpegtest lets a test binary stand in for ffmpeg and ffprobe. A TestMain calling Main acts as the child env names when it is set; Path is the binary a test's Runner runs, and OnPath puts it on PATH.
Index ¶
- Constants
- func Calls(t testing.TB) func(call Call) int
- func FloodAt(i int64) byte
- func FromVideoCalls(dir string, call Call) (int, error)
- func Main(m *testing.M)
- func OnPath(t testing.TB, names ...string)
- func Path() string
- func Use(t testing.TB, b string)
- func UseFor(t testing.TB, call Call, b string)
- func UseSpeech(t testing.TB, spans []subsync.Span, durationMs int64)
- func WriteSpeech(path string, spans []subsync.Span, durationMs int64) error
- type Call
Constants ¶
const FloodBytes = 1 << 30
FloodBytes is how much "stderr-flood" writes to stderr.
Variables ¶
This section is empty.
Functions ¶
func Calls ¶
Calls records every child t starts from now on and returns a count of those making call.
func FloodAt ¶
FloodAt is the byte "stderr-flood" writes at offset i, so a test can rebuild any part of the stream.
func FromVideoCalls ¶
FromVideoCalls counts the calls of kind call that "from-video" logged in dir.
func Main ¶
Main runs the tests, or acts as the child when Use or UseFor set a behaviour: its call's, else the one for every call.
func OnPath ¶
OnPath sets PATH to a directory holding this test binary under each of names ("ffmpeg", "ffprobe") and nothing else, for code running a zero Runner; with no names, no binary resolves.
func Use ¶
Use makes the children t starts act as b, a behaviours entry. A child given a file: argument other than the runner's fd 3 exits 2.