[channels,rdpgfx] enable GfxSendQoeAck

This commit is contained in:
Armin Novak 2024-06-24 16:11:32 +02:00
parent fbc0d161ca
commit fb26dd4185
No known key found for this signature in database
GPG Key ID: 2CF4A2D2D3D72105

View File

@ -1184,6 +1184,7 @@ static UINT rdpgfx_recv_end_frame_pdu(GENERIC_CHANNEL_CALLBACK* callback, wStrea
Stream_Read_UINT32(s, pdu.frameId); /* frameId (4 bytes) */ Stream_Read_UINT32(s, pdu.frameId); /* frameId (4 bytes) */
DEBUG_RDPGFX(gfx->log, "RecvEndFramePdu: frameId: %" PRIu32 "", pdu.frameId); DEBUG_RDPGFX(gfx->log, "RecvEndFramePdu: frameId: %" PRIu32 "", pdu.frameId);
const UINT64 start = GetTickCount64();
if (context) if (context)
{ {
IFCALLRET(context->EndFrame, error, context, &pdu); IFCALLRET(context->EndFrame, error, context, &pdu);
@ -1195,7 +1196,8 @@ static UINT rdpgfx_recv_end_frame_pdu(GENERIC_CHANNEL_CALLBACK* callback, wStrea
return error; return error;
} }
} }
const UINT64 end = GetTickCount64();
const UINT64 EndFrameTime = end - start;
gfx->TotalDecodedFrames++; gfx->TotalDecodedFrames++;
if (!gfx->sendFrameAcks) if (!gfx->sendFrameAcks)
@ -1235,7 +1237,7 @@ static UINT rdpgfx_recv_end_frame_pdu(GENERIC_CHANNEL_CALLBACK* callback, wStrea
case RDPGFX_CAPVERSION_107: case RDPGFX_CAPVERSION_107:
if (freerdp_settings_get_bool(gfx->rdpcontext->settings, FreeRDP_GfxSendQoeAck)) if (freerdp_settings_get_bool(gfx->rdpcontext->settings, FreeRDP_GfxSendQoeAck))
{ {
RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU qoe; RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU qoe = { 0 };
UINT64 diff = (GetTickCount64() - gfx->StartDecodingTime); UINT64 diff = (GetTickCount64() - gfx->StartDecodingTime);
if (diff > 65000) if (diff > 65000)
@ -1244,7 +1246,7 @@ static UINT rdpgfx_recv_end_frame_pdu(GENERIC_CHANNEL_CALLBACK* callback, wStrea
qoe.frameId = pdu.frameId; qoe.frameId = pdu.frameId;
qoe.timestamp = gfx->StartDecodingTime; qoe.timestamp = gfx->StartDecodingTime;
qoe.timeDiffSE = diff; qoe.timeDiffSE = diff;
qoe.timeDiffEDR = 1; qoe.timeDiffEDR = EndFrameTime;
if ((error = rdpgfx_send_qoe_frame_acknowledge_pdu(context, &qoe))) if ((error = rdpgfx_send_qoe_frame_acknowledge_pdu(context, &qoe)))
WLog_Print(gfx->log, WLOG_ERROR, WLog_Print(gfx->log, WLOG_ERROR,