[host] use a local copy of the header and then update it all in one go

Writing to shared memory is much faster then reading as the shared
memory is not cached, this change ensures we are using a local copy
of the header performing the final update all in one go.
This commit is contained in:
Geoffrey McRae
2017-12-16 10:04:56 +11:00
parent b89a8fee04
commit 758b7af754
2 changed files with 41 additions and 32 deletions

View File

@@ -54,7 +54,8 @@ private:
HANDLE m_timer;
ICapture * m_capture;
KVMFRHeader * m_header;
KVMFRHeader m_header;
KVMFRHeader * m_shmHeader;
uint8_t * m_frame[2];
size_t m_frameSize;
uint64_t m_dataOffset[2];