Demultiplexer

fs2.protocols.mpeg.transport.Demultiplexer$
object Demultiplexer

Supports depacketization of an MPEG transport stream, represented as a stream of Packets.

Attributes

Source
Demultiplexer.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class DecodeBody[A](neededBits: Option[Long], decoder: Decoder[A])

Indication that a header was decoded successfully and there was enough information on how to decode the body of the message.

Indication that a header was decoded successfully and there was enough information on how to decode the body of the message.

Upon receiving a result of this type, the demultiplexer will accumulate the number of bits specified by neededBits if that value is defined. If neededBits is undefined, the demultiplexer will accumulate all payload bits until the start of the next message (as indicated by the payload unit start indicator). When accumulation has completed, the specified decoder will be invoked to decode a message.

Attributes

Source
Demultiplexer.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object DecodeState

Attributes

Companion
trait
Source
Demultiplexer.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait DecodeState

Attributes

Companion
object
Source
Demultiplexer.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AwaitingBody[A]
case class PesPacketResult(body: PesPacket) extends Result

Attributes

Source
Demultiplexer.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Result
class Object
trait Matchable
class Any
Show all
case class ResetDecodeState(context: List[String]) extends Err

Error that indicates any data accumulated by the demultiplexer should be dropped and no further decoding should occur until the next payload start.

Error that indicates any data accumulated by the demultiplexer should be dropped and no further decoding should occur until the next payload start.

Attributes

Source
Demultiplexer.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Err
class Object
trait Matchable
class Any
Show all
sealed trait Result

Attributes

Source
Demultiplexer.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class SectionResult(section: Section) extends Result

Attributes

Source
Demultiplexer.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Result
class Object
trait Matchable
class Any
Show all
final case class State(byPid: Map[Pid, DecodeState])

Attributes

Source
Demultiplexer.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

Stream transducer that converts packets in to sections and PES packets.

Stream transducer that converts packets in to sections and PES packets.

The packets may span PID values. De-packetization is performed on each PID and as whole messages are received, reassembled messages are emitted.

PES packets emitted by this method never include parsed headers -- that is, every emitted PES packet is of type PesPacket.WithoutHeader. To get PES packets with parsed headers, use demultiplexWithPesHeaders.

Errors encountered while depacketizing are emitted.

Upon noticing a PID discontinuity, an error is emitted and PID decoding state is discarded, resulting in any in-progress section decoding to be lost for that PID.

Attributes

Source
Demultiplexer.scala

Most general way to perform demultiplexing, allowing parsing of arbitrary headers and decoding of a specified output type.

Most general way to perform demultiplexing, allowing parsing of arbitrary headers and decoding of a specified output type.

When processing the payload in a packet, the start of the payload is passed along to decodeHeader, which determines how to process the body of the message.

In addition to the payload data, a flag is passed to decodeHeader -- true is passed when the payload data started at byte 0 of the packet and false is passed when the payload data started later in the packet.

See the documentation on DecodeBody for more information.

Attributes

Source
Demultiplexer.scala

Variant of demultiplex that allows section and PES decoding to be explicitly specified.

Variant of demultiplex that allows section and PES decoding to be explicitly specified.

Attributes

Source
Demultiplexer.scala

Variant of demultiplex that parses PES packet headers.

Variant of demultiplex that parses PES packet headers.

Attributes

Source
Demultiplexer.scala