/// <summary> Creates an empty PktDecoder object associated with given decoder /// specifications and HeaderDecoder. This object must be initialized /// thanks to the restart method before being used. /// /// </summary> /// <param name="decSpec">The decoder specifications. /// /// </param> /// <param name="hd">The HeaderDecoder instance. /// /// </param> /// <param name="ehs">The stream where to read data from. /// /// </param> /// <param name="src">The bit stream reader agent. /// /// </param> /// <param name="isTruncMode">Whether or not truncation mode is required. /// /// </param> /// <param name="maxCB">The maximum number of code-blocks to read before ncbquit /// /// /// </param> public PktDecoder(DecoderSpecs decSpec, HeaderDecoder hd, RandomAccessIO ehs, BitstreamReaderAgent src, bool isTruncMode, int maxCB) { this.decSpec = decSpec; this.hd = hd; this.ehs = ehs; this.isTruncMode = isTruncMode; bin = new PktHeaderBitReader(ehs); this.src = src; ncb = 0; ncbQuit = false; this.maxCB = maxCB; }