object Demultiplexer
Supports depacketization of an MPEG transport stream, represented as a stream of Packets.
- Source
- Demultiplexer.scala
- Alphabetic
- By Inheritance
- Demultiplexer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class DecodeBody[A](neededBits: Option[Long], decoder: Decoder[A]) extends Product with Serializable
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
neededBitsif that value is defined. IfneededBitsis 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. - sealed trait DecodeState extends AnyRef
- case class PesPacketResult(body: PesPacket) extends Result with Product with Serializable
- case class ResetDecodeState(context: List[String]) extends Err with Product with Serializable
Error that indicates any data accumulated by the demultiplexer should be dropped and no further decoding should occur until the next payload start.
- sealed trait Result extends AnyRef
- case class SectionResult(section: Section) extends Result with Product with Serializable
- final case class State(byPid: Map[Pid, DecodeState]) extends Product with Serializable
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def demultiplex[F[_]](sectionCodec: SectionCodec): Scan[(Map[Pid, ContinuityCounter], State), Packet, PidStamped[Either[DemultiplexerError, Result]]]
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, usedemultiplexWithPesHeaders.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.
- def demultiplexGeneral[F[_], Out](decodeHeader: (BitVector, Boolean) => Attempt[DecodeResult[DecodeBody[Out]]]): Scan[(Map[Pid, ContinuityCounter], State), Packet, PidStamped[Either[DemultiplexerError, Out]]]
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
DecodeBodyfor more information. - def demultiplexSectionsAndPesPackets[F[_]](decodeSectionBody: (SectionHeader) => Decoder[Section], decodePesBody: (PesPacketHeaderPrefix) => Decoder[PesPacket]): Scan[(Map[Pid, ContinuityCounter], State), Packet, PidStamped[Either[DemultiplexerError, Result]]]
Variant of
demultiplexthat allows section and PES decoding to be explicitly specified. - def demultiplexWithPesHeaders[F[_]](sectionCodec: SectionCodec): Scan[(Map[Pid, ContinuityCounter], State), Packet, PidStamped[Either[DemultiplexerError, Result]]]
Variant of
demultiplexthat parses PES packet headers. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object DecodeState