xorg: capture change
This commit is contained in:
parent
1291d2dbbe
commit
ccd75bd4cd
@ -668,7 +668,6 @@ rdpCapture2(rdpClientCon *clientCon,
|
|||||||
rdpRegionInit(&lin_reg, NullBox, 0);
|
rdpRegionInit(&lin_reg, NullBox, 0);
|
||||||
pin_reg = &temp_reg;
|
pin_reg = &temp_reg;
|
||||||
}
|
}
|
||||||
|
|
||||||
extents_rect = *rdpRegionExtents(pin_reg);
|
extents_rect = *rdpRegionExtents(pin_reg);
|
||||||
y = extents_rect.y1 & ~63;
|
y = extents_rect.y1 & ~63;
|
||||||
while (y < extents_rect.y2)
|
while (y < extents_rect.y2)
|
||||||
|
@ -523,6 +523,8 @@ rdpClientConProcessMsgVersion(rdpPtr dev, rdpClientCon *clientCon,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define LALIGN(_num, _po2) ((_num + ((_po2) - 1)) & ~((_po2) - 1))
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/*
|
/*
|
||||||
this from miScreenInit
|
this from miScreenInit
|
||||||
@ -544,6 +546,8 @@ rdpClientConProcessScreenSizeMsg(rdpPtr dev, rdpClientCon *clientCon,
|
|||||||
clientCon->rdp_width = width;
|
clientCon->rdp_width = width;
|
||||||
clientCon->rdp_height = height;
|
clientCon->rdp_height = height;
|
||||||
clientCon->rdp_bpp = bpp;
|
clientCon->rdp_bpp = bpp;
|
||||||
|
clientCon->cap_width = width;
|
||||||
|
clientCon->cap_height = height;
|
||||||
|
|
||||||
if (bpp < 15)
|
if (bpp < 15)
|
||||||
{
|
{
|
||||||
@ -649,7 +653,8 @@ rdpClientConProcessMsgClientInput(rdpPtr dev, rdpClientCon *clientCon)
|
|||||||
}
|
}
|
||||||
else if (msg == 300) /* resize desktop */
|
else if (msg == 300) /* resize desktop */
|
||||||
{
|
{
|
||||||
rdpClientConProcessScreenSizeMsg(dev, clientCon, param1, param2, param3);
|
rdpClientConProcessScreenSizeMsg(dev, clientCon, param1,
|
||||||
|
param2, param3);
|
||||||
}
|
}
|
||||||
else if (msg == 301) /* version */
|
else if (msg == 301) /* version */
|
||||||
{
|
{
|
||||||
@ -696,6 +701,27 @@ rdpClientConProcessMsgClientInfo(rdpPtr dev, rdpClientCon *clientCon)
|
|||||||
clientCon->rdp_format = clientCon->client_info.capture_format;
|
clientCon->rdp_format = clientCon->client_info.capture_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (clientCon->client_info.capture_code == 2) /* RFX */
|
||||||
|
{
|
||||||
|
LLOGLN(0, ("rdpClientConProcessMsgClientInfo: got RFX capture"));
|
||||||
|
clientCon->cap_width = LALIGN(clientCon->rdp_width, 64);
|
||||||
|
clientCon->cap_height = LALIGN(clientCon->rdp_height, 64);
|
||||||
|
LLOGLN(0, (" cap_width %d cap_height %d",
|
||||||
|
clientCon->cap_width, clientCon->cap_height));
|
||||||
|
if (clientCon->shmemptr != 0)
|
||||||
|
{
|
||||||
|
shmdt(clientCon->shmemptr);
|
||||||
|
}
|
||||||
|
bytes = clientCon->cap_width * clientCon->cap_height *
|
||||||
|
clientCon->rdp_Bpp;
|
||||||
|
clientCon->shmemid = shmget(IPC_PRIVATE, bytes, IPC_CREAT | 0777);
|
||||||
|
clientCon->shmemptr = shmat(clientCon->shmemid, 0, 0);
|
||||||
|
shmctl(clientCon->shmemid, IPC_RMID, NULL);
|
||||||
|
LLOGLN(0, ("rdpClientConProcessMsgClientInfo: shmemid %d shmemptr %p "
|
||||||
|
"bytes %d", clientCon->shmemid, clientCon->shmemptr, bytes));
|
||||||
|
clientCon->shmem_lineBytes = clientCon->rdp_Bpp * clientCon->cap_width;
|
||||||
|
}
|
||||||
|
|
||||||
if (clientCon->client_info.offscreen_support_level > 0)
|
if (clientCon->client_info.offscreen_support_level > 0)
|
||||||
{
|
{
|
||||||
if (clientCon->client_info.offscreen_cache_entries > 0)
|
if (clientCon->client_info.offscreen_cache_entries > 0)
|
||||||
@ -1942,8 +1968,8 @@ rdpClientConSendPaintRectShmEx(rdpPtr dev, rdpClientCon *clientCon,
|
|||||||
out_uint32_le(s, clientCon->rect_id);
|
out_uint32_le(s, clientCon->rect_id);
|
||||||
out_uint32_le(s, id->shmem_id);
|
out_uint32_le(s, id->shmem_id);
|
||||||
out_uint32_le(s, id->shmem_offset);
|
out_uint32_le(s, id->shmem_offset);
|
||||||
out_uint16_le(s, clientCon->rdp_width);
|
out_uint16_le(s, clientCon->cap_width);
|
||||||
out_uint16_le(s, clientCon->rdp_height);
|
out_uint16_le(s, clientCon->cap_height);
|
||||||
|
|
||||||
rdpClientConEndUpdate(dev, clientCon);
|
rdpClientConEndUpdate(dev, clientCon);
|
||||||
|
|
||||||
@ -1991,8 +2017,8 @@ rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
|
|||||||
if (rdpCapture(clientCon, clientCon->dirtyRegion, &rects, &num_rects,
|
if (rdpCapture(clientCon, clientCon->dirtyRegion, &rects, &num_rects,
|
||||||
id.pixels, id.width, id.height,
|
id.pixels, id.width, id.height,
|
||||||
id.lineBytes, XRDP_a8r8g8b8, id.shmem_pixels,
|
id.lineBytes, XRDP_a8r8g8b8, id.shmem_pixels,
|
||||||
clientCon->rdp_width, clientCon->rdp_height,
|
clientCon->cap_width, clientCon->cap_height,
|
||||||
clientCon->rdp_width * clientCon->rdp_Bpp,
|
clientCon->cap_width * clientCon->rdp_Bpp,
|
||||||
clientCon->rdp_format, clientCon->client_info.capture_code))
|
clientCon->rdp_format, clientCon->client_info.capture_code))
|
||||||
{
|
{
|
||||||
LLOGLN(10, ("rdpDeferredUpdateCallback: num_rects %d", num_rects));
|
LLOGLN(10, ("rdpDeferredUpdateCallback: num_rects %d", num_rects));
|
||||||
|
@ -80,6 +80,8 @@ struct _rdpClientCon
|
|||||||
int rdp_width;
|
int rdp_width;
|
||||||
int rdp_height;
|
int rdp_height;
|
||||||
int rdp_format; /* XRDP_a8r8g8b8, XRDP_r5g6b5, ... */
|
int rdp_format; /* XRDP_a8r8g8b8, XRDP_r5g6b5, ... */
|
||||||
|
int cap_width;
|
||||||
|
int cap_height;
|
||||||
|
|
||||||
int rdpIndex; /* current os target */
|
int rdpIndex; /* current os target */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user