/// <summary> /// Decode this PDU from the PduMarshaler. /// </summary> /// <param name="marshaler">This is used to decode the fields of this PDU.</param> public override bool Decode(PduMarshaler marshaler) { try { if (!base.Decode(marshaler)) return false; this.quantIdxY = marshaler.ReadByte(); this.quantIdxCb = marshaler.ReadByte(); this.quantIdxCr = marshaler.ReadByte(); this.xIdx = marshaler.ReadUInt16(); this.yIdx = marshaler.ReadUInt16(); this.flags = marshaler.ReadBool(); this.decodedLen += 8; this.yLen = marshaler.ReadUInt16(); this.cbLen = marshaler.ReadUInt16(); this.crLen = marshaler.ReadUInt16(); this.tailLen = marshaler.ReadUInt16(); this.decodedLen += 8; this.yData = marshaler.ReadBytes((int)this.yLen); this.decodedLen += this.yLen; this.cbData = marshaler.ReadBytes((int)this.cbLen); this.decodedLen += this.cbLen; this.crData = marshaler.ReadBytes((int)this.crLen); this.decodedLen += this.crLen; this.tailData = marshaler.ReadBytes((int)this.tailLen); this.decodedLen += this.tailLen; return true; } catch { marshaler.Reset(); throw new PDUDecodeException(this.GetType(), marshaler.ReadToEnd()); } }