[host] update capture classes to return the pitch

This commit is contained in:
Geoffrey McRae
2017-12-17 05:05:56 +11:00
parent 1815387bbb
commit db59e67ddb
4 changed files with 4 additions and 0 deletions

View File

@@ -289,6 +289,7 @@ enum GrabStatus NvFBC::GrabFrame(struct FrameInfo & frame)
}
frame.stride = frame.width;
frame.pitch = dataWidth;
uint8_t *src = (uint8_t *)m_frameBuffer + dataOffset;
uint8_t *dst = (uint8_t *)frame.buffer;
for(unsigned int y = 0; y < frame.height; ++y, dst += dataWidth, src += m_grabInfo.dwBufferWidth * 4)