mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
rdpgfx/client: Expose QoeFrameAck
This commit is contained in:
@@ -368,16 +368,31 @@ fail:
|
||||
return error;
|
||||
}
|
||||
|
||||
static UINT rdpgfx_send_qoe_frame_acknowledge_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
|
||||
static UINT rdpgfx_send_qoe_frame_acknowledge_pdu(RdpgfxClientContext* context,
|
||||
const RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU* pdu)
|
||||
{
|
||||
UINT error;
|
||||
wStream* s;
|
||||
RDPGFX_HEADER header;
|
||||
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
|
||||
RDPGFX_CHANNEL_CALLBACK* callback;
|
||||
RDPGFX_PLUGIN* gfx;
|
||||
header.flags = 0;
|
||||
header.cmdId = RDPGFX_CMDID_QOEFRAMEACKNOWLEDGE;
|
||||
header.pduLength = RDPGFX_HEADER_SIZE + 12;
|
||||
|
||||
if (!context || !pdu)
|
||||
return ERROR_BAD_ARGUMENTS;
|
||||
|
||||
gfx = (RDPGFX_PLUGIN*) context->handle;
|
||||
|
||||
if (!gfx)
|
||||
return ERROR_BAD_CONFIGURATION;
|
||||
|
||||
callback = gfx->listener_callback->channel_callback;
|
||||
|
||||
if (!callback)
|
||||
return ERROR_BAD_CONFIGURATION;
|
||||
|
||||
DEBUG_RDPGFX(gfx->log, "SendQoeFrameAcknowledgePdu: %"PRIu32"", pdu->frameId);
|
||||
s = Stream_New(NULL, header.pduLength);
|
||||
|
||||
@@ -791,28 +806,29 @@ static UINT rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
|
||||
|
||||
gfx->UnacknowledgedFrames--;
|
||||
gfx->TotalDecodedFrames++;
|
||||
|
||||
if (!gfx->sendFrameAcks)
|
||||
return error;
|
||||
|
||||
ack.frameId = pdu.frameId;
|
||||
ack.totalFramesDecoded = gfx->TotalDecodedFrames;
|
||||
|
||||
if (gfx->sendFrameAcks)
|
||||
if (gfx->suspendFrameAcks)
|
||||
{
|
||||
if (gfx->suspendFrameAcks)
|
||||
{
|
||||
ack.queueDepth = SUSPEND_FRAME_ACKNOWLEDGEMENT;
|
||||
|
||||
if (gfx->TotalDecodedFrames == 1)
|
||||
if ((error = rdpgfx_send_frame_acknowledge_pdu(context, &ack)))
|
||||
WLog_Print(gfx->log, WLOG_ERROR, "rdpgfx_send_frame_acknowledge_pdu failed with error %"PRIu32"",
|
||||
error);
|
||||
}
|
||||
else
|
||||
{
|
||||
ack.queueDepth = QUEUE_DEPTH_UNAVAILABLE;
|
||||
ack.queueDepth = SUSPEND_FRAME_ACKNOWLEDGEMENT;
|
||||
|
||||
if (gfx->TotalDecodedFrames == 1)
|
||||
if ((error = rdpgfx_send_frame_acknowledge_pdu(context, &ack)))
|
||||
WLog_Print(gfx->log, WLOG_ERROR, "rdpgfx_send_frame_acknowledge_pdu failed with error %"PRIu32"",
|
||||
error);
|
||||
}
|
||||
error);
|
||||
}
|
||||
else
|
||||
{
|
||||
ack.queueDepth = QUEUE_DEPTH_UNAVAILABLE;
|
||||
|
||||
if ((error = rdpgfx_send_frame_acknowledge_pdu(context, &ack)))
|
||||
WLog_Print(gfx->log, WLOG_ERROR, "rdpgfx_send_frame_acknowledge_pdu failed with error %"PRIu32"",
|
||||
error);
|
||||
}
|
||||
|
||||
switch (gfx->ConnectionCaps.version)
|
||||
@@ -836,7 +852,7 @@ static UINT rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
|
||||
qoe.timeDiffSE = diff;
|
||||
qoe.timeDiffEDR = 1;
|
||||
|
||||
if ((error = rdpgfx_send_qoe_frame_acknowledge_pdu(callback, &qoe)))
|
||||
if ((error = rdpgfx_send_qoe_frame_acknowledge_pdu(context, &qoe)))
|
||||
WLog_Print(gfx->log, WLOG_ERROR,
|
||||
"rdpgfx_send_qoe_frame_acknowledge_pdu failed with error %"PRIu32"",
|
||||
error);
|
||||
@@ -2105,6 +2121,7 @@ UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
|
||||
context->CapsAdvertise = rdpgfx_send_caps_advertise_pdu;
|
||||
context->FrameAcknowledge = rdpgfx_send_frame_acknowledge_pdu;
|
||||
context->CacheImportOffer = rdpgfx_send_cache_import_offer_pdu;
|
||||
context->QoeFrameAcknowledge = rdpgfx_send_qoe_frame_acknowledge_pdu;
|
||||
|
||||
gfx->iface.pInterface = (void*) context;
|
||||
gfx->zgfx = zgfx_context_new(FALSE);
|
||||
|
||||
@@ -92,6 +92,8 @@ typedef UINT(*pcRdpgfxCapsConfirm)(RdpgfxClientContext* context,
|
||||
const RDPGFX_CAPS_CONFIRM_PDU* capsConfirm);
|
||||
typedef UINT(*pcRdpgfxFrameAcknowledge)(RdpgfxClientContext* context,
|
||||
const RDPGFX_FRAME_ACKNOWLEDGE_PDU* frameAcknowledge);
|
||||
typedef UINT(*pcRdpgfxQoeFrameAcknowledge)(RdpgfxClientContext* context,
|
||||
const RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU* qoeFrameAcknowledge);
|
||||
|
||||
typedef UINT(*pcRdpgfxMapWindowForSurface)(RdpgfxClientContext* context, UINT16 surfaceID,
|
||||
UINT64 windowID);
|
||||
@@ -134,6 +136,7 @@ struct _rdpgfx_client_context
|
||||
pcRdpgfxCapsAdvertise CapsAdvertise;
|
||||
pcRdpgfxCapsConfirm CapsConfirm;
|
||||
pcRdpgfxFrameAcknowledge FrameAcknowledge;
|
||||
pcRdpgfxQoeFrameAcknowledge QoeFrameAcknowledge;
|
||||
|
||||
/* No locking required */
|
||||
pcRdpgfxUpdateSurfaces UpdateSurfaces;
|
||||
|
||||
Reference in New Issue
Block a user