Merge branch 'master' of github.com:awakecoding/FreeRDP into shadow

This commit is contained in:
Marc-André Moreau 2014-08-05 09:56:12 -04:00
commit 3895c930a3
162 changed files with 1785 additions and 683 deletions

0
.gitignore vendored Executable file → Normal file
View File

0
CMakeLists.txt Executable file → Normal file
View File

View File

@ -36,6 +36,7 @@
#include "cliprdr_main.h"
#include "cliprdr_format.h"
#ifdef WITH_DEBUG_CLIPRDR
static const char* const CB_MSG_TYPE_STRINGS[] =
{
"",
@ -51,6 +52,7 @@ static const char* const CB_MSG_TYPE_STRINGS[] =
"CB_LOCK_CLIPDATA"
"CB_UNLOCK_CLIPDATA"
};
#endif
CliprdrClientContext* cliprdr_get_client_interface(cliprdrPlugin* cliprdr)
{

View File

@ -66,8 +66,8 @@ struct _DISP_PLUGIN
DISP_LISTENER_CALLBACK* listener_callback;
UINT32 MaxNumMonitors;
UINT32 MaxMonitorWidth;
UINT32 MaxMonitorHeight;
UINT32 MaxMonitorAreaFactorA;
UINT32 MaxMonitorAreaFactorB;
};
typedef struct _DISP_PLUGIN DISP_PLUGIN;
@ -110,15 +110,9 @@ int disp_send_display_control_monitor_layout_pdu(DISP_CHANNEL_CALLBACK* callback
if (Monitors[index].Width < 200)
Monitors[index].Width = 200;
if (Monitors[index].Width > disp->MaxMonitorWidth)
Monitors[index].Width = disp->MaxMonitorWidth;
if (Monitors[index].Height < 200)
Monitors[index].Height = 200;
if (Monitors[index].Height > disp->MaxMonitorHeight)
Monitors[index].Height = disp->MaxMonitorHeight;
Stream_Write_UINT32(s, Monitors[index].Flags); /* Flags (4 bytes) */
Stream_Write_UINT32(s, Monitors[index].Left); /* Left (4 bytes) */
Stream_Write_UINT32(s, Monitors[index].Top); /* Top (4 bytes) */
@ -127,6 +121,8 @@ int disp_send_display_control_monitor_layout_pdu(DISP_CHANNEL_CALLBACK* callback
Stream_Write_UINT32(s, Monitors[index].PhysicalWidth); /* PhysicalWidth (4 bytes) */
Stream_Write_UINT32(s, Monitors[index].PhysicalHeight); /* PhysicalHeight (4 bytes) */
Stream_Write_UINT32(s, Monitors[index].Orientation); /* Orientation (4 bytes) */
Stream_Write_UINT32(s, Monitors[index].DesktopScaleFactor); /* DesktopScaleFactor (4 bytes) */
Stream_Write_UINT32(s, Monitors[index].DeviceScaleFactor); /* DeviceScaleFactor (4 bytes) */
#if 0
fprintf(stderr, "\t: Flags: 0x%04X\n", Monitors[index].Flags);
@ -138,9 +134,6 @@ int disp_send_display_control_monitor_layout_pdu(DISP_CHANNEL_CALLBACK* callback
fprintf(stderr, "\t: PhysicalHeight: %d\n", Monitors[index].PhysicalHeight);
fprintf(stderr, "\t: Orientation: %d\n", Monitors[index].Orientation);
#endif
Stream_Write_UINT32(s, Monitors[index].DesktopScaleFactor); /* DesktopScaleFactor (4 bytes) */
Stream_Write_UINT32(s, Monitors[index].DeviceScaleFactor); /* DeviceScaleFactor (4 bytes) */
}
Stream_SealLength(s);
@ -158,12 +151,15 @@ int disp_recv_display_control_caps_pdu(DISP_CHANNEL_CALLBACK* callback, wStream*
disp = (DISP_PLUGIN*) callback->plugin;
Stream_Read_UINT32(s, disp->MaxNumMonitors); /* MaxNumMonitors (4 bytes) */
Stream_Read_UINT32(s, disp->MaxMonitorWidth); /* MaxMonitorWidth (4 bytes) */
Stream_Read_UINT32(s, disp->MaxMonitorHeight); /* MaxMonitorHeight (4 bytes) */
if (Stream_GetRemainingLength(s) < 12)
return -1;
//fprintf(stderr, "DisplayControlCapsPdu: MaxNumMonitors: %d MaxMonitorWidth: %d MaxMonitorHeight: %d\n",
// disp->MaxNumMonitors, disp->MaxMonitorWidth, disp->MaxMonitorHeight);
Stream_Read_UINT32(s, disp->MaxNumMonitors); /* MaxNumMonitors (4 bytes) */
Stream_Read_UINT32(s, disp->MaxMonitorAreaFactorA); /* MaxMonitorAreaFactorA (4 bytes) */
Stream_Read_UINT32(s, disp->MaxMonitorAreaFactorB); /* MaxMonitorAreaFactorB (4 bytes) */
//fprintf(stderr, "DisplayControlCapsPdu: MaxNumMonitors: %d MaxMonitorAreaFactorA: %d MaxMonitorAreaFactorB: %d\n",
// disp->MaxNumMonitors, disp->MaxMonitorAreaFactorA, disp->MaxMonitorAreaFactorB);
return 0;
}
@ -173,6 +169,9 @@ int disp_recv_pdu(DISP_CHANNEL_CALLBACK* callback, wStream* s)
UINT32 type;
UINT32 length;
if (Stream_GetRemainingLength(s) < 8)
return -1;
Stream_Read_UINT32(s, type); /* Type (4 bytes) */
Stream_Read_UINT32(s, length); /* Length (4 bytes) */
@ -220,8 +219,10 @@ static int disp_on_new_channel_connection(IWTSListenerCallback* pListenerCallbac
DISP_CHANNEL_CALLBACK* callback;
DISP_LISTENER_CALLBACK* listener_callback = (DISP_LISTENER_CALLBACK*) pListenerCallback;
callback = (DISP_CHANNEL_CALLBACK*) malloc(sizeof(DISP_CHANNEL_CALLBACK));
ZeroMemory(callback, sizeof(DISP_CHANNEL_CALLBACK));
callback = (DISP_CHANNEL_CALLBACK*) calloc(1, sizeof(DISP_CHANNEL_CALLBACK));
if (!callback)
return -1;
callback->iface.OnDataReceived = disp_on_data_received;
callback->iface.OnClose = disp_on_close;
@ -240,8 +241,10 @@ static int disp_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager
int status;
DISP_PLUGIN* disp = (DISP_PLUGIN*) pPlugin;
disp->listener_callback = (DISP_LISTENER_CALLBACK*) malloc(sizeof(DISP_LISTENER_CALLBACK));
ZeroMemory(disp->listener_callback, sizeof(DISP_LISTENER_CALLBACK));
disp->listener_callback = (DISP_LISTENER_CALLBACK*) calloc(1, sizeof(DISP_LISTENER_CALLBACK));
if (!disp->listener_callback)
return -1;
disp->listener_callback->iface.OnNewChannelConnection = disp_on_new_channel_connection;
disp->listener_callback->plugin = pPlugin;
@ -281,11 +284,7 @@ int disp_send_monitor_layout(DispClientContext* context, UINT32 NumMonitors, DIS
return 1;
}
#ifdef STATIC_CHANNELS
#define DVCPluginEntry disp_DVCPluginEntry
#endif
int DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
int disp_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
int error = 0;
DISP_PLUGIN* disp;
@ -317,8 +316,8 @@ int DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
disp->iface.pInterface = (void*) context;
disp->MaxNumMonitors = 16;
disp->MaxMonitorWidth = 8192;
disp->MaxMonitorHeight = 8192;
disp->MaxMonitorAreaFactorA = 8192;
disp->MaxMonitorAreaFactorB = 8192;
error = pEntryPoints->RegisterPlugin(pEntryPoints, "disp", (IWTSPlugin*) disp);
}

View File

@ -31,8 +31,8 @@
#include <freerdp/client/disp.h>
#define DISPLAY_CONTROL_PDU_TYPE_CAPS 0x00000005
#define DISPLAY_CONTROL_PDU_TYPE_MONITOR_LAYOUT 0x00000002
#define DISPLAY_CONTROL_PDU_TYPE_CAPS 0x00000003
#endif /* FREERDP_CHANNEL_DISP_CLIENT_MAIN_H */

View File

@ -26,12 +26,11 @@
#include <string.h>
#include <winpr/crt.h>
#include <winpr/stream.h>
#include <winpr/cmdline.h>
#include <freerdp/addin.h>
#include <winpr/stream.h>
#include "echo_main.h"
typedef struct _ECHO_LISTENER_CALLBACK ECHO_LISTENER_CALLBACK;
@ -63,47 +62,21 @@ struct _ECHO_PLUGIN
static int echo_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream *data)
{
int error;
int status;
ECHO_CHANNEL_CALLBACK* callback = (ECHO_CHANNEL_CALLBACK*) pChannelCallback;
BYTE *pBuffer = Stream_Pointer(data);
UINT32 cbSize = Stream_GetRemainingLength(data);
#ifdef WITH_DEBUG_DVC
int i = 0;
char* debug_buffer;
char* p;
if (cbSize > 0)
{
debug_buffer = (char*) malloc(3 * cbSize);
ZeroMemory(debug_buffer, 3 * cbSize);
p = debug_buffer;
for (i = 0; i < (int) (cbSize - 1); i++)
{
sprintf(p, "%02x ", pBuffer[i]);
p += 3;
}
sprintf(p, "%02x", pBuffer[i]);
DEBUG_DVC("ECHO %d: %s", cbSize, debug_buffer);
free(debug_buffer);
}
#endif
BYTE* pBuffer = Stream_Pointer(data);
UINT32 cbSize = Stream_GetRemainingLength(data);
/* echo back what we have received. ECHO does not have any message IDs. */
error = callback->channel->Write(callback->channel, cbSize, pBuffer, NULL);
status = callback->channel->Write(callback->channel, cbSize, pBuffer, NULL);
return error;
return status;
}
static int echo_on_close(IWTSVirtualChannelCallback* pChannelCallback)
{
ECHO_CHANNEL_CALLBACK* callback = (ECHO_CHANNEL_CALLBACK*) pChannelCallback;
DEBUG_DVC("");
free(callback);
return 0;
@ -116,10 +89,10 @@ static int echo_on_new_channel_connection(IWTSListenerCallback* pListenerCallbac
ECHO_CHANNEL_CALLBACK* callback;
ECHO_LISTENER_CALLBACK* listener_callback = (ECHO_LISTENER_CALLBACK*) pListenerCallback;
DEBUG_DVC("");
callback = (ECHO_CHANNEL_CALLBACK*) calloc(1, sizeof(ECHO_CHANNEL_CALLBACK));
callback = (ECHO_CHANNEL_CALLBACK*) malloc(sizeof(ECHO_CHANNEL_CALLBACK));
ZeroMemory(callback, sizeof(ECHO_CHANNEL_CALLBACK));
if (!callback)
return -1;
callback->iface.OnDataReceived = echo_on_data_received;
callback->iface.OnClose = echo_on_close;
@ -136,10 +109,10 @@ static int echo_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager
{
ECHO_PLUGIN* echo = (ECHO_PLUGIN*) pPlugin;
DEBUG_DVC("");
echo->listener_callback = (ECHO_LISTENER_CALLBACK*) calloc(1, sizeof(ECHO_LISTENER_CALLBACK));
echo->listener_callback = (ECHO_LISTENER_CALLBACK*) malloc(sizeof(ECHO_LISTENER_CALLBACK));
ZeroMemory(echo->listener_callback, sizeof(ECHO_LISTENER_CALLBACK));
if (!echo->listener_callback)
return -1;
echo->listener_callback->iface.OnNewChannelConnection = echo_on_new_channel_connection;
echo->listener_callback->plugin = pPlugin;
@ -153,36 +126,35 @@ static int echo_plugin_terminated(IWTSPlugin* pPlugin)
{
ECHO_PLUGIN* echo = (ECHO_PLUGIN*) pPlugin;
DEBUG_DVC("");
free(echo);
if (echo)
{
free(echo);
}
return 0;
}
#ifdef STATIC_CHANNELS
#define DVCPluginEntry echo_DVCPluginEntry
#endif
int DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
int echo_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
int error = 0;
int status = 0;
ECHO_PLUGIN* echo;
echo = (ECHO_PLUGIN*) pEntryPoints->GetPlugin(pEntryPoints, "echo");
if (echo == NULL)
if (!echo)
{
echo = (ECHO_PLUGIN*) malloc(sizeof(ECHO_PLUGIN));
ZeroMemory(echo, sizeof(ECHO_PLUGIN));
echo = (ECHO_PLUGIN*) calloc(1, sizeof(ECHO_PLUGIN));
if (!echo)
return -1;
echo->iface.Initialize = echo_plugin_initialize;
echo->iface.Connected = NULL;
echo->iface.Disconnected = NULL;
echo->iface.Terminated = echo_plugin_terminated;
error = pEntryPoints->RegisterPlugin(pEntryPoints, "echo", (IWTSPlugin*) echo);
status = pEntryPoints->RegisterPlugin(pEntryPoints, "echo", (IWTSPlugin*) echo);
}
return error;
return status;
}

View File

@ -29,6 +29,7 @@
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/stream.h>
#include <winpr/sysinfo.h>
#include <freerdp/server/echo.h>
@ -166,7 +167,7 @@ static void* echo_server_thread_func(void* arg)
break;
}
IFCALL(echo->context.Response, &echo->context, (PCHAR) Stream_Buffer(s), BytesReturned);
IFCALL(echo->context.Response, &echo->context, (BYTE *) Stream_Buffer(s), BytesReturned);
}
Stream_Free(s, TRUE);

View File

@ -24,6 +24,8 @@
#include <winpr/crt.h>
#include <winpr/stream.h>
#include "rdpgfx_common.h"
#include "rdpgfx_codec.h"
int rdpgfx_decode_uncompressed(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
@ -46,8 +48,93 @@ int rdpgfx_decode_planar(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
return 1;
}
int rdpgfx_read_h264_metablock(RDPGFX_PLUGIN* gfx, wStream* s, RDPGFX_H264_METABLOCK* meta)
{
UINT32 index;
RDPGFX_RECT16* regionRect;
RDPGFX_H264_QUANT_QUALITY* quantQualityVal;
if (Stream_GetRemainingLength(s) < 4)
return -1;
Stream_Read_UINT32(s, meta->numRegionRects); /* numRegionRects (4 bytes) */
if (Stream_GetRemainingLength(s) < (meta->numRegionRects * 8))
return -1;
meta->regionRects = (RDPGFX_RECT16*) malloc(meta->numRegionRects * sizeof(RDPGFX_RECT16));
if (!meta->regionRects)
return -1;
meta->quantQualityVals = (RDPGFX_H264_QUANT_QUALITY*) malloc(meta->numRegionRects * sizeof(RDPGFX_H264_QUANT_QUALITY));
if (!meta->quantQualityVals)
return -1;
printf("H264_METABLOCK: numRegionRects: %d\n", (int) meta->numRegionRects);
for (index = 0; index < meta->numRegionRects; index++)
{
regionRect = &(meta->regionRects[index]);
rdpgfx_read_rect16(s, regionRect);
printf("regionRects[%d]: left: %d top: %d right: %d bottom: %d\n",
index, regionRect->left, regionRect->top, regionRect->right, regionRect->bottom);
}
if (Stream_GetRemainingLength(s) < (meta->numRegionRects * 2))
return -1;
for (index = 0; index < meta->numRegionRects; index++)
{
quantQualityVal = &(meta->quantQualityVals[index]);
Stream_Read_UINT8(s, quantQualityVal->qpVal); /* qpVal (1 byte) */
Stream_Read_UINT8(s, quantQualityVal->qualityVal); /* qualityVal (1 byte) */
quantQualityVal->qp = quantQualityVal->qpVal & 0x3F;
quantQualityVal->r = (quantQualityVal->qpVal >> 6) & 1;
quantQualityVal->p = (quantQualityVal->qpVal >> 7) & 1;
printf("quantQualityVals[%d]: qp: %d r: %d p: %d qualityVal: %d\n",
index, quantQualityVal->qp, quantQualityVal->r, quantQualityVal->p, quantQualityVal->qualityVal);
}
return 1;
}
int rdpgfx_decode_h264(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
{
int status;
wStream* s;
RDPGFX_H264_BITMAP_STREAM h264;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
s = Stream_New(cmd->data, cmd->length);
if (!s)
return -1;
status = rdpgfx_read_h264_metablock(gfx, s, &(h264.meta));
if (status < 0)
return -1;
h264.data = Stream_Pointer(s);
h264.length = (UINT32) Stream_GetRemainingLength(s);
Stream_Free(s, FALSE);
cmd->extra = (void*) &h264;
if (context && context->SurfaceCommand)
{
context->SurfaceCommand(context, cmd);
}
free(h264.meta.regionRects);
free(h264.meta.quantQualityVals);
return 1;
}

View File

@ -426,9 +426,16 @@ int rdpgfx_recv_wire_to_surface_1_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream
cmd.length = pdu.bitmapDataLength;
cmd.data = pdu.bitmapData;
if (context && context->SurfaceCommand)
if (cmd.codecId == RDPGFX_CODECID_H264)
{
context->SurfaceCommand(context, &cmd);
rdpgfx_decode(gfx, &cmd);
}
else
{
if (context && context->SurfaceCommand)
{
context->SurfaceCommand(context, &cmd);
}
}
return 1;
@ -1033,11 +1040,7 @@ void* rdpgfx_get_cache_slot_data(RdpgfxClientContext* context, UINT16 cacheSlot)
return pData;
}
#ifdef STATIC_CHANNELS
#define DVCPluginEntry rdpgfx_DVCPluginEntry
#endif
int DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
int rdpgfx_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
int status = 0;
RDPGFX_PLUGIN* gfx;
@ -1095,6 +1098,9 @@ int DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
gfx->zgfx = zgfx_context_new(FALSE);
if (!gfx->zgfx)
return -1;
status = pEntryPoints->RegisterPlugin(pEntryPoints, "rdpgfx", (IWTSPlugin*) gfx);
}

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 838 B

After

Width:  |  Height:  |  Size: 838 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 827 B

After

Width:  |  Height:  |  Size: 827 B

View File

Before

Width:  |  Height:  |  Size: 810 B

After

Width:  |  Height:  |  Size: 810 B

View File

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 492 B

View File

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 488 B

View File

Before

Width:  |  Height:  |  Size: 473 B

After

Width:  |  Height:  |  Size: 473 B

View File

Before

Width:  |  Height:  |  Size: 456 B

After

Width:  |  Height:  |  Size: 456 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 492 B

View File

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 474 B

View File

Before

Width:  |  Height:  |  Size: 504 B

After

Width:  |  Height:  |  Size: 504 B

View File

Before

Width:  |  Height:  |  Size: 493 B

After

Width:  |  Height:  |  Size: 493 B

View File

Before

Width:  |  Height:  |  Size: 937 B

After

Width:  |  Height:  |  Size: 937 B

View File

Before

Width:  |  Height:  |  Size: 917 B

After

Width:  |  Height:  |  Size: 917 B

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
client/Mac/CMakeLists.txt Executable file → Normal file
View File

0
client/Mac/Credits.rtf Executable file → Normal file
View File

0
client/Mac/MRDPView.h Executable file → Normal file
View File

0
client/Mac/cli/MainMenu.xib Executable file → Normal file
View File

0
client/Mac/mf_client.h Executable file → Normal file
View File

0
client/Mac/mf_client.m Executable file → Normal file
View File

View File

@ -67,6 +67,14 @@ int xf_ResetGraphics(RdpgfxClientContext* context, RDPGFX_RESET_GRAPHICS_PDU* re
xfc->h264 = h264_context_new(FALSE);
if (xfc->progressive)
{
progressive_context_free(xfc->progressive);
xfc->progressive = NULL;
}
xfc->progressive = progressive_context_new(TRUE);
region16_init(&(xfc->invalidRegion));
xfc->graphicsReset = TRUE;
@ -336,9 +344,30 @@ int xf_SurfaceCommand_Planar(xfContext* xfc, RdpgfxClientContext* context, RDPGF
int xf_SurfaceCommand_H264(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int status;
UINT32 i, j;
int nXDst, nYDst;
int nWidth, nHeight;
int nbUpdateRects;
BYTE* DstData = NULL;
RDPGFX_RECT16* rect;
H264_CONTEXT* h264;
xfGfxSurface* surface;
RECTANGLE_16 invalidRect;
REGION16 updateRegion;
RECTANGLE_16 updateRect;
RECTANGLE_16* updateRects;
REGION16 clippingRects;
RECTANGLE_16 clippingRect;
RDPGFX_H264_METABLOCK* meta;
RDPGFX_H264_BITMAP_STREAM* bs;
h264 = xfc->h264;
bs = (RDPGFX_H264_BITMAP_STREAM*) cmd->extra;
if (!bs)
return -1;
meta = &(bs->meta);
surface = (xfGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
@ -347,15 +376,61 @@ int xf_SurfaceCommand_H264(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_
DstData = surface->data;
#if 1
status = h264_decompress(xfc->h264, cmd->data, cmd->length, &DstData,
status = h264_decompress(xfc->h264, bs->data, bs->length, &DstData,
PIXEL_FORMAT_XRGB32, surface->scanline, cmd->left, cmd->top, cmd->width, cmd->height);
#else
status = -1;
#endif
printf("xf_SurfaceCommand_H264: status: %d\n", status);
if (status < 0)
return -1;
region16_init(&clippingRects);
for (i = 0; i < meta->numRegionRects; i++)
{
rect = &(meta->regionRects[i]);
clippingRect.left = rect->left;
clippingRect.top = rect->top;
clippingRect.right = rect->right;
clippingRect.bottom = rect->bottom;
region16_union_rect(&clippingRects, &clippingRects, &clippingRect);
}
updateRect.left = cmd->left;
updateRect.top = cmd->top;
updateRect.right = cmd->right;
updateRect.bottom = cmd->bottom;
region16_init(&updateRegion);
region16_intersect_rect(&updateRegion, &clippingRects, &updateRect);
updateRects = (RECTANGLE_16*) region16_rects(&updateRegion, &nbUpdateRects);
printf("numRegionRects: %d nbUpdateRects: %d\n", meta->numRegionRects, nbUpdateRects);
for (j = 0; j < nbUpdateRects; j++)
{
nXDst = updateRects[j].left;
nYDst = updateRects[j].top;
nWidth = updateRects[j].right - updateRects[j].left;
nHeight = updateRects[j].bottom - updateRects[j].top;
/* update region from decoded H264 buffer */
printf("nXDst: %d nYDst: %d nWidth: %d nHeight: %d decoded: width: %d height: %d cmd: left: %d top: %d right: %d bottom: %d\n",
nXDst, nYDst, nWidth, nHeight, h264->width, h264->height,
cmd->left, cmd->top, cmd->right, cmd->bottom);
freerdp_image_copy(surface->data, PIXEL_FORMAT_XRGB32, surface->scanline,
nXDst, nYDst, nWidth, nHeight,
h264->data, PIXEL_FORMAT_XRGB32, h264->scanline, nXDst, nYDst);
region16_union_rect(&(xfc->invalidRegion), &(xfc->invalidRegion), &updateRects[j]);
}
region16_uninit(&updateRegion);
#if 0
/* fill with red for now to distinguish from the rest */
@ -363,13 +438,6 @@ int xf_SurfaceCommand_H264(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_
cmd->left, cmd->top, cmd->width, cmd->height, 0xFF0000);
#endif
invalidRect.left = cmd->left;
invalidRect.top = cmd->top;
invalidRect.right = cmd->right;
invalidRect.bottom = cmd->bottom;
region16_union_rect(&(xfc->invalidRegion), &(xfc->invalidRegion), &invalidRect);
if (!xfc->inGfxFrame)
xf_OutputUpdate(xfc);
@ -410,6 +478,7 @@ int xf_SurfaceCommand_Alpha(xfContext* xfc, RdpgfxClientContext* context, RDPGFX
int xf_SurfaceCommand_Progressive(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int status = 0;
BYTE* DstData = NULL;
xfGfxSurface* surface;
RECTANGLE_16 invalidRect;
@ -418,6 +487,17 @@ int xf_SurfaceCommand_Progressive(xfContext* xfc, RdpgfxClientContext* context,
if (!surface)
return -1;
DstData = surface->data;
status = progressive_decompress(xfc->progressive, cmd->data, cmd->length, &DstData,
PIXEL_FORMAT_XRGB32, surface->scanline, cmd->left, cmd->top, cmd->width, cmd->height);
if (status < 0)
{
printf("progressive_decompress failure: %d\n", status);
return -1;
}
printf("xf_SurfaceCommand_Progressive: status: %d\n", status);
/* fill with blue for now to distinguish from the rest */

View File

@ -35,6 +35,7 @@ typedef struct xf_context xfContext;
#include <freerdp/codec/color.h>
#include <freerdp/codec/bitmap.h>
#include <freerdp/codec/h264.h>
#include <freerdp/codec/progressive.h>
#include <freerdp/codec/region.h>
struct xf_WorkArea
@ -155,6 +156,7 @@ struct xf_context
NSC_CONTEXT* nsc;
CLEAR_CONTEXT* clear;
H264_CONTEXT* h264;
PROGRESSIVE_CONTEXT* progressive;
void* xv_context;
void* clipboard_context;

View File

@ -102,6 +102,57 @@ HANDLE freerdp_client_get_thread(rdpContext* context)
return ((rdpClientContext*) context)->thread;
}
static BOOL freerdp_client_settings_post_process(rdpSettings* settings)
{
/* Moved GatewayUseSameCredentials logic outside of cmdline.c, so
* that the rdp file also triggers this functionality */
if (settings->GatewayEnabled)
{
if (settings->GatewayUseSameCredentials)
{
if (settings->Username)
{
settings->GatewayUsername = _strdup(settings->Username);
if (!settings->GatewayUsername)
goto out_error;
}
if (settings->Domain)
{
settings->GatewayDomain = _strdup(settings->Domain);
if (!settings->GatewayDomain)
goto out_error;
}
if (settings->Password)
{
settings->GatewayPassword = _strdup(settings->Password);
if (!settings->GatewayPassword)
goto out_error;
}
}
}
/* Moved logic for Multimon and Span monitors to force fullscreen, so
* that the rdp file also triggers this functionality */
if (settings->SpanMonitors)
{
settings->UseMultimon = TRUE;
settings->Fullscreen = TRUE;
}
else if (settings->UseMultimon)
{
settings->Fullscreen = TRUE;
}
return TRUE;
out_error:
free(settings->GatewayUsername);
free(settings->GatewayDomain);
free(settings->GatewayPassword);
return FALSE;
}
int freerdp_client_settings_parse_command_line(rdpSettings* settings, int argc, char** argv)
{
int status;
@ -123,6 +174,15 @@ int freerdp_client_settings_parse_command_line(rdpSettings* settings, int argc,
{
status = freerdp_client_settings_parse_assistance_file(settings, settings->AssistanceFile);
}
/* Only call post processing if no status/error was returned*/
if (status < 0)
return status;
/* This function will call logic that is applicable to the settings
* from command line parsing AND the rdp file parsing */
if(!freerdp_client_settings_post_process(settings))
status = -1;
return status;
}
@ -198,3 +258,4 @@ int freerdp_client_settings_parse_assistance_file(rdpSettings* settings, const c
return 0;
}

View File

@ -127,6 +127,8 @@ COMMAND_LINE_ARGUMENT_A args[] =
{ "sec-tls", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "tls protocol security" },
{ "sec-nla", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "nla protocol security" },
{ "sec-ext", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "nla extended protocol security" },
{ "tls-ciphers", COMMAND_LINE_VALUE_REQUIRED, NULL, NULL, NULL, -1, NULL, "List of permitted openssl ciphers - see ciphers(1)" },
{ "tls-ciphers-netmon", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "Use tls ciphers that netmon can parse" },
{ "cert-name", COMMAND_LINE_VALUE_REQUIRED, "<name>", NULL, NULL, -1, NULL, "certificate name" },
{ "cert-ignore", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "ignore certificate" },
{ "pcb", COMMAND_LINE_VALUE_REQUIRED, "<blob>", NULL, NULL, -1, NULL, "Preconnection Blob" },
@ -1279,8 +1281,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
CommandLineSwitchCase(arg, "multimon")
{
settings->UseMultimon = TRUE;
settings->SpanMonitors = FALSE;
settings->Fullscreen = TRUE;
if (arg->Flags & COMMAND_LINE_VALUE_PRESENT)
{
@ -1292,9 +1292,7 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
}
CommandLineSwitchCase(arg, "span")
{
settings->UseMultimon = TRUE;
settings->SpanMonitors = TRUE;
settings->Fullscreen = TRUE;
}
CommandLineSwitchCase(arg, "workarea")
{
@ -1753,6 +1751,14 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
{
settings->ExtSecurity = arg->Value ? TRUE : FALSE;
}
CommandLineSwitchCase(arg, "tls-ciphers")
{
settings->PermittedTLSCiphers = _strdup(arg->Value);
}
CommandLineSwitchCase(arg, "tls-ciphers-netmon")
{
settings->PermittedTLSCiphers = arg->Value ? _strdup("ALL:!ECDH") : NULL;
}
CommandLineSwitchCase(arg, "cert-name")
{
settings->CertificateName = _strdup(arg->Value);
@ -1895,21 +1901,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
freerdp_performance_flags_make(settings);
if (settings->GatewayEnabled)
{
if (settings->GatewayUseSameCredentials)
{
if (settings->Username)
settings->GatewayUsername = _strdup(settings->Username);
if (settings->Domain)
settings->GatewayDomain = _strdup(settings->Domain);
if (settings->Password)
settings->GatewayPassword = _strdup(settings->Password);
}
}
if (settings->SupportGraphicsPipeline)
{
settings->FastPathOutput = TRUE;

View File

@ -1013,6 +1013,11 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
freerdp_set_param_bool(settings, FreeRDP_RedirectDrives, TRUE);
}
if (~file->KeyboardHook)
{
freerdp_set_param_uint32(settings, FreeRDP_KeyboardHook, file->KeyboardHook);
}
if (file->argc > 1)
{
char* ConnectionFile = settings->ConnectionFile;

0
client/iOS/FreeRDP/ios_freerdp_events.h Executable file → Normal file
View File

0
client/iOS/FreeRDP/ios_freerdp_events.m Executable file → Normal file
View File

0
client/iOS/Misc/Reachability.h Executable file → Normal file
View File

0
client/iOS/Misc/Reachability.m Executable file → Normal file
View File

0
client/iOS/Misc/SFHFKeychainUtils.h Executable file → Normal file
View File

0
client/iOS/Misc/SFHFKeychainUtils.m Executable file → Normal file
View File

0
client/iOS/Resources/Default-568h@2x.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

0
client/iOS/Resources/Default-Landscape@2x~ipad.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

0
client/iOS/Resources/Default-Landscape~ipad.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

0
client/iOS/Resources/Default-Portrait@2x~ipad.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

0
client/iOS/Resources/Default-Portrait~ipad.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

0
client/iOS/Resources/Default.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

0
client/iOS/Resources/Default@2x.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

0
client/iOS/Resources/Icon-72.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
client/iOS/Resources/Icon-72@2x.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

0
client/iOS/Resources/Icon.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

0
client/iOS/Resources/Icon@2x.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

0
client/iOS/Resources/about_page/FreeRDP_Logo.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

0
client/iOS/Resources/about_page/about.html Executable file → Normal file
View File

0
client/iOS/Resources/about_page/about_phone.html Executable file → Normal file
View File

0
client/iOS/Resources/about_page/back.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
client/iOS/Resources/help_page/back.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

0
client/iOS/Resources/help_page/gestures.html Executable file → Normal file
View File

0
client/iOS/Resources/help_page/gestures.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

0
client/iOS/Resources/help_page/gestures_phone.html Executable file → Normal file
View File

0
client/iOS/Resources/help_page/gestures_phone.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

0
client/iOS/Resources/help_page/nav_gestures.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

0
client/iOS/Resources/help_page/nav_toolbar.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

0
client/iOS/Resources/help_page/nav_touch_pointer.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

0
client/iOS/Resources/help_page/toolbar.html Executable file → Normal file
View File

0
client/iOS/Resources/help_page/toolbar.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
client/iOS/Resources/help_page/toolbar_phone.html Executable file → Normal file
View File

0
client/iOS/Resources/help_page/toolbar_phone.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

0
client/iOS/Resources/help_page/touch_pointer.html Executable file → Normal file
View File

0
client/iOS/Resources/help_page/touch_pointer.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

View File

0
client/iOS/Resources/help_page/touch_pointer_phone.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

0
client/iOS/Resources/icon_accessory_star_off.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 771 B

After

Width:  |  Height:  |  Size: 771 B

0
client/iOS/Resources/icon_accessory_star_on.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
client/iOS/Resources/icon_key_arrow_down.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 237 B

0
client/iOS/Resources/icon_key_arrow_left.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

0
client/iOS/Resources/icon_key_arrow_right.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 249 B

0
client/iOS/Resources/icon_key_arrow_up.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 232 B

0
client/iOS/Resources/icon_key_arrows.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 317 B

0
client/iOS/Resources/icon_key_backspace.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 583 B

After

Width:  |  Height:  |  Size: 583 B

0
client/iOS/Resources/icon_key_menu.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 606 B

0
client/iOS/Resources/icon_key_return.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 265 B

0
client/iOS/Resources/icon_key_win.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 588 B

After

Width:  |  Height:  |  Size: 588 B

0
client/iOS/Resources/keyboard_button_background.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

0
client/iOS/Resources/tabbar_icon_about.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 390 B

0
client/iOS/Resources/tabbar_icon_help.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 471 B

0
client/iOS/Resources/tabbar_icon_settings.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 541 B

0
client/iOS/Resources/toolbar_icon_disconnect.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

0
client/iOS/Resources/toolbar_icon_extkeyboad.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

0
client/iOS/Resources/toolbar_icon_home.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
client/iOS/Resources/toolbar_icon_keyboard.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

0
client/iOS/Resources/toolbar_icon_touchpointer.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

0
client/iOS/Resources/toolbar_icon_win.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 584 B

After

Width:  |  Height:  |  Size: 584 B

Some files were not shown because too many files have changed in this diff Show More