To handle a new format we should first be able to transform the format
name from the local clipboard owner into its remote representation. In
our case this will be trasforming the "text/uri-list" target into the
"FileGroupDescriptorW" named format.
Add CB_FORMAT_TEXTURILIST to identify the local format by its ID during
the data conversion step. This numeric ID has nothing to do with the ID
which will be sent to server. It's a bit weird, but that's how XFreeRDP
works.
After that add a new client format with this ID and appropriate local
and remote format names (in atom and formatName fields respectively).
Do this only if wClipboard actually supports "text/uri-list" format.
(It could fail to initialize the local file subsystem, in which case
it will fail all file-related requests and there would be no point in
advertising the file format support in the first place.)
Finally, handle the actual format data request for a new named format
in xf_cliprdr_process_requested_data(). Remember to convert the
FILEDESCRIPTOR array we receive from wClipboard into the
CLIPRDR_FILELIST expected by the server. Also take care to not leak
memory during this conversion.
Note that this handles only the CLIPRDR_FORMAT_DATA_REQUEST. The server
is still not able to retrieve the file content as this is done via a
separate request-reply sequence.
The format is described in MS-RDPECLIP 2.2.5.2.3 Packed File List
(CLIPRDR_FILELIST). These functions handle conversion between the
on-the-wire data from cliprdr and arrays of FILEDESCRIPTOR structs.
FILETIME handling is a bit wacky, but that's what we currently have.
The flags are defined by MS-RDPECLIP 2.2.5.2.3.1 File Descriptor
(CLIPRDR_FILEDESCRIPTOR) as well as by 'File Attribute Constants'
in WinAPI reference [1].
The idea is to delegate FILEDESCRIPTOR format processing to WinPR
instead of cliprdr channel, so move the struct definition there. The
definition used by cliprdr protocol is identical but with some fields
treated as reserved.
The defintions are placed into <winpr/shell.h> as FileGroupDescriptorW
is a shell clipboard format.
Also remove the definition of CLIPRDR_FILELIST. The clients would be
using WinPR to handle the file clipping, so CLIPRDR_FILELIST does not
have to be handled explicitly. The clients will have serialization and
deserialization functions to handle CLIPRDR_FILELIST.
[1]: https://msdn.microsoft.com/en-us/library/windows/desktop/gg258117(v=vs.85).aspx
Since this comes via a Wire-To-Surface-2 PDU we don't have
any left/top/right/bottom destination values.
The current code has always dealt with zeros when updating the
invalid region which resulted in black rectangles.
The correct update region is determined during decompression.
This callback is called when the client capabilities have been received. This callback
appears to be more useful than the Capabilities one that is called just before the server
sends its capabilities.
Since not all H264 decoders support multiple YUV420 output
buffers process H264 decoding and YUV to RGB conversion
sequentially to avoid overriding the input data.
Allow password to be stored in .RDP file and parsed and settings
updated, this will allow for dynamic .RDP files to be created with
complete login credentials, using this method the username, server and
password will no longer be visible within process lists.
Also fixed issue of username and domain being read from .RDP files and
set to null by command line processor.
FreeRDP/client/common/client.c: In function ‘freerdp_client_context_new’:
FreeRDP/client/common/client.c:86:38: warning: passing argument 1 of ‘freerdp_register_addin_provider’ from incompatible pointer type
if (freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry,
FreeRDP/include/freerdp/addin.h:60:17: note: expected ‘FREERDP_LOAD_CHANNEL_ADDIN_ENTRY_FN’ but argument is of type ‘void * (*)(const CHAR *, CHAR *, CHAR *, DWORD)’
FREERDP_API int freerdp_register_addin_provider(
In file included from FreeRDP/client/common/compatibility.c:27:0:
FreeRDP/include/freerdp/addin.h:60:17: note: expected ‘FREERDP_LOAD_CHANNEL_ADDIN_ENTRY_FN’ but argument is of type ‘void * (*)(const CHAR *, CHAR *, CHAR *, DWORD)’
FREERDP_API int freerdp_register_addin_provider(
gcc (Debian 4.9.2-10) 4.9.2
When copying image data consider formats that only differ on use
of alpha data equal. This allows using the optimized copy routine
instead of the slower color conversion routine. Fixes#3616
This PR contains following changes:
- Give rlgr encode/decode APIs a similar interface
- Make rlgr encode API accessible again
- Make it possible to exchange rlgr functions
- Make use of RLGR1/3 defines instead of 0/1 in decoding