Skip to main content

H264Payloader

Struct H264Payloader 

Source
pub struct H264Payloader { /* private fields */ }
Expand description

H264Payloader payloads H264 packets

Implementations§

Source§

impl H264Payloader

Source

pub fn with_packetization_mode(packetization_mode: u8) -> Self

A payloader for the negotiated packetization-mode (RFC 6184 section 5.4).

Mode 1 (non-interleaved) is the default: STAP-A for runs of small non-VCL NAL units (parameter sets, SEI), FU-A for NAL units over the MTU, everything in the order given. Mode 0 (single NAL unit) sends every NAL unit in a packet of its own and refuses one that does not fit the MTU, since a mode-0 receiver cannot reassemble fragments. Mode 2 (interleaved) sends STAP-B aggregates and FU-B / FU-A fragments, every NAL unit with a decoding order number that counts up by one from with_initial_don, in decoding order; single NAL unit packets, STAP-A and a leading FU-A are never used in it (section 6.4). A value above 2 is not a packetization mode and is taken as mode 1; try_with_packetization_mode refuses it instead.

Source

pub fn try_with_packetization_mode(packetization_mode: u8) -> Result<Self>

As with_packetization_mode, refusing a value that is not 0, 1 or 2 (RFC 6184 section 8.1).

§Errors

Fails for a mode above 2.

Source

pub fn with_initial_don(self, don: u16) -> Self

Interleaved mode: the decoding order number of the first NAL unit, which may be any value (RFC 6184 section 5.5). 0 unless set.

Trait Implementations§

Source§

impl Clone for H264Payloader

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 Debug for H264Payloader

Source§

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

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

impl Default for H264Payloader

Source§

fn default() -> Self

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

impl Payloader for H264Payloader

Source§

fn payload(&mut self, mtu: usize, payload: &Bytes) -> Result<Vec<Bytes>>

Payload fragments a H264 packet across one or more byte arrays

Source§

fn clone_to(&self) -> Box<dyn Payloader>

Clones this payloader behind a trait object.
Source§

fn marker_rule(&self) -> MarkerRule

Which packets carry the marker bit. Video unless the payloader says otherwise.
Source§

fn payload_duration(&self, _payload: &Bytes) -> Option<u32>

For a sample-based format, the RTP timestamp units one payload of payload covers, so that a frame split over several packets gets a timestamp per packet (RFC 3551 section 4.3: the timestamp is the sampling instant of the packet’s first sample). None, the default, is a frame-based format: every packet of the frame carries the frame’s timestamp.
Source§

fn set_next_frame_info(&mut self, _info: &dyn Any)

What the encoder says about the next frame payload is given, for a format whose payload describes more than the frame’s bytes (VP9’s layer indices, Vp9FrameInfo); a type the payloader does not use is ignored, as is the call by a payloader that uses none (the default).

Auto Trait Implementations§

§

impl Forget for H264Payloader

§

impl Freeze for H264Payloader

§

impl Move for H264Payloader

§

impl RefUnwindSafe for H264Payloader

§

impl Send for H264Payloader
where RawVecInner: Send, Bytes: Send,

§

impl Sync for H264Payloader
where RawVecInner: Sync, Bytes: Sync,

§

impl Unpin for H264Payloader
where *const u8 is !null: Unpin, *const u8: Unpin, Align8<*mut ()>: Unpin, &'static Vtable: Unpin,

§

impl UnsafeUnpin for H264Payloader

§

impl UnwindSafe for H264Payloader
where RawVecInner: UnwindSafe, *const u8: UnwindSafe, Align8<*mut ()>: UnwindSafe, &'static Vtable: UnwindSafe,

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.