[][src]Struct smpte2022_1_packet::FecHeader

pub struct FecHeader<'buf> { /* fields omitted */ }

The set of headers values in a SMPTE 2022-1 packet.

Methods

impl<'buf> FecHeader<'buf>[src]

pub fn from_bytes(buf: &'buf [u8]) -> Result<FecHeader<'buf>, FecHeaderError>[src]

wrap the given byte-slice in a FecHeader object, or return a FecHeaderError if the given slice does not represent a valid header.

pub fn split_from_bytes(
    buf: &'buf [u8]
) -> Result<(FecHeader<'buf>, &'buf [u8]), FecHeaderError>
[src]

Returns a FecHeader, and the remaining payload data from the given slice immediately following the header.

pub fn header_len(&self) -> usize[src]

Returns the length in bytes of the headers this object represents.

pub fn sn_base(&self) -> u32[src]

24 bit value of the minimum sequence number of media packets associated with this FEC packet

pub fn sn_base_low_bits(&self) -> Seq[src]

The low 16 bits of the minimum sequence number of media packets associated with this FEC packet

pub fn length_recovery(&self) -> u16[src]

The length of media packets associated with this FEC packet

pub fn extended(&self) -> bool[src]

Flag indicating if this header includes extension fields (must be true for SMPTE 2022-1 packets

pub fn pt_recovery(&self) -> u8[src]

Field allowing recovery of the payload type of media packets associated with this FEC packet

pub fn mask(&self) -> u32[src]

Set to all-zeros for SMPTE 2022-1 streams

pub fn ts_recovery(&self) -> u32[src]

Used to recover the timestamp field of any packets associated with this FEC packet

pub fn orientation(&self) -> Orientation[src]

Orientation::Column for FEC packets from the first FEC stream, and Orientation::Row for FEC packets from the second FEC stream.

In the spec this header field is named D.

pub fn fec_type(&self) -> u8[src]

3-bit value indicating which error-correcting code is chosen, but always set to 0 for SMPTE 2022-1 streams.

Packets with an unrecognized value to be ignored.

pub fn index(&self) -> u8[src]

3-bit value always set to 0 for SMPTE 2022-1 streams.

pub fn offset(&self) -> u8[src]

Selects the media packets associated with this FEC packet.

Equal to the the L parameter for the first FEC stream, and always equal to 1 for the second FEC stream.

pub fn number_associated(&self) -> u8[src]

The number of media packets associated with this FEC packet.

This is the NA field from the spec, equal to the D parameter or FEC packets belonging to the first FEC stream, and equal to the L parameter or FEC packets belonging to the second FEC stream.

pub fn sn_base_ext_bits(&self) -> u8[src]

The top 8 bits of the sequence number, or 0 if the sequence number fits in the 16 bits sn_base field.

pub fn associates_with(&self, seq: Seq) -> bool[src]

true iff a packet with the given sequence number would be associated with this FEC packet

Trait Implementations

impl<'buf> Debug for FecHeader<'buf>[src]

Auto Trait Implementations

impl<'buf> RefUnwindSafe for FecHeader<'buf>

impl<'buf> Send for FecHeader<'buf>

impl<'buf> Sync for FecHeader<'buf>

impl<'buf> Unpin for FecHeader<'buf>

impl<'buf> UnwindSafe for FecHeader<'buf>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.