akallabeth
f346793970
Refactored encoder functions to return changed areas
2021-03-01 11:52:07 +01:00
akallabeth
51811a369f
Fixed missing stream length checks.
2020-11-20 09:39:25 +01:00
Armin Novak
75aab487e2
Added duplicate initialization check for plugins.
2020-08-10 16:17:44 +02:00
akallabeth
4039370064
Fixed input sanitation in rdpgfx_recv_solid_fill_pdu
...
The input rectangle must be checked for plausibility.
Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen
2020-07-20 14:11:36 +02:00
akallabeth
cac8c365f2
Reset pointer to NULL after free.
2020-05-20 15:10:08 +02:00
Vladyslav Hordiienko
15245c2abd
fix typo in GFX logs
2020-05-18 10:56:40 +02:00
akallabeth
64ad42b95b
Fixed DestroyListener arguments and call order
2020-05-13 17:11:17 +02:00
akallabeth
2f5e5359f6
Destroy channel listeners on terminate
2020-05-12 11:40:42 +02:00
Kobi Mizrachi
929457db4c
egfx: client: add missing NULL checks
2020-03-09 08:28:40 +01:00
Armin Novak
5690780bdd
[RDPEGFX] checks for cache import, prevent 0 size allocations
2020-03-06 12:28:21 +01:00
Armin Novak
35d7e896ae
Fix GFX cache eviction, use 1 based indexing.
2020-03-04 11:01:23 +01:00
Martin Fleisz
174832150e
Merge pull request #5932 from nfedera/fix_gfx_bitmapcache_indexing
...
Fix RDPEGFX bitmap cache indexing
2020-03-04 09:31:52 +01:00
Norbert Federa
17e0d25104
dynvc/client: fix and improve channel closing code
...
- fixed and consolitate the duplicated code for sending the
CLOSE_REQUEST_PDU to the server into dvcman_close_channel
- call dvcman_close_channel if a dynamic channel plugin fails
to process the received channel data
- rdpegfx: don't try to remove a non-existing cache entry,
return an error instead which now will close the channel, as
expected by Microsoft's windows protocols test suite
2020-03-04 08:03:56 +01:00
Norbert Federa
39e12990e8
rdpegfx: rename MaxCacheSlot to MaxCacheSlots
...
Although Microsoft uses 1-based numbering on the wire for indexing the
GFX bitmap cache entries, the code in FreeRDP uses 0-based numbering and
therefore the name MaxCacheSlots is less confusing.
2020-03-02 09:55:25 +01:00
Norbert Federa
f4d5ec776f
rdpegfx: use 1-based indexing for bitmap cache
...
Weird but Microsoft uses 1-based indexing in the RDPGFX bitmap
cache PDU's.
This does not seem to be documented but can be deducted from the
RDP client test code in Microsoft's "Windows Protocol Test Suites"
GitHub repository and the observation that mstsc aborts with a
protocol error if the cacheSlot index value 0 is used in e.g. a
GFX surface to cache PDU.
2020-03-02 09:55:25 +01:00
Armin Novak
03e2106f25
Fixed accidental reorder of surface delete and disconnect
2020-01-16 15:24:55 +01:00
Kobi Mizrachi
18be21a4fa
rdpgfx: client: fix leak when using rdpgfx_client_context_new API
2020-01-13 13:41:44 +01:00
Kobi Mizrachi
3f9e6ca978
rdpgfx: surface_to_scaled_window: fix pdu type
2019-12-12 11:10:44 +01:00
Armin Novak
72ca88f49c
Reformatted to new style
2019-11-07 10:53:54 +01:00
kubistika
bf2e1a33d0
channels: rdpgfx: export API to create rdpgfx client
2019-10-24 12:19:31 +02:00
Armin Novak
f93d625cde
Use GetTickCount64 instead of GetTickCountPrecise.
2019-09-02 15:46:36 +02:00
kubistika
bf618fb929
rdpgfx/client: Update gfx->UnacknowlegedFrame correctly
2019-06-06 10:24:27 +03:00
kubistika
49e7c5ddc0
rdpgfx/server: Fix formatting: rdpgfx_recv_cache_import_offer_pdu
2019-06-06 07:53:34 +03:00
kubistika
bf97d3e041
rdpgfx/client: Expose QoeFrameAck
2019-06-06 07:53:34 +03:00
kubistika
98e09af2ff
rdpgfx/client: Implement CacheImportOffer PDU
2019-06-06 07:53:34 +03:00
kubistika
e2eeb9f870
rdpgfx: Add WITH_DEBUG_RDPGFX option
2019-06-04 10:29:05 +03:00
Armin Novak
f22b77d49c
Fixed GFX flags and CapsConfirm return checks
2019-05-09 12:46:10 +02:00
Armin Novak
48a12ae131
Fixed memory leak and return values in rdpgfx_recv_caps_advertise_pdu
2019-05-08 12:05:58 +02:00
Armin Novak
7b2608a938
Added gfx capability filter option.
...
With this new option it is possible to selectively disable certain
GFX capability versions. This way buggy behaviour can be addressed
at runtime.
2019-05-08 11:43:22 +02:00
Armin Novak
1bb933b991
Fixed missing argument checks.
...
The arguments for rdpgfx_send_frame_acknowledge_pdu must be checked
as in some call stacks they might be NULL.
2019-05-07 13:46:24 +02:00
Armin Novak
3b7e46fb0e
Updated GFX to 10.6 spec
2019-05-07 12:10:13 +02:00
akallabeth
95b8b43d4d
Merge pull request #5376 from kubistika/bugfix/rdpgfx-server-v10.6-PDUs
...
rdpgfx: Fix GFX v10.6 PDUs parsing and naming according to the spec
2019-05-06 15:32:32 +02:00
akallabeth
314fcee41e
Merge pull request #5377 from m4ntis/gfx/fix-caps-confirm-recv
...
client/rdgpfx_main.c: Fix rdpgfx_recv_caps_confirm_pdu caps length read
2019-05-06 12:51:23 +02:00
Mati Shabtay
2048708235
client/rdpgfx_main.h: Formatting
2019-05-05 16:27:11 +03:00
Armin Novak
841cb70f91
Fixed const correctness of gfx function pointer
...
Signed-off-by: Mati Shabtay <matishabtay@gmail.com>
2019-05-05 16:17:15 +03:00
Mati Shabtay
eee234c239
rdpgfx/client: Add callbacks for manual caps sending and frame acking
2019-05-05 15:56:35 +03:00
Mati Shabtay
e9dfe13a70
client/rdgpfx_main.c: Fix rdpgfx_recv_caps_confirm_pdu caps length read
2019-05-05 13:39:04 +03:00
kubistika
e9faaedc85
rdpgfx: Fix GFX v10.6 PDUs parsing and naming according to the spec
2019-05-05 12:34:57 +03:00
Martin Fleisz
6eb108058e
Merge pull request #5306 from akallabeth/gfx_server_caps_input_checks
...
Fixed input stream length checks in rdpgfx_recv_caps_advertise_pdu
2019-04-29 11:27:06 +02:00
Armin Novak
8af9c138e3
Fixed input stream length checks in rdpgfx_recv_caps_advertise_pdu
2019-04-26 13:11:46 +02:00
Mati Shabtay
6e8c02c9ee
Added optional PreFrameAck callback to RdpgfxClientContext ( #5303 )
...
* RdpgfxClientContext: Add PreFrameAck callback
* client/rdpgfx_main.c: Call PreFrameAck callback before acking frame
* client/rdpgfx_main.c: Fix windows_msbuild_vs2010 CI build
* client/rdpgfx_main.c: Fix error logs log level
2019-04-05 13:37:51 +02:00
Mati Shabtay
5d808226af
client/rdpgfx_main.c: Fix wire to surface 2 pixel format decode
2019-03-18 16:07:18 +02:00
Mati Shabtay
88b7859c87
server/rdpgfx_main.c: Fixed caps advertise PDU recv ( #5304 )
2019-03-15 08:37:35 +01:00
Armin Novak
11cefecb7b
Temporarily disable GFX version >= 10.3
2019-03-04 09:07:27 +01:00
Armin Novak
9be2324be8
Disabled RDPGFX_CAPVERSION_106 for good.
2019-02-28 13:43:11 +01:00
Armin Novak
69e9571d9e
Fixed EGFX capability parsing, respect length fields.
...
Disable RDPGFX_CAPVERSION_106 as we currently do not support scaled
outputs.
2019-02-27 17:15:43 +01:00
Armin Novak
e8c8e7b6d0
Updated EGFX support to 10.6
2019-02-27 16:36:15 +01:00
Armin Novak
5904cad1f7
Replaced hardcoded xfreerdp program name
2019-02-12 10:53:30 +01:00
Armin Novak
d5720b7999
Fixed clang scanbuild false positive memory leak.
...
The memset did confuse the analyzer. Remove it as the variable
is already initialized to zero.
2019-01-29 17:17:24 +01:00
Ondrej Holy
405c133381
channels/rdpgfx: Fix leak found by covscan
...
leaked_storage: Variable "s" going out of scope leaks the storage it points to.
2018-08-22 13:35:43 +02:00
Ondrej Holy
36a68b4eae
channels/rdpgfx: Format code by astyle
...
Run ./scripts/format_code.sh before the following changes.
2018-08-22 13:35:43 +02:00
Armin Novak
2517755d25
Fixed thread function return and parameters.
2018-03-07 14:36:55 +01:00
Armin Novak
1a902c249c
Fix PROFILER_* macros
...
Add the semicolon to the macro to allow clean
undefinition if the profiler is not used.
This used to break VisualC compilers.
2018-02-15 11:30:38 +01:00
Armin Novak
25076cfce1
Fixed a memory leak.
2018-02-09 10:23:48 +01:00
Armin Novak
92811ea5b5
Added return checks.
2018-02-02 10:41:20 +01:00
Armin Novak
3b70d1178b
Added AVC444 chroma support to shadow server.
2018-02-02 10:39:33 +01:00
David Fort
191b8f950f
Fix for #4330
...
Since ec027bf
dynamic resolution is broken when used with egfx. Before that commit
we were tracking a server sent resize by setting a DesktopResize callback. This callback
is called when the desktop is resized by the server. Anyway the problem was that when this
callback is called, the activation sequence is not always completed, which were leading to
some freeze with 2012r2 servers (sending packets before the sequence is finished).
So with the faulty commit, we are tracking server resizes by subscribing to the Actived
event, that is called at the end of a reactivation sequence, so we're sure to not send packets
when not fully activated.
Anyway the issue that shows on (#4330 ) is that when you use egfx, no reactivation sequence happens,
the server only sends a ResetGraphics message with the new size, and so we miss the resized event.
This fix introduces a new GraphicsReset event, makes the display channel subscribe to that event,
and react accordingly.
2017-12-23 13:50:54 +01:00
David Fort
158840429d
micro code style changes
2017-12-23 10:26:25 +01:00
Martin Fleisz
5cec90c781
Merge pull request #4305 from hardening/xrandr_fix
...
Fix XRandr for old systems and MacOSX
2017-12-13 17:24:41 +01:00
David Fort
41823080f9
Fix users of Stream_GetPosition() that returns size_t
2017-12-11 22:38:58 +01:00
Armin Novak
57958cb178
Fixed #3810 : Renamed color functions
2017-11-24 13:21:43 +01:00
David Fort
504b771686
Merge pull request #4053 from akallabeth/ffmpeg_encoder
...
Implemented FFMPEG based encoder.
2017-11-06 11:25:48 +01:00
David Fort
5d5376faa7
egfx: fix disconnection caused by invalid cache entries due to wrong announced cache size
...
Added some checks so that when setting a cache entry fails, we close connection (or
we fail later when trying to use that empty entry).
The small cache egfx capability has also been fixed.
2017-10-10 17:12:16 +02:00
Martin Fleisz
e28ea4555f
channels: Don't send gfx capversion 10 if AVC420 is requested
2017-09-11 12:05:03 +02:00
Mike Gabriel
c045bddf3f
Fix typos in some error messages
2017-08-03 08:38:05 +02:00
Armin Novak
8a0cec946b
Added AVC420 in AVC444 shadow encoding
2017-08-02 09:42:04 +02:00
Armin Novak
478ca97a16
Fixed resource cleanup.
2017-07-20 09:35:41 +02:00
Armin Novak
8b9e3fa51e
Fixed use of reserved keywords for include guards.
2017-07-20 09:35:41 +02:00
Armin Novak
0490aeb018
Fixed clang malloc integer overflow warnings.
2017-07-20 09:29:48 +02:00
Armin Novak
5764d5a78a
Disable GFX H264 if no backend compiled in.
2017-07-17 09:25:21 +02:00
Armin Novak
f414522b7a
Added setting for QoeAck.
2017-05-18 14:07:09 +02:00
Armin Novak
b6e5ec5039
Added client RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU
2017-05-18 14:07:09 +02:00
Armin Novak
2a92cc9631
Use a preallocated logger instance for GFX
...
The static logger functions of WLog have quite a heavy performance
penalty. Use a pointer to an allocated logger to speed things up.
2017-05-15 17:24:47 +02:00
Armin Novak
b0d3cfda4d
Added AVC444v2 client support.
2017-04-11 11:29:14 +02:00
Armin Novak
b2c29158be
Scanbuild warning, argument checks and leak fixes.
...
* Added Stream_GetRemainingCapacity to check remaining stream size
before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00
David Fort
be41769506
Add some useful debug info for the egfx channel
2017-02-16 14:49:08 +01:00
Armin Novak
6960ca209b
Added GFX surface command profiler.
2017-02-15 15:42:14 +01:00
Armin Novak
221b5258fc
Decreased log verbosity.
2017-01-17 16:06:08 +01:00
Norbert Federa
f71b6b46e8
fix string format specifiers
...
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Norbert Federa
c6e6b44143
countless WLog/printf format specifier fixes
2016-11-25 17:06:25 +01:00
Marc-André Moreau
dee76617d9
channels: remove thread-local storage usage
2016-11-15 11:41:01 -05:00
Armin Novak
4dfdf83d68
Updated symbol visibility of GFX channel.
2016-10-17 09:11:21 +02:00
Armin Novak
39b624a211
GFX: support 10.2 stack.
2016-10-16 10:42:46 +02:00
zihao.jiang
ac08f6a48b
Regression fix: The usage of RDPGFX_SURFACE_COMMAND::format is changed after color conversion huge fix.
...
Fix server side rdpgfx code to match the change.
2016-10-11 00:56:12 +08:00
Armin Novak
9f5da483dc
Reformatted files touched in last 2 commits.
2016-10-06 13:43:12 +02:00
Armin Novak
88a3b8dd76
Initializing channel context in each thread.
2016-10-06 13:43:12 +02:00
Armin Novak
0acfc649cd
Fixed log message.
2016-10-06 13:43:08 +02:00
Armin Novak
a6cef5cde7
Fixed GFX related issues.
2016-10-06 13:43:00 +02:00
Armin Novak
df35c135d1
Fixed color conversion, unified GFX and updated API.
2016-10-06 13:42:58 +02:00
zihao.jiang
5d4e9a2c87
rdpgfx/server: More minor fix
2016-08-20 01:36:37 +08:00
zihao.jiang
7d0fa79f19
rdpgfx/server: More minor fix according to comments:
...
Not use sizeof on packet memory structure for stream length check/estimating and use number directly.
Most of the packet size could be obviously calculated/verified from code and comments in same function.
Macro is defined for those were referenced multiple times.
2016-08-16 14:49:56 +08:00
zihao.jiang
26c98e4429
rdpgfx/server: Minor fix: use switch for pdu length estimation
2016-08-07 20:15:39 +08:00
zihao.jiang
992e0e9f35
rdpgfx: more minor changes
...
1. Fix style for channels/rdpgfx/server/rdpgfx_main.c according to scripts/format_code.sh
2. Refactor and introduce APIs to allow rdpgfx server channel running in existing thread (similar to rdpsnd)
2016-08-07 20:15:39 +08:00
zihao.jiang
2b6bd2626d
rdpgfx: various fixes according to comments
...
1. Fix stream leak in rdpgfx
2. Make src data const in zgfx. Harden zgfx to be independent to byte order
3. Fix written bytes return value in channel write
4. Add check for return value in shadow_client.c
5. Add gfx callback to send surface command with frame marker pdu.
6. Check remain length for recv subroutine
7. Fix compile errors
2016-08-07 20:15:39 +08:00
zihao.jiang
746a754244
rdpgfx: Implementation for server side channel
...
server/shadow: support h264 codec with gfx channel
2016-08-07 20:14:33 +08:00
Norbert Federa
90cdfa7646
cmake: replaced STATIC_CHANNELS with BUILTIN_CHANNELS
2016-06-15 13:36:27 +02:00
Marc-André Moreau
54cdd6a1ae
channels/rdpgfx: fix resetting of codec contexts
2016-05-11 13:42:54 -04:00
Armin Novak
50873be062
Added advanced gfx command line options.
2016-03-24 16:36:43 +01:00
Armin Novak
9ab3532bf8
Renamed GFX defines to conform to spec.
2016-03-16 13:43:18 +01:00
Armin Novak
5bc333c626
Implemented GFX AVC444 support.
2016-03-16 13:43:18 +01:00