wfreerdp-server: greatly improved performance

This commit is contained in:
C-o-r-E 2012-08-20 16:49:25 -04:00
parent 57ecdb036d
commit ebc699dde8
2 changed files with 9 additions and 7 deletions

View File

@ -225,7 +225,7 @@ void wf_info_find_invalid_region(wfInfo* info)
info->invalid_y2 = 0;
}
printf("\tFIND = (%d, %d), (%d, %d)\n", info->invalid_x1, info->invalid_y1, info->invalid_x2, info->invalid_y2);
//printf("\tFIND = (%d, %d), (%d, %d)\n", info->invalid_x1, info->invalid_y1, info->invalid_x2, info->invalid_y2);
for(i = info->lastUpdate; i != info->nextUpdate; i = (i+1) % MAXCHANGES_BUF )
{
/*printf("\t(%d, %d), (%d, %d)\n",

View File

@ -50,7 +50,7 @@ static DWORD WINAPI wf_peer_mirror_monitor(LPVOID lpParam)
freerdp_peer* client;
unsigned long i;
rate = 1000;
rate = 42;
client = (freerdp_peer*)lpParam;
//todo: make sure we dont encode after no clients
@ -75,7 +75,7 @@ static DWORD WINAPI wf_peer_mirror_monitor(LPVOID lpParam)
diff = end - start;
if(diff < rate)
{
printf("sleeping for %d ms...\n", rate - diff);
//printf("sleeping for %d ms...\n", rate - diff);
Sleep(rate - diff);
}
@ -128,11 +128,11 @@ void wf_rfx_encode(freerdp_peer* client)
break;
}
printf("encode %d\n", wfi->nextUpdate - wfi->lastUpdate);
printf("\tinvlaid region = (%d, %d), (%d, %d)\n", wfi->invalid_x1, wfi->invalid_y1, wfi->invalid_x2, wfi->invalid_y2);
//printf("encode %d\n", wfi->nextUpdate - wfi->lastUpdate);
//printf("\tinvlaid region = (%d, %d), (%d, %d)\n", wfi->invalid_x1, wfi->invalid_y1, wfi->invalid_x2, wfi->invalid_y2);
wfi->lastUpdate = wfi->nextUpdate;
//wfi->lastUpdate = wfi->nextUpdate;
width = wfi->invalid_x2 - wfi->invalid_x1;
height = wfi->invalid_y2 - wfi->invalid_y1;
@ -148,7 +148,7 @@ void wf_rfx_encode(freerdp_peer* client)
offset = (4 * wfi->invalid_x1) + (wfi->invalid_y1 * wfi->width * 4);
printf("width = %d, height = %d\n", width, height);
//printf("width = %d, height = %d\n", width, height);
rfx_compose_message(wfp->rfx_context, s, &rect, 1,
((uint8*) (buf->Userbuffer)) + offset, width, height, wfi->width * 4);
@ -268,11 +268,13 @@ void wf_peer_send_changes(rdpUpdate* update)
wf_info_updated(wfInfoSingleton);
/*
printf("\tSend...");
printf("\t(%d, %d), (%d, %d) [%dx%d]\n",
update->surface_bits_command.destLeft, update->surface_bits_command.destTop,
update->surface_bits_command.destRight, update->surface_bits_command.destBottom,
update->surface_bits_command.width, update->surface_bits_command.height);
*/
update->SurfaceBits(update->context, &update->surface_bits_command);
//wf_info_clear_invalid_region(wfInfoSingleton);
wfInfoSingleton->enc_data = false;