VideoStreamStatus.parse constructor
VideoStreamStatus.parse(
- ByteData data_
Implementation
factory VideoStreamStatus.parse(ByteData data_) {
if (data_.lengthInBytes < VideoStreamStatus.mavlinkEncodedLength) {
var len = VideoStreamStatus.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var framerate = data_.getFloat32(0, Endian.little);
var bitrate = data_.getUint32(4, Endian.little);
var flags = data_.getUint16(8, Endian.little);
var resolutionH = data_.getUint16(10, Endian.little);
var resolutionV = data_.getUint16(12, Endian.little);
var rotation = data_.getUint16(14, Endian.little);
var hfov = data_.getUint16(16, Endian.little);
var streamId = data_.getUint8(18);
return VideoStreamStatus(
framerate: framerate,
bitrate: bitrate,
flags: flags,
resolutionH: resolutionH,
resolutionV: resolutionV,
rotation: rotation,
hfov: hfov,
streamId: streamId);
}