FFmpegError
Every KiteFFmpeg failure surfaces as FFmpegException wrapping a typed FFmpegError.
The hierarchy maps the raw AVERROR_* codes onto semantic categories so callers can react without decoding negative errno math:
try { Transcoder.transcode(...) } catch (e: FFmpegException) {
when (e.error) {
is FFmpegError.FileNotFound -> promptForFile()
is FFmpegError.EncoderNotFound -> fallBackToSoftwareEncoder()
is FFmpegError.InvalidData -> reportCorruptInput()
else -> log(e.error.code, e.message)
}
}Every subclass keeps the raw code in code (0 for Internal), so nothing is lost by the classification; unmapped codes surface as AvError.
Inheritors
Types
Any AVERROR_* code without a dedicated category above.
The bound FFmpeg build has no such decoder (AVERROR_DECODER_NOT_FOUND).
No demuxer recognizes the input (AVERROR_DEMUXER_NOT_FOUND).
The bound FFmpeg build has no such encoder (AVERROR_ENCODER_NOT_FOUND).
End of file/stream surfaced as an error (AVERROR_EOF). Rare, loops consume it.
Input path does not exist (AVERROR(ENOENT)).
The bound FFmpeg build has no such filter (AVERROR_FILTER_NOT_FOUND).
The linked FFmpeg runtime does not match the headers KiteFFmpeg's C layer was compiled against, so KiteFFmpeg refused to use it.
Library-internal invariant failure, not an FFmpeg return code.
The call was interrupted through MediaSource.interrupt (AVERROR_EXIT).
Invalid parameter combination rejected by FFmpeg (AVERROR(EINVAL)).
Corrupt or unrecognized bitstream/container data (AVERROR_INVALIDDATA).
Generic I/O failure (AVERROR(EIO)).
No muxer for the requested output format (AVERROR_MUXER_NOT_FOUND).
Unknown codec/format private option (AVERROR_OPTION_NOT_FOUND).
Native allocation failure (AVERROR(ENOMEM)).
Filesystem permission denied (AVERROR(EACCES) / AVERROR(EPERM)).
No protocol handler for the URL scheme (AVERROR_PROTOCOL_NOT_FOUND).
Requested stream does not exist (AVERROR_STREAM_NOT_FOUND).
Feature not implemented in FFmpeg (AVERROR_PATCHWELCOME).