Skip to main content

AdaptationField

Struct AdaptationField 

Source
pub struct AdaptationField<'a> {
Show 17 fields pub length: u8, pub discontinuity_indicator: bool, pub random_access_indicator: bool, pub elementary_stream_priority_indicator: bool, pub pcr_flag: bool, pub opcr_flag: bool, pub splicing_point_flag: bool, pub transport_private_data_flag: bool, pub adaptation_field_extension_flag: bool, pub pcr_base: Option<u64>, pub pcr_extension: Option<u16>, pub opcr_base: Option<u64>, pub opcr_extension: Option<u16>, pub splice_countdown: Option<i8>, pub transport_private_data: Option<&'a [u8]>, pub adaptation_field_extension: Option<AdaptationFieldExtension>, pub raw: &'a [u8],
}
Expand description

Parsed adaptation field accompanying a TS packet.

Fields§

§length: u8

Value of the adaptation_field_length byte. Counts the bytes that follow it within the adaptation field (so the AF occupies length + 1 bytes of the packet payload area).

§discontinuity_indicator: bool

discontinuity_indicator flag.

§random_access_indicator: bool

random_access_indicator flag.

§elementary_stream_priority_indicator: bool

elementary_stream_priority_indicator flag.

§pcr_flag: bool

PCR_flag — when set, Self::pcr_base and Self::pcr_extension are populated.

§opcr_flag: bool

OPCR_flag.

§splicing_point_flag: bool

splicing_point_flag.

§transport_private_data_flag: bool

transport_private_data_flag.

§adaptation_field_extension_flag: bool

adaptation_field_extension_flag.

§pcr_base: Option<u64>

33-bit program_clock_reference_base, when Self::pcr_flag.

§pcr_extension: Option<u16>

9-bit program_clock_reference_extension, when Self::pcr_flag.

§opcr_base: Option<u64>

33-bit original_program_clock_reference_base, when Self::opcr_flag.

§opcr_extension: Option<u16>

9-bit original_program_clock_reference_extension, when Self::opcr_flag.

§splice_countdown: Option<i8>

Signed 8-bit splice_countdown (§2.4.3.5), present when Self::splicing_point_flag.

§transport_private_data: Option<&'a [u8]>

private_data_byte slice, when Self::transport_private_data_flag. Length equals the transport_private_data_length byte on the wire.

§adaptation_field_extension: Option<AdaptationFieldExtension>

Decoded adaptation field extension body, when Self::adaptation_field_extension_flag.

§raw: &'a [u8]

Raw adaptation-field bytes including the adaptation_field_length byte itself.

Trait Implementations§

Source§

impl<'a> Clone for AdaptationField<'a>

Source§

fn clone(&self) -> AdaptationField<'a>

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<'a> Copy for AdaptationField<'a>

Source§

impl<'a> Debug for AdaptationField<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for AdaptationField<'a>

§

impl<'a> RefUnwindSafe for AdaptationField<'a>

§

impl<'a> Send for AdaptationField<'a>

§

impl<'a> Sync for AdaptationField<'a>

§

impl<'a> Unpin for AdaptationField<'a>

§

impl<'a> UnsafeUnpin for AdaptationField<'a>

§

impl<'a> UnwindSafe for AdaptationField<'a>

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 = Infallible

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

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

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.