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>
impl<'a> SpliceInfoHeader<'a>
Sourcepub fn new(buf: &'a [u8]) -> (SpliceInfoHeader<'a>, &'a [u8])
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.
Sourcepub fn protocol_version(&self) -> u8
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).
Sourcepub fn encrypted_packet(&self) -> bool
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).
Sourcepub fn encryption_algorithm(&self) -> EncryptionAlgorithm
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).
Sourcepub fn pts_adjustment(&self) -> u64
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.
Sourcepub fn cw_index(&self) -> u8
pub fn cw_index(&self) -> u8
Identifier for the ‘control word’ (key) used to encrypt the message, if encrypted_packet
is true.
Sourcepub fn splice_command_length(&self) -> u16
pub fn splice_command_length(&self) -> u16
Length in bytes of the splice-command data within this message.
Sourcepub fn splice_command_type(&self) -> SpliceCommandType
pub fn splice_command_type(&self) -> SpliceCommandType
Type of splice-command within this message.