[][src]Module mpeg2ts_reader::demultiplex

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 the packet_filter_switch!() macro to create an enum implementing this trait.
  • DemuxContext - to create specific PacketFilter instances for each type of sub-stream found within the Transport Stream data. possibly by using the demux_context!() macro.

Structs

Demultiplex

Transport Stream demultiplexer.

FilterChangeset

Owns a queue of FilterChange objects representing pending updates to the Pid handling of the Demultiplexer.

NullPacketFilter

No-op implementation of PacketFilter.

PatPacketFilter

PacketFilter implementation which will insert some other PacketFilter into the Demultiplex instance for each program listed in the stream's PAT-section.

PmtPacketFilter

PacketFilter implementation which will insert some other PacketFilter into the Demultiplex instance for each sub-stream listed in one of the stream's PMT-sections.

Enums

DemuxError

TODO: this type does not belong here

FilterChange

Represents the intention to either insert a new PacketFilter into the Demultiplex instance or remove an old PacketFilter from the Demultiplex instance.

FilterRequest

Request that may be submitted to a DemuxContext::construct() implementation.

Traits

DemuxContext

Context shared between the Dumultiplex object and the PacketFilter instances which customise its behavior.

PacketFilter

Trait to which Demultiplex delegates handling of subsets of Transport Stream packets.