All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scodec.protocols.mpeg.transport.DemultiplexerError.scala Maven / Gradle / Ivy

The newest version!
package scodec.protocols.mpeg
package transport

import scodec.Err
import scodec.bits.BitVector

sealed abstract class DemultiplexerError {
  def toMpegError: MpegError
}

object DemultiplexerError {

  case class Discontinuity(last: ContinuityCounter, current: ContinuityCounter) extends DemultiplexerError with MpegError {
    def message = s"pid discontinuity: $last to $current"
    def toMpegError = this
  }

  case class Decoding(data: BitVector, decodingError: Err) extends DemultiplexerError {
    def message = s"decoding error ($decodingError) while decoding ${data.toHex}"
    def toMpegError = MpegError.Decoding(data, decodingError)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy