Struct ndk::media::media_codec::AsyncNotifyCallback
source · pub struct AsyncNotifyCallback {
pub on_input_available: Option<InputAvailableCallback>,
pub on_output_available: Option<OutputAvailableCallback>,
pub on_format_changed: Option<FormatChangedCallback>,
pub on_error: Option<ErrorCallback>,
}
media
only.Fields§
§on_input_available: Option<InputAvailableCallback>
Called when an input buffer becomes available.
The specified index is the index of the available input buffer.
on_output_available: Option<OutputAvailableCallback>
Called when an output buffer becomes available.
The specified index is the index of the available output buffer. The specified
BufferInfo
contains information regarding the available output buffer.
on_format_changed: Option<FormatChangedCallback>
Called when the output format has changed.
The specified format contains the new output format.
on_error: Option<ErrorCallback>
Called when the MediaCodec
encountered an error.
The specified ActionCode
indicates the possible actions that client can take, and it can
be checked by calling ActionCode::is_recoverable
or ActionCode::is_transient
. If
both ActionCode::is_recoverable
and ActionCode::is_transient
return false
, then
the codec error is fatal and the codec must be deleted. The specified detail string may
contain more detailed messages about this error.