pub struct AdaptationField<'buf> { /* private fields */ }
Expand description
A collection of fields that may optionally appear within the header of a transport stream
Packet
.
As returned by Packet::adaptation_field()
Implementations§
Source§impl<'buf> AdaptationField<'buf>
impl<'buf> AdaptationField<'buf>
Sourcepub fn new(buf: &'buf [u8]) -> AdaptationField<'buf>
pub fn new(buf: &'buf [u8]) -> AdaptationField<'buf>
Create a new structure to parse the adaptation field data held within the given slice.
Panics if the slice is empty.
Sourcepub fn discontinuity_indicator(&self) -> bool
pub fn discontinuity_indicator(&self) -> bool
Get the value of the discontinuity_indicator field which might have been written into the transport stream by some ‘upstream’ processor on discovering that there was a break in the data.
Sourcepub fn random_access_indicator(&self) -> bool
pub fn random_access_indicator(&self) -> bool
Get the value of the random_access_indicator field.
Sourcepub fn elementary_stream_priority_indicator(&self) -> u8
pub fn elementary_stream_priority_indicator(&self) -> u8
Get the value of the elementary_stream_priority_indicator field.
Sourcepub fn pcr(&self) -> Result<ClockRef, AdaptationFieldError>
pub fn pcr(&self) -> Result<ClockRef, AdaptationFieldError>
Get the Program Clock Reference field,
or AdaptationFieldError::FieldNotPresent
if absent
Sourcepub fn opcr(&self) -> Result<ClockRef, AdaptationFieldError>
pub fn opcr(&self) -> Result<ClockRef, AdaptationFieldError>
Returns the ‘Original Program Clock Reference’ value,
or AdaptationFieldError::FieldNotPresent
if absent
Sourcepub fn splice_countdown(&self) -> Result<u8, AdaptationFieldError>
pub fn splice_countdown(&self) -> Result<u8, AdaptationFieldError>
Get the value of the splice_countdown field,
or AdaptationFieldError::FieldNotPresent
if absent
Sourcepub fn transport_private_data(&self) -> Result<&[u8], AdaptationFieldError>
pub fn transport_private_data(&self) -> Result<&[u8], AdaptationFieldError>
Borrow a slice of the underlying buffer containing private data,
or AdaptationFieldError::FieldNotPresent
if absent
Sourcepub fn adaptation_field_extension(
&self,
) -> Result<AdaptationFieldExtension<'buf>, AdaptationFieldError>
pub fn adaptation_field_extension( &self, ) -> Result<AdaptationFieldExtension<'buf>, AdaptationFieldError>
Returns extended adaptation fields, or AdaptationFieldError::FieldNotPresent
if absent