pub enum FecDecodeStatus {
Recovered,
NoLbrr,
NotSilk,
DecodeError,
}Expand description
Why an in-band FEC (OpusDecoder::decode_packet_fec) recovery
produced the samples it did (RFC 6716 §2.1.7 / §4.2.5).
In-band FEC works by re-encoding the signal of the frame prior to a
packet at a lower bitrate and carrying it as one or more §4.2.5 LBRR
frames inside that packet. When a packet is lost, the decoder can
recover the lost frame’s audio from the LBRR frame(s) in the next
successfully received packet (decode_packet_fec), rather than
emitting pure silence / running pitch-based concealment.
Variants§
Recovered
The packet carried §4.2.5 LBRR frame(s) for the lost prior frame, and they were decoded in Table-5 order and synthesized through the §4.2.7.9 LTP / LPC filters into real recovered audio at 48 kHz. For a stereo packet the recovered mid/side LBRR frames were unmixed via §4.2.8.
NoLbrr
The packet has no LBRR frame for the requested channel(s) (the §4.2.4 LBRR flags are clear), so no FEC data is available. Silence of the requested duration was emitted; the caller should fall back to its own packet-loss concealment.
NotSilk
The packet is not a SILK-bearing mode (CELT-only carries no LBRR), so FEC recovery is not possible. Silence was emitted.
DecodeError
The packet’s §4.2 LBRR bitstream was malformed / truncated. Silence of the requested duration was emitted in its place.
Trait Implementations§
Source§impl Clone for FecDecodeStatus
impl Clone for FecDecodeStatus
Source§fn clone(&self) -> FecDecodeStatus
fn clone(&self) -> FecDecodeStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FecDecodeStatus
Source§impl Debug for FecDecodeStatus
impl Debug for FecDecodeStatus
impl Eq for FecDecodeStatus
Source§impl PartialEq for FecDecodeStatus
impl PartialEq for FecDecodeStatus
Source§fn eq(&self, other: &FecDecodeStatus) -> bool
fn eq(&self, other: &FecDecodeStatus) -> bool
self and other values to be equal, and is used by ==.