Skip to main content

LrrEntry

Struct LrrEntry 

Source
pub struct LrrEntry {
    pub ssrc: u32,
    pub sequence_number: u8,
    pub payload_type: u8,
    pub target_temporal_layer_id: u8,
    pub target_layer_id: u8,
    pub current: Option<LrrCurrentLayer>,
}
Expand description

One FCI entry of an LRR.

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              SSRC                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Seq nr.       |C| Payload Type| Reserved                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RES     | TTID| TLID          | RES     | CTID| CLID          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Fields§

§ssrc: u32

The media sender asked for the refresh.

§sequence_number: u8

The request’s sequence number: it goes up with each new request, a repetition keeps it.

§payload_type: u8

The RTP payload type the layer IDs are to be read with, 7 bits.

§target_temporal_layer_id: u8

The target temporal layer ID (TTID), 3 bits.

§target_layer_id: u8

The target layer ID (TLID), as the codec’s payload format maps its layer ID to 8 bits.

§current: Option<LrrCurrentLayer>

The layers decoded now, when the receiver says (the C bit). With it the encoder may refresh only the layers between the current and the target one.

Implementations§

Source§

impl LrrEntry

Source

pub fn vp9( ssrc: u32, sequence_number: u8, payload_type: u8, target: (u8, u8), current: Option<(u8, u8)>, ) -> Result<Self>

An entry for a VP9 stream (RFC 9628 section 5.3): target and, when the receiver says, current temporal and spatial layer IDs. A TID or SID over 7 is refused.

Source

pub fn av1( ssrc: u32, sequence_number: u8, payload_type: u8, target: (u8, u8), current: Option<(u8, u8)>, ) -> Result<Self>

An entry for an AV1 stream (AV1 RTP specification section 8.2): temporal_id and spatial_id as the bitstream has them, in the VP9 format with the high bit of the SID 0. A spatial ID over 3 or a temporal ID over 7 is refused.

Source

pub fn target_spatial_id(&self) -> u8

The target spatial ID of a VP9 or AV1 entry: the SID bits of the layer field, the reserved bits ignored (RFC 9628 section 5.3).

Trait Implementations§

Source§

impl Clone for LrrEntry

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 LrrEntry

Source§

impl Debug for LrrEntry

Source§

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

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

impl Default for LrrEntry

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for LrrEntry

Source§

impl PartialEq for LrrEntry

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 LrrEntry

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.