internal static HdVideoStreamOption FromReader(ushort size, System.IO.BinaryReader reader)
        {
            Validate(size);
            var result = new HdVideoStreamOption
            {
                hdvideo_state           = reader.ReadUInt32(),
                storage_fifo_nb_packets = reader.ReadUInt32(),
                storage_fifo_size       = reader.ReadUInt32(),
                usbkey_size             = reader.ReadUInt32(),
                usbkey_freespace        = reader.ReadUInt32(),
                frame_number            = reader.ReadUInt32(),
                usbkey_remaining_time   = reader.ReadUInt32()
            };

            return(result);
        }
Ejemplo n.º 2
0
        private void AddOption(NavDataTag optionId, ushort size, BinaryReader reader)
        {
            switch (optionId)
            {
            case NavDataTag.Demo:
                Demo = DemoOption.FromReader(size, reader);
                break;

            case NavDataTag.Checksum:
                CheckSum = ChecksumOption.FromBytes(size, reader);
                break;

            case NavDataTag.VisionDetect:
                VisionDetect = VisionDetectOption.FromReader(size, reader);
                break;

            case NavDataTag.Wifi:
                Wifi = WifiOption.FromReader(size, reader);
                break;

            case NavDataTag.HdVideoStream:
                HdVideoStream = HdVideoStreamOption.FromReader(size, reader);
                break;

            default:
                if (false && Debugger.IsAttached)
                {
                    // An unhandled navdata option was detected; break into the debugger
                    Debugger.Break();
                }
                else
                {
                    for (int i = 0; i < size - 4; i++)
                    {
                        reader.ReadByte();
                    }
                }

                break;
            }
        }