pub struct SpliceInfoHeader<'a> { /* private fields */ }
Expand description

Header element within a SCTE-43 splice_info_section containing metadata generic across all kinds of splice-command.

This is a wrapper around a byte-slice that will extract requested fields on demand, as its methods are called.

Implementations§

source§

impl<'a> SpliceInfoHeader<'a>

source

pub fn new(buf: &'a [u8]) -> (SpliceInfoHeader<'a>, &'a [u8])

Splits the given buffer into a SpliceInfoHeader element, and a remainder which will include the splice-command itself, plus any descriptor_loop.

source

pub fn protocol_version(&self) -> u8

The version of the SCTE-35 data structures carried in this splice_info_section (only version 0 is supported by this library).

source

pub fn encrypted_packet(&self) -> bool

Indicates that portions of this splice_info_section are encrypted (only un-encrypted data is supported by this library).

source

pub fn encryption_algorithm(&self) -> EncryptionAlgorithm

The algorithm by which portions of this splice_info_section are encrypted (only un-encrypted data is supported by this library).

source

pub fn pts_adjustment(&self) -> u64

A 33-bit adjustment value to be applied to any PTS value in a splice-command within this splice_info_section.

source

pub fn cw_index(&self) -> u8

Identifier for the ‘control word’ (key) used to encrypt the message, if encrypted_packet is true.

source

pub fn tier(&self) -> u16

12-bit authorization tier.

source

pub fn splice_command_length(&self) -> u16

Length in bytes of the splice-command data within this message.

source

pub fn splice_command_type(&self) -> SpliceCommandType

Type of splice-command within this message.

Trait Implementations§

source§

impl<'a> Debug for SpliceInfoHeader<'a>

source§

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

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

impl<'a> Serialize for SpliceInfoHeader<'a>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for SpliceInfoHeader<'a>

§

impl<'a> Send for SpliceInfoHeader<'a>

§

impl<'a> Sync for SpliceInfoHeader<'a>

§

impl<'a> Unpin for SpliceInfoHeader<'a>

§

impl<'a> UnwindSafe for SpliceInfoHeader<'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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.