Crate scte35_reader[−][src]
Parser data formatted according to SCTE-35.
Intended to be used in conjunction with the mpeg2ts-reader crate’s facilities for processing the Transport Stream structures within which SCTE-35 data is usually embedded.
Example
pub struct DumpSpliceInfoProcessor; impl scte35_reader::SpliceInfoProcessor for DumpSpliceInfoProcessor { fn process( &self, header: scte35_reader::SpliceInfoHeader<'_>, command: scte35_reader::SpliceCommand, descriptors: scte35_reader::SpliceDescriptors<'_>, ) { println!("{:?} {:#?}", header, command); for d in &descriptors { println!(" - {:?}", d); } } } let data = hex!( "fc302500000000000000fff01405000000017feffe2d142b00fe0123d3080001010100007f157a49" ); let mut parser = Scte35SectionProcessor::new(DumpSpliceInfoProcessor); let header = psi::SectionCommonHeader::new(&data[..psi::SectionCommonHeader::SIZE]); let mut ctx = NullDemuxContext::new(); parser.section(&mut ctx, &header, &data[..]);
Output:
SpliceInfoHeader { protocol_version: 0, encrypted_packet: false, encryption_algorithm: None, pts_adjustment: 0, cw_index: 0, tier: 4095 } SpliceInsert {
splice_event_id: 1,
reserved: 127,
splice_detail: Insert {
network_indicator: Out,
splice_mode: Program(
Timed(
Some(
756296448
)
)
),
duration: Some(
SpliceDuration {
return_mode: Automatic,
duration: 19125000
}
),
unique_program_id: 1,
avail_num: 1,
avails_expected: 1
}
}
Modules
| upid | Unique Program Identifier types from a range of different identification schemes supported in
SCTE-35 |
Structs
| ComponentSplice | |
| Scte35SectionProcessor | |
| SegmentationModeComponent | |
| SpliceDescriptorIter | |
| SpliceDescriptors | |
| SpliceDuration | |
| SpliceInfoHeader | Header element within a SCTE-43 splice_info_section containing metadata generic across all kinds of splice-command. |
| SubSegments |
Enums
Constants
| SCTE35_STREAM_TYPE | The StreamType which might be used for |
Traits
| SpliceInfoProcessor |
Functions
| is_scte35 | Utility function to search the PTM section for a |