Expand description
falcon’s fallback video decoder: FFmpeg, loaded at run time.
macOS plays mp4, mov and m4v through AVFoundation; Matroska, WebM, AVI,
WMV, FLV, Ogg, MPEG-TS and the rest go through FFmpeg instead, as Eagle
falls back to its bundled player. falcon never links FFmpeg: the shared
libraries are opened with dlopen when first needed (see ffi), so
falcon builds and runs without them and only the fallback is missing.
The libraries must be an LGPL build, decode and the atempo filter only,
such as the one scripts/build-ffmpeg.sh makes; any GPL or nonfree build
is refused.
probereads a file’s duration, size and tracks.Grabberdecodes single pictures, scaled, for previews;frame_atone picture at full size;thumbnailthe import thumbnail.Playerplays a file: worker threads decode ahead, the owner takes each frame when it is due, andAudioOutcarries the sound to the caller’s audio output, which drives the clock.Tempochanges the sound’s speed and keeps its pitch, as<video>does by default in Eagle’s main player.AudioFiledecodes a file’s sound alone, for audio players.
Modules§
- ffi
- The hand-written FFmpeg surface falcon uses, and the loader that opens the shared libraries at run time.
- sync
- The player’s timing rules, free of FFmpeg so they can be tested: the wall clock, the audio clock, the queue of decoded frames waiting to be shown, the arithmetic of timestamps and seeks, and the bookkeeping of sound stretched to another speed.
- testing
- Test clips for falcon’s own tests: AVI files written byte by byte, with
uncompressed BGR pictures and 16-bit PCM sound, so no encoder is needed
(falcon’s FFmpeg build has none) and every pixel’s value is known.
av1rewraps an AV1 stream encoded elsewhere in WebM, Matroska and MP4.
Structs§
- Audio
File - The best sound track of a file as interleaved stereo
f32at 48 kHz. - Audio
Out - The sound of a
Player: interleaved stereof32samples at [OUT_RATE], silence while paused or starved. It ends (returnsNone) once the player is dropped. Pull it from the audio output’s thread. - Error
- Why a file could not be opened or decoded.
- Frame
- A decoded picture:
width * heightRGBA pixels, rows top to bottom, fully opaque. - Grabber
- Decodes single pictures of one file, scaled to fit a size: for the seek bar’s hover thumbnail, the grid’s hover previews and thumbnails. Usable from any thread.
- Info
- What
probelearns about a file. - Player
- A playing file. Lives on the thread that draws it; dropping it stops
the workers and ends its
AudioOut. - Tempo
- Sound going through
atempoat one speed.
Constants§
- EXTENSIONS
- File extensions macOS can’t play that falcon hands to FFmpeg first: Eagle’s video formats outside mp4, mov and m4v (and the 360, afx, vap and eva camera formats, which go to macOS first).
Functions§
- available
- Whether FFmpeg was found and can be used.
- frame_
at - The picture at
secsat full size. - handles
- Whether files with extension
ext(any case) go to FFmpeg first. - probe
- The facts of a file with a video stream FFmpeg can decode.
- status
- Whether FFmpeg can be used, and which:
Okwith its version string and the folder it was loaded from. - thumbnail
- An import thumbnail: the picture where Eagle takes one
(
sync::thumbnail_time), or the first of a few later ones that is not black, at full size, with the file’s facts and the time used.