#[non_exhaustive]pub enum OpenEncoderOperationError {
FrameSideDataCloneError(OpenEncoderError),
ChannelLayoutCopyError(OpenEncoderError),
CodecOpenError(OpenEncoderError),
CodecParametersError(OpenEncoderError),
UnknownFrameFormat,
SettingSubtitleError(OpenEncoderError),
HwSetupError(OpenEncoderError),
ContextAllocationError(OpenEncoderError),
NoFramesReceived,
UnsupportedMediaType,
ThreadExited,
}Expand description
Errors from opening and configuring an encoder.
Variants carrying an OpenEncoderError embed the mapped FFmpeg error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FrameSideDataCloneError(OpenEncoderError)
Returned when cloning frame side data into the encoder context fails.
ChannelLayoutCopyError(OpenEncoderError)
Returned when copying the audio channel layout into the encoder context fails.
CodecOpenError(OpenEncoderError)
Returned when opening the encoder fails (avcodec_open2).
CodecParametersError(OpenEncoderError)
Returned when exporting encoder parameters to the output stream
fails (avcodec_parameters_from_context).
UnknownFrameFormat
Returned when the format of the frame to encode is unknown.
SettingSubtitleError(OpenEncoderError)
Returned when configuring subtitle encoding parameters fails.
HwSetupError(OpenEncoderError)
Returned when setting up hardware acceleration for the encoder fails.
ContextAllocationError(OpenEncoderError)
Returned when allocating the encoder context fails
(avcodec_alloc_context3).
NoFramesReceived
Returned when the frame stream ends (EOF or upstream disconnect) before the encoder received any frame, so the encoder was never opened.
UnsupportedMediaType
Returned when the stream’s media type cannot be encoded (not video, audio, or subtitle).
ThreadExited
Returned when spawning the encoder thread fails, so the encoder never started.
Trait Implementations§
Source§impl Debug for OpenEncoderOperationError
impl Debug for OpenEncoderOperationError
Source§impl Display for OpenEncoderOperationError
impl Display for OpenEncoderOperationError
Source§impl Error for OpenEncoderOperationError
impl Error for OpenEncoderOperationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()