Add support for new graphics redirection protocol (aka VAIL) used by
WSLg. This protocol is currently being documented and the official
documentation will be posted in the near future.
When uploading large ICON (96x96), we end up growing the stream
mid-update. Stream_EnsureCapacity end up reallocating the stream
with a larger capacity to accomodate the large ICON size, but in
doing so, also updating the sealed length for the data currently in
the stream. This breaks the assumption between update_begin_paint
and update_end_paint where the sealed lenght is used to keep track
of the location where we need to update the orders counts after
we're done accumulating update. As a result of the growth and lost
of that location, the number of orders is written to the wrong
location and the resulting stream is invalid which result in a
protocol violation and a connection drop.
The current fix uses a new offsetOrder in the update object to
keep track of where update_end_paint needs to write the number
of orders contained. I think a better fix would be for
Stream_EnsureCapacity to preserve the sealead length of the
stream on growth, but this has a much more significant impact and
careful analysis needs to be done to ensure this doesn't violate
other assumption. Need to follow up with FreeRDP developer to get
their take on this one.
* All channels inheriting from RDPDR_DRIVE base struct
* Add functions to create/free a new device of a type
* Fixed settings array resize code, prevent 0 sizes
The proxy server component might receive input related events
before the proxy client has established the connection to the
target machine.
With this change, the current keyboard state is cached and sent
to the target when it is ready. All input events received before
the target is ready are discarded.
* Added transport_get_context to get rdpContext in IO callbacks.
* Added WINPR_ASSERT where possible.
* Fixed handle count mismatch in transport_get_event_handles
* Split out proxy headers and moved to public API to allow external
modules to be built.
* Split proxy into proxy library and proxy binary. The library
can be used by other applications and provides a simple API
* Improved channel passthrough, now all channels including dynamic
channels work.
* Extended module API to hook more events, improved module samples
* Cleaned up proxy code, removed global static variables used,
added WINPR_ASSERT
* Added transport_get_context to get rdpContext in IO callbacks.
* Added WINPR_ASSERT where possible.
* Fixed handle count mismatch in transport_get_event_handles
RDPSND channel is special, as it has many names.
(e.g. static channel, dynamic channel and UDP one.
Use RDPSND_CHANNEL_NAME to identify the module name instad of
RDPSND_DVC_CHANNEL_NAME
* Use freerdp_settings_* for shadow and sample server
* Added freerdp_peer_set_local_and_hostname
* Code cleanups and WINPR_ASSERT
* Code cleanups
* Use CHANNEL_NAME_LEN where appropriate
* Use temporary variables in loop instead of direct array access
* Fixed research for native PCM format
* Fixed compatibility detection for resampling
* dsp: Makes channel mix and encoding process use separated buffers
* Give FramesPerPacket to freerdp_dsp_context_reset function
* dsp: Fix DVI_ADPCM codec by respecting the required packet size
* Forbid mono channel in macos
* Fix audin command line channel option
* Disable ADPCM codec as it does not work
* Refactor valid native codec research
* Native codec research: Try different channels number
* Fix dsp channel mix
* Fix dsp resample
* Added new function pointers to cancel a pending operation
* Added new function pointers to send custom event flags
* Added exposed feature mask to disable channel features
(some client side channels and all server side channels still need to be
ported to new api)
server: build fix, do not disable threads for rfx encoder
cliprdr client channel: implemented support for DisableThreads option
looks like thread does not make sense at all for this channel
do not initialize disabled image codecs (respect settings)
channels: client: rail: added support for DisableThreads setting
changed "BOOL DisableThreads" to "UINT32 ThreadingFlags"
dropped unnecessary apu changes
draft implementation of threading settings aware message handling api
for addins/channels
rail: use new messaging api
fixed memory leak
msgs handlers external api changes (as requested)
msgs_handlers: init fix
fixed memory leak
logic fix
resolved problems appeared after rebase to master, dropped unnecessary
changes
git clang-format origin/master
fixed TestFreeRDPCodecRemoteFX.c
"formatting, run `clang-format` please"
properly use new "rfx_context_new(BOOL, UINT32)" everywhere
passed Threading Flags to "rfx_context_new" where available
in older C standarts veriables declaration must be done before any code
requested changes
clang-format as requested
use broken signatures of standert C functions for m$ s**tos
clang-format
requested changes
requested changes
moved ThreadingFlags to stable api zone
define type for channel msg handler
typo fix
clang-format
build fix
us ThreadingFlags from server settings
git clang-format origin/master
clang-format
Removes the changes to connection type in gcc_write_client_core_data and
adds some checks if network detection is enabled when receiving network
detection requests.
I personally find it more convenient to have pasted data written to
the X11 PRIMARY selection, so that I can paste it with a fast middle-
button click, than to write to CLIPBOARD which typically needs a key
sequence or menu action.
This commit adds a command-line option to let me express that
preference: now I can say "/clipboard:use-selection:PRIMARY" on the
command line, which not only enables clipboard transfer but also says
which X selection I want it to talk to. The previous options
"+clipboard" and "-clipboard" are also still supported.
This PR gets rid of some unneeded/unused field and functions in the
channel handling code. It also makes it possible to call
VirtualChannelWrite from any thread like the Windows API allows. The
only restriction is that the channel must be initialized
(VirtualChannelInit) from the same thread that called freerdp_connect.
* Pass on proper command type to application
* On send let the server implementation decide to send
2.2.9.2.1 Set Surface Bits Command (TS_SURFCMD_SET_SURF_BITS) or
2.2.9.2.2 Stream Surface Bits Command (TS_SURFCMD_STREAM_SURF_BITS)
Thanks to @viniciusjarina for tracing the issue down.
Since the EGFX Reset Graphics PDU seems to be optional,
the graphicsReset variable (which is updated in that PDU's handler)
should be removed from the rdp_gdi struct with the next change
in public headers (as in freerdp v3).
There are still some clients that expect and check it and therefore
we keep it for now, initialized with TRUE.
sdas
This PR contains the following changes:
- Get rid of unused SettingsModified array (kept in the settings struct for ABI
compatibility)
- Fix and extend freerdp_client_populate_rdp_file_form_settings (wrote <null> strings to the rdp file, missed a lot of settings)
- Set KeyboardHook default value to 2 (hook in fullscreen) just as mstsc
does
* Add support for C++ plugins.
* Seperate between a "module" and a "plugin": a module is a shared
library that exposes a function called "proxy_module_entry_point". This
function gets a parameter to `proxyPluginsManager*`, which can be used to
register plugins.
* Refine the API of the modules infrastructure:
* use proxyData* instead of rdpContext* when firing a hook or calling a filter.
* use clearer names.
* Instead of having to specify a path for each module to be loaded in
the configuration, the proxy now loads modules from specificed
directory, using the CMAKE variable PROXY_PLUGINDIR.
* Add an option to specify required plugins: plugins that the proxy
wouldn't start without having them fully loaded.
This macro replaces the multiple instances where the current
error state is checked before setting an optional error state.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
This new function allows better logging of call locations
for errors. Additionally added freerdp_set_error_log macro
to record function, file and line the error was set.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
* Added default format callback for rdpsnd backend to allow
different default input formats (different samplerates, ...)
* Made WINMM backend in flight packet limitation a compile time
option
* Fixed missing buffer copy in winmm backend
Signed-off-by: Armin Novak <armin.novak@thincast.com>
* Split common functionality from client code
* Clean up client code and use proper defines for constants
* Implements the channel code to read/write server side
messages.
This patch adds the basic infrastructure to have openCL acceleration.
For now only YUV2RGB is implemented but other operations could be
implemented.
The primitives have been massively reworked so that we have an autodetect
mode that will pick the best implementation automatically by performing a
benchmark.
Sponsored-by: Rangee Gmbh(http://www.rangee.com)
According to the channel docs, this field is only used in format data
request. Therefore, there's no need to hold it in the response. cliprdr
server code was copy-pasted from client code, therefore this must be
some leftover.
When converting 16 bit color (5 or 6 bit per color) to 32bit
(8 bit per color) add a value dependent correction factor so that
value 0 -> 0 and 31 -> 255.
This one is for proxy use. The proxy must know what format is requested by the other side
of the connection, for determining if the message should be passed
or ignore (for example, if we want to allow only text, the proxy must
verify that the requested format received in Format Data Request PDU is
a text format.