Skip to main content

NackControl

Enum NackControl 

Source
#[non_exhaustive]
pub enum NackControl { LocalRtxTime { payload_type_rtx: u8, rtx_time: Option<Duration>, }, RemoteRtxTime { payload_type_rtx: u8, rtx_time: Option<Duration>, }, Horizon { media_ssrc: u32, oldest_useful: Option<u16>, }, }
Expand description

What a session description negotiated for retransmission (RFC 4588), told to the NACK interceptors while they run.

It travels as an Attribute::Custom on an empty RTCP packet written into the chain (NackControl::into_packet). Each NACK interceptor reads what is its own and hands the packet on.

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.
§

LocalRtxTime

The rtx-time (RFC 4588 8.1) this endpoint announced for its retransmission format payload_type_rtx: how long the NackResponderInterceptor keeps a sent packet of a stream repaired under that payload type available. It replaces the builder’s with_max_packet_age for those streams; None returns them to it.

Fields

§payload_type_rtx: u8

The payload type of the retransmission format.

§rtx_time: Option<Duration>

The announced rtx-time.

§

RemoteRtxTime

The rtx-time the remote endpoint announced for its retransmission format payload_type_rtx: past it the remote sender no longer has the packet, so the NackGeneratorInterceptor stops asking for a packet of a stream repaired under that payload type that has been missing for longer, or for longer than the builder’s with_max_packet_age, whichever is shorter. None leaves the builder’s value alone.

Fields

§payload_type_rtx: u8

The payload type of the retransmission format.

§rtx_time: Option<Duration>

The announced rtx-time.

§

Horizon

The oldest sequence number of the remote stream media_ssrc that the receiving application can still use (RFC 4588 6.3: “the receiver should generally assess whether the retransmitted packet would still be useful at the time it is received”): its video pipeline released or gave up every frame before it. The NackGeneratorInterceptor asks for no missing packet older than oldest_useful from then on, and forgets the requests it had for them. A request for them that the RtcpSessionInterceptor still holds for its next packet (RFC 4585 3.5.2: early feedback is rate-limited, and what is stored is sent only if it is still useful) is dropped there as well, so no NACK that leaves after the horizon was given names a packet behind it. None removes the horizon. Sequence numbers compare with wrap-around (RFC 3550 A.1): a packet up to 32767 behind the horizon is older; the application moves the horizon on as it plays out, so it never lags that far.

Fields

§media_ssrc: u32

The SSRC of the remote stream.

§oldest_useful: Option<u16>

The oldest sequence number still useful.

Implementations§

Source§

impl NackControl

Source

pub fn into_packet(self, now: Instant) -> TaggedPacket

The packet that carries this to the NACK interceptors when written into the chain at now.

Trait Implementations§

Source§

impl Clone for NackControl

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for NackControl

Source§

impl Debug for NackControl

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for NackControl

Source§

impl PartialEq for NackControl

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NackControl

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.