Class FfmpegException
- All Implemented Interfaces:
Serializable
That is the point of it. A native decoder handed a malformed file has two ways to react: it can dereference something the file said was there and take the whole virtual machine down with it, or it can check and report. Nothing below this class ever does the first, so a truncated container, a header claiming an impossible size, a codec this build was not compiled with and a stream that changes resolution halfway through all reach Java as this exception, thrown on the thread that asked.
Unchecked, because that is the shape the SPI publishes: VideoDecoder.openStream and
VideoStreamSource.readFrame both document a RuntimeException for a stream that
cannot be opened or decoded, and a decode thread carrying a checked exception would have
nowhere to put it.
The message names what was being attempted and, where FFmpeg supplied one, its own description of the failure. There is no error code and nothing to branch on: a caller either shows the message or shows a poster.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFfmpegException(String message) FfmpegException(String message, Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
FfmpegException
- Parameters:
message- what was being attempted, and what went wrong with it
-
FfmpegException
- Parameters:
message- what was being attempted;causeis what it failed on
-