[host] return the compressed frame size in the pitch field

This commit is contained in:
Geoffrey McRae 2017-12-29 21:01:02 +11:00
parent 03622f61b0
commit b5f2092e9c
2 changed files with 6 additions and 3 deletions

View File

@ -63,8 +63,8 @@ typedef struct KVMFRFrame
FrameType type; // the frame data type FrameType type; // the frame data type
uint32_t width; // the width uint32_t width; // the width
uint32_t height; // the height uint32_t height; // the height
uint32_t stride; // the row stride (zero if cursor data) uint32_t stride; // the row stride (zero if compressed data)
uint32_t pitch; // the row pitch (stride in bytes) uint32_t pitch; // the row pitch (stride in bytes or the compressed frame size)
uint64_t dataPos; // offset to the frame uint64_t dataPos; // offset to the frame
} }
KVMFRFrame; KVMFRFrame;

View File

@ -885,8 +885,11 @@ GrabStatus Capture::DXGI::GrabFrameH264(FrameInfo & frame)
buffer->Lock(&pixels, &maxLen, &curLen); buffer->Lock(&pixels, &maxLen, &curLen);
m_memcpy.Copy(frame.buffer, pixels, curLen); m_memcpy.Copy(frame.buffer, pixels, curLen);
buffer->Unlock(); buffer->Unlock();
SafeRelease(&buffer); SafeRelease(&buffer);
frame.stride = 0;
frame.pitch = curLen;
TRACE_END; TRACE_END;
return GRAB_STATUS_OK; return GRAB_STATUS_OK;
} }