public async Task Write(IDataWriter writer, CameraFrame frame) { writer.WriteInt32(frame.FrameIndex); var bytes = Encoding.UTF8.GetBytes(frame.CameraId); writer.WriteInt32(bytes.Length); writer.WriteBytes(bytes); writer.WriteUInt32(frame.Stream.Length); writer.WriteBuffer(frame.Stream); await Task.Yield(); }
public async Task Write(IDataWriter writer, CameraHeartBeat dataFrame) { var bytes = Encoding.UTF8.GetBytes(dataFrame.CameraId); writer.WriteInt32(bytes.Length); writer.WriteUInt32(dataFrame.ViewBuffer.Length); writer.WriteBytes(bytes); writer.WriteBuffer(dataFrame.ViewBuffer); writer.WriteInt32((int)dataFrame.State); await Task.Yield(); }