#[non_exhaustive]pub enum Activity {
Active,
Dtx,
}Expand description
Whether a packet carried coded audio, or none at all.
Rides along with the audio it describes: on Frame coming
out of decode, and on
encode::Encoded going in. Codecs without a
discontinuous mode (PCM, AAC) are always Active.
Read off the packet, so a consumer gets the same answer as the publisher and gets one for senders that are not us. Two things follow from that, and both are why this reports what arrived rather than what the speaker was doing:
- Opus marks withheld audio but not silence itself. A run of
Dtxis interrupted every few hundred milliseconds by an ordinarily coded frame of the silence, which readsActivebecause nothing distinguishes it from speech resuming. So audio is never reported as silence, but silence is reported as audio a frame at a time. Hold a talking indicator across the gap rather than following it frame by frame. - A frame that codes nothing usually means the sender withheld it, but RFC
6716 section 3.2.1 lets one stand for a frame that went missing on the way
instead. A relay that repacketizes loss that way reads as
Dtx.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Active
The packet coded audio for this frame.
Dtx
The packet coded no audio for this frame, which the sender does while its input is silent.
Implementations§
Trait Implementations§
impl Copy for Activity
impl Eq for Activity
impl StructuralPartialEq for Activity
Auto Trait Implementations§
impl Freeze for Activity
impl RefUnwindSafe for Activity
impl Send for Activity
impl Sync for Activity
impl Unpin for Activity
impl UnsafeUnpin for Activity
impl UnwindSafe for Activity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more