#[non_exhaustive]pub enum FrameDefect {
Show 70 variants
UnknownEnvelopeCodec {
fourcc: u32,
},
Layout(LayoutDefect),
ImageDimension {
codec: ImageCodecKind,
dimension: ImageAxisKind,
length: usize,
maximum: usize,
},
MetadataMissingTerminator,
MetadataInteriorNul,
MetadataNullData,
NullVideoData,
NullAudioData,
AudioMisaligned,
EmptyAudioHasData,
V210Stride,
V210Storage,
V210Width,
P216LayoutMismatch,
PlanarAudioMismatch,
FrameSyncAudioMismatch,
PacketHeaderTruncated,
PacketHeaderSize,
PacketHeaderUnsupported,
PacketCodecMismatch,
EmptyCodecPayload,
PacketLengthsMismatch,
KeyframeConfigurationMissing,
AacKeyframeMissing,
AacConfigurationMissing,
AacRateMismatch,
AacChannelsMismatch,
PacketLength,
PacketLengthOverflow,
PacketTruncated,
PacketSizeOverflow,
PacketPayloadSize,
UnknownCompressedVideo,
SpeedHqQuality,
PreviewVideoDimensions,
CompressedVideoSize,
SpeedHqTruncated,
OpusSampleRate,
OpusDuration,
AacSampleCount,
AacSampleRate,
AacChannels,
CompressedAudioSize,
CompressedBuffer,
ScatterBlockCount,
EmptyScatterBlock,
ScatterSize,
ScatterHeader,
UnknownCompressedAudio,
UnknownScanType {
code: u32,
},
AudioBufferTooSmall {
actual: usize,
minimum: usize,
},
MetadataNegativeLength {
length: i32,
},
MetadataTooLarge {
length: usize,
},
MetadataUnterminated,
VideoDataLength {
actual: usize,
expected: usize,
},
AudioDataLength {
detail: CompactDiagnostic<AudioLengthDefect>,
},
EmptyAudioStride {
stride: i32,
},
EmptyAudioFormat {
sample_rate: i32,
channels: i32,
},
UnknownAudioFormat {
fourcc: u32,
},
UnknownPixelFormat {
fourcc: u32,
},
FrameSyncAudioInput {
channels: usize,
samples: usize,
},
VideoBufferTooSmall {
format: PixelFormat,
actual: usize,
minimum: usize,
},
V210BufferTooSmall {
actual: usize,
minimum: usize,
},
InterleavedAudioLength {
actual: usize,
channels: u32,
},
AudioDestinationLength {
actual: usize,
minimum: usize,
},
ColorMetadataWithheld {
status: FrameMetadataStatus,
},
ConflictingColorMetadata {
first: ColorInfo,
second: ColorInfo,
},
HdrRefused {
transfer: TransferFunction,
},
ColorMetadata {
issue: ColorMetadataDefect,
diagnostic: Box<str>,
},
EncodingFailed {
codec: ImageCodecKind,
diagnostic: Box<str>,
},
}Expand description
Typed causes of crate::Error::InvalidFrame.
Shared layout refusals use FrameDefect::Layout and LayoutDefect.
Ordinary causes retain their evidence inline without allocating. Boxed
diagnostic fields retain caller or SDK text only for the documented exceptions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownEnvelopeCodec
A FourCC does not identify a supported packet-envelope codec.
Layout(LayoutDefect)
A refusal of the shared media layout or value checks.
ImageDimension
A codec cannot encode this dimension.
MetadataMissingTerminator
Metadata frame length does not include a trailing NUL terminator.
MetadataInteriorNul
Metadata frame contains an interior NUL byte.
MetadataNullData
Metadata frame has non-zero length with null data pointer.
NullVideoData
Video frame has null data pointer.
NullAudioData
Audio frame has null data pointer.
AudioMisaligned
Audio data pointer is not aligned for f32.
EmptyAudioHasData
Zero-length audio frame has non-null data pointer.
V210Stride
V210 stride must be a multiple of four and cover every complete pixel group.
V210Storage
V210 storage exceeds the video limit.
V210Width
V210 conversion requires a positive width divisible by six.
P216LayoutMismatch
P216 frame format and dimensions must match the V210 layout.
PlanarAudioMismatch
planar destination rate, channels and samples must match the interleaved source.
FrameSyncAudioMismatch
The SDK returned FrameSync audio with dimensions different from the request.
PacketHeaderTruncated
Truncated compressed packet header.
PacketHeaderSize
Unsupported compressed packet header size.
PacketHeaderUnsupported
Cannot send a packet with an unsupported header version or unknown flags.
PacketCodecMismatch
Packet codec does not match the frame’s codec.
EmptyCodecPayload
Empty codec payload.
PacketLengthsMismatch
Packet header lengths do not match the size of the frame.
KeyframeConfigurationMissing
Keyframes require codec configuration data.
AacKeyframeMissing
AAC packets must carry the keyframe flag.
AacConfigurationMissing
AAC packets require their AudioSpecificConfig as codec configuration data.
AacRateMismatch
The AAC configuration names a different sample rate than the frame.
AacChannelsMismatch
The AAC configuration names a different channel layout than the frame.
PacketLength
Invalid compressed packet length.
PacketLengthOverflow
Compressed packet length overflow.
PacketTruncated
Truncated compressed packet.
PacketSizeOverflow
Packet size overflow.
PacketPayloadSize
Invalid compressed packet payload size.
UnknownCompressedVideo
Unknown compressed video FourCC.
SpeedHqQuality
A SpeedHQ frame begins with its quality, a byte below 100.
PreviewVideoDimensions
An H.264 or HEVC picture on the preview stream is at most 640 pixels wide and 640 high.
CompressedVideoSize
Invalid compressed video size.
SpeedHqTruncated
Truncated SpeedHQ frame.
OpusSampleRate
Opus is sent at 8000, 12000, 16000, 24000 or 48000 Hz.
OpusDuration
An Opus frame holds 2.5, 5, 10, 20, 40 or 60 ms of audio.
AacSampleCount
An AAC frame holds 1024 samples per channel.
AacSampleRate
AAC is sent at a sample rate its configuration can name, from 7350 to 96000 Hz.
AacChannels
AAC is sent with one to six or eight channels.
CompressedAudioSize
Invalid compressed audio size.
CompressedBuffer
Invalid compressed frame buffer.
ScatterBlockCount
Invalid scatter block count.
EmptyScatterBlock
Scatter blocks must not be empty.
ScatterSize
Scatter frame exceeds the packet size limit.
ScatterHeader
The first scatter block must hold the frame’s complete header.
UnknownCompressedAudio
Unknown compressed audio FourCC.
UnknownScanType
Unknown scan type: 0x{code:08X}.
AudioBufferTooSmall
Audio buffer has {actual} samples, requires at least {minimum}.
MetadataNegativeLength
Metadata frame has negative length: {length}.
MetadataTooLarge
Metadata exceeds maximum size: {length} bytes > {MAX_METADATA_BYTES} bytes.
MetadataUnterminated
Frame metadata is missing a NUL terminator within {MAX_METADATA_BYTES} bytes.
VideoDataLength
Video data length {actual}, expected {expected} bytes for validated layout.
AudioDataLength
Audio data length {actual}, expected {expected} samples ({channels} channels x {samples} samples) for validated layout.
Fields
detail: CompactDiagnostic<AudioLengthDefect>Exact values, boxed only on 32-bit targets.
EmptyAudioStride
Zero-length audio frame has non-zero channel_stride_in_bytes: {stride}.
EmptyAudioFormat
Invalid zero-length audio state: sample_rate={sample_rate}, no_channels={channels}.
UnknownAudioFormat
Unknown audio format FourCC: 0x{fourcc:08X}.
UnknownPixelFormat
Unknown pixel format FourCC: 0x{fourcc:08X}.
FrameSyncAudioInput
FrameSync audio input-format query returned {channels} channels of {samples} samples.
VideoBufferTooSmall
Buffer too small for {format:?}: got {actual} bytes, expected at least {minimum}.
V210BufferTooSmall
V210 buffer has {actual} words, requires {minimum}.
InterleavedAudioLength
interleaved audio has {actual} samples, which is not a multiple of {channels} channels.
AudioDestinationLength
audio destination has {actual} samples, requires {minimum}.
ColorMetadataWithheld
The frame’s color description cannot be read because its metadata was withheld ({status:?}); ColorPolicy::Override explicitly supplies its color conversion.
Fields
status: FrameMetadataStatusThe status.
ConflictingColorMetadata
The frame’s metadata holds ndi_color_info elements that differ: {first:?} and {second:?}.
HdrRefused
The frame’s ndi_color_info gives the {transfer} transfer function; HdrPolicy::CodeValues encodes its code values to a tagged PNG.
Fields
transfer: TransferFunctionThe transfer.
ColorMetadata
Malformed color text; the issue is typed and its original diagnostic is boxed.
Fields
issue: ColorMetadataDefectThe syntax or value refusal.
EncodingFailed
The encoder’s diagnostic, whose content is supplied by that library.
Trait Implementations§
Source§impl Clone for FrameDefect
impl Clone for FrameDefect
Source§impl Debug for FrameDefect
impl Debug for FrameDefect
Source§impl Display for FrameDefect
impl Display for FrameDefect
Source§impl Error for FrameDefect
impl Error for FrameDefect
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()