capsSet->version = RDPGFX_CAPVERSION_105;
capsSet->length = 0x4;
capsSet->flags = caps10Flags;
-
/* TODO: Until RDPGFX_MAP_SURFACE_TO_SCALED_OUTPUT_PDU and
* RDPGFX_MAP_SURFACE_TO_SCALED_WINDOW_PDU are not implemented do not
* announce the following version */
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
UINT error = CHANNEL_RC_OK;
+ BOOL sendAck = TRUE;
if (Stream_GetRemainingLength(s) < RDPGFX_END_FRAME_PDU_SIZE)
{
gfx->TotalDecodedFrames++;
ack.frameId = pdu.frameId;
ack.totalFramesDecoded = gfx->TotalDecodedFrames;
+ IFCALLRET(context->PreFrameAck, sendAck, context, &ack);
- if (gfx->suspendFrameAcks)
+ if (sendAck)
{
- ack.queueDepth = SUSPEND_FRAME_ACKNOWLEDGEMENT;
+ if (gfx->suspendFrameAcks)
+ {
+ ack.queueDepth = SUSPEND_FRAME_ACKNOWLEDGEMENT;
+
+ if (gfx->TotalDecodedFrames == 1)
+ if ((error = rdpgfx_send_frame_acknowledge_pdu(callback, &ack)))
+ WLog_Print(gfx->log, WLOG_ERROR, "rdpgfx_send_frame_acknowledge_pdu failed with error %"PRIu32"",
+ error);
+ }
+ else
+ {
+ ack.queueDepth = QUEUE_DEPTH_UNAVAILABLE;
- if (gfx->TotalDecodedFrames == 1)
if ((error = rdpgfx_send_frame_acknowledge_pdu(callback, &ack)))
WLog_Print(gfx->log, WLOG_ERROR, "rdpgfx_send_frame_acknowledge_pdu failed with error %"PRIu32"",
error);
- }
- else
- {
- ack.queueDepth = QUEUE_DEPTH_UNAVAILABLE;
-
- if ((error = rdpgfx_send_frame_acknowledge_pdu(callback, &ack)))
- WLog_Print(gfx->log, WLOG_DEBUG, "rdpgfx_send_frame_acknowledge_pdu failed with error %"PRIu32"",
- error);
+ }
}
switch (gfx->ConnectionCaps.version)
qoe.timeDiffEDR = 1;
if ((error = rdpgfx_send_qoe_frame_acknowledge_pdu(callback, &qoe)))
- WLog_Print(gfx->log, WLOG_DEBUG, "rdpgfx_send_frame_acknowledge_pdu failed with error %"PRIu32"",
+ WLog_Print(gfx->log, WLOG_ERROR, "rdpgfx_send_frame_acknowledge_pdu failed with error %"PRIu32"",
error);
}
typedef UINT(*pcRdpgfxUpdateSurfaceArea)(RdpgfxClientContext* context, UINT16 surfaceId,
UINT32 nrRects, const RECTANGLE_16* rects);
+typedef BOOL(*pcRdpgfxPreFrameAck)(RdpgfxClientContext* context,
+ RDPGFX_FRAME_ACKNOWLEDGE_PDU* frameAcknowledge);
+
struct _rdpgfx_client_context
{
void* handle;
pcRdpgfxUpdateSurfaces UpdateSurfaces;
pcRdpgfxUpdateSurfaceArea UpdateSurfaceArea;
+ pcRdpgfxPreFrameAck PreFrameAck;
+
CRITICAL_SECTION mux;
PROFILER_DEFINE(SurfaceProfiler)
};