mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-14 11:28:11 +00:00
[client] implement support for RGB24 packed data
This commit is contained in:
@@ -625,6 +625,8 @@ int main_frameThread(void * unused)
|
||||
lgrFormat.type = frame->type;
|
||||
lgrFormat.screenWidth = frame->screenWidth;
|
||||
lgrFormat.screenHeight = frame->screenHeight;
|
||||
lgrFormat.dataWidth = frame->dataWidth;
|
||||
lgrFormat.dataHeight = frame->dataHeight;
|
||||
lgrFormat.frameWidth = frame->frameWidth;
|
||||
lgrFormat.frameHeight = frame->frameHeight;
|
||||
lgrFormat.stride = frame->stride;
|
||||
@@ -664,21 +666,25 @@ int main_frameThread(void * unused)
|
||||
}
|
||||
g_state.rotate = lgrFormat.rotate;
|
||||
|
||||
dataSize = lgrFormat.dataHeight * lgrFormat.pitch;
|
||||
|
||||
bool error = false;
|
||||
switch(frame->type)
|
||||
{
|
||||
case FRAME_TYPE_RGBA:
|
||||
case FRAME_TYPE_BGRA:
|
||||
case FRAME_TYPE_RGBA10:
|
||||
dataSize = lgrFormat.frameHeight * lgrFormat.pitch;
|
||||
lgrFormat.bpp = 32;
|
||||
break;
|
||||
|
||||
case FRAME_TYPE_RGBA16F:
|
||||
dataSize = lgrFormat.frameHeight * lgrFormat.pitch;
|
||||
lgrFormat.bpp = 64;
|
||||
break;
|
||||
|
||||
case FRAME_TYPE_BGR:
|
||||
lgrFormat.bpp = 24;
|
||||
break;
|
||||
|
||||
default:
|
||||
DEBUG_ERROR("Unsupported frameType");
|
||||
error = true;
|
||||
@@ -695,9 +701,10 @@ int main_frameThread(void * unused)
|
||||
g_state.formatValid = true;
|
||||
formatVer = frame->formatVer;
|
||||
|
||||
DEBUG_INFO("Format: %s %ux%u stride:%u pitch:%u rotation:%d hdr:%d pq:%d",
|
||||
DEBUG_INFO("Format: %s %ux%u (%ux%u) stride:%u pitch:%u rotation:%d hdr:%d pq:%d",
|
||||
FrameTypeStr[frame->type],
|
||||
frame->frameWidth, frame->frameHeight,
|
||||
frame->dataWidth , frame->dataHeight ,
|
||||
frame->stride, frame->pitch,
|
||||
frame->rotation,
|
||||
frame->flags & FRAME_FLAG_HDR ? 1 : 0,
|
||||
|
Reference in New Issue
Block a user