mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[host] update capture classes to return the pitch
This commit is contained in:
parent
1815387bbb
commit
db59e67ddb
@ -260,6 +260,7 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
||||
// send the last frame again if we timeout to prevent the client stalling on restart
|
||||
frame.width = m_desc.Width;
|
||||
frame.height = m_desc.Height;
|
||||
frame.pitch = m_rect.Pitch;
|
||||
frame.stride = m_rect.Pitch / 4;
|
||||
|
||||
unsigned int size = m_height * m_rect.Pitch;
|
||||
|
@ -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)
|
||||
|
@ -42,6 +42,7 @@ struct FrameInfo
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int stride;
|
||||
unsigned int pitch;
|
||||
void * buffer;
|
||||
size_t bufferSize;
|
||||
|
||||
|
@ -268,6 +268,7 @@ bool Service::Process()
|
||||
m_detail.frame.width = frame.width;
|
||||
m_detail.frame.height = frame.height;
|
||||
m_detail.frame.stride = frame.stride;
|
||||
m_detail.frame.pitch = frame.pitch;
|
||||
m_detail.frame.dataPos = m_dataOffset[m_frameIndex];
|
||||
if (++m_frameIndex == 2)
|
||||
m_frameIndex = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user