Module mpeg2ts_reader::demultiplex
source · Expand description
Main types implementing the demultiplexer state-machine.
Construct an instance of Demultiplex
and feed it one a succession
of byte-slices containing the Transport Stream data.
Users of this crate are expected to provide their own implementations of,
PacketFilter
- for defining per-stream-type handling, possibly by using thepacket_filter_switch!()
macro to create an enum implementing this trait.DemuxContext
- to create specificPacketFilter
instances for each type of sub-stream found within the Transport Stream data. possibly by using thedemux_context!()
macro.
Structs§
- Transport Stream demultiplexer.
- Owns a queue of
FilterChange
objects representing pending updates to the Pid handling of theDemultiplexer
. - No-op implementation of
PacketFilter
. PacketFilter
implementation which will insert some otherPacketFilter
into theDemultiplex
instance for each program listed in the stream’s PAT-section.PacketFilter
implementation which will insert some otherPacketFilter
into theDemultiplex
instance for each sub-stream listed in one of the stream’s PMT-sections.
Enums§
- TODO: this type does not belong here
- Represents the intention to either insert a new
PacketFilter
into theDemultiplex
instance or remove an oldPacketFilter
from theDemultiplex
instance. - Request that may be submitted to a
DemuxContext::construct()
implementation.
Traits§
- Context shared between the
Dumultiplex
object and thePacketFilter
instances which customise its behavior. - Trait to which
Demultiplex
delegates handling of subsets of Transport Stream packets.