Twcc

Struct Twcc 

Source
pub struct Twcc<'a> { /* private fields */ }
Expand description

Transport-Wide Congestion Control FCI block

Implementations§

Source§

impl<'a> Twcc<'a>

Source

pub fn builder( base_seq: u16, reference_time: u32, feedback_packet_count: u8, status_list: &[TwccPacketStatus], max_size: Option<usize>, ) -> TwccBuilder

Source

pub fn base_sequence_number(&self) -> u16

The transport-wide sequence number of the first packet in this feedback.

This number is not necessarily increased for every feedback; in the case of reordering it may be decreased

Source

pub fn reference_time(&self) -> u32

Signed integer indicating an absolute reference time in some (unknown) time base chosen by the sender of the feedback packets.

The value is to be interpreted in multiples of 64ms.

The first recv delta in this packet is relative to the reference time.

The reference time makes it possible to calculate the delta between feedbacks even if some feedback packets are lost, since it always uses the same time base.

Source

pub fn feedback_packet_count(&self) -> u8

A counter incremented by one for each feedback packet sent. Used to detect feedback packet losses.

Source

pub fn packets( &self, ) -> impl Iterator<Item = Result<(u16, TwccPacketStatus), RtcpParseError>> + 'a

Returns an iterator over all packets described by this TWCC feedback.

The iterator yields (sequence_number, status) pairs in ascending sequence number order, starting from Twcc::base_sequence_number.

Trait Implementations§

Source§

impl<'a> Debug for Twcc<'a>

Source§

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

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

impl<'a> FciParser<'a> for Twcc<'a>

Source§

const PACKET_TYPE: FciFeedbackPacketType = FciFeedbackPacketType::TRANSPORT

The supported feedback packet/s that the FCI data may be encountered within.
Source§

const FCI_FORMAT: u8 = 15u8

The type format of the FCI.
Source§

fn parse(data: &'a [u8]) -> Result<Self, RtcpParseError>

Parse the provided FCI data

Auto Trait Implementations§

§

impl<'a> Freeze for Twcc<'a>

§

impl<'a> RefUnwindSafe for Twcc<'a>

§

impl<'a> Send for Twcc<'a>

§

impl<'a> Sync for Twcc<'a>

§

impl<'a> Unpin for Twcc<'a>

§

impl<'a> UnwindSafe for Twcc<'a>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.