Struct str0m::media::rtp::RtpHeader

source ·
pub struct RtpHeader {
    pub version: u8,
    pub has_padding: bool,
    pub has_extension: bool,
    pub marker: bool,
    pub payload_type: Pt,
    pub sequence_number: u16,
    pub timestamp: u32,
    pub ssrc: Ssrc,
    pub ext_vals: ExtensionValues,
    pub header_len: usize,
}
Expand description

Parsed header from an RTP packet.

Fields§

§version: u8

Always 2

§has_padding: bool

Whether the RTP packet has padding to be an equal of 4 bytes.

§has_extension: bool

RTP packet has “RTP header extensions”.

§marker: bool

A marker indicates the end of a series of packets belonging together such as for a single video frame.

§payload_type: Pt

Type of payload being carried. What this correlates to is sent in the SDP.

§sequence_number: u16

Sequence number increasing by 1 for each RTP packet.

§timestamp: u32

Timestamp in media time for the RTP packet. What the media time base is depends on the codec.

§ssrc: Ssrc

Sender source identifier.

§ext_vals: ExtensionValues

The extension values parsed using the mapping via SDP.

§header_len: usize

Length of header.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more