Commit Graph

2493 Commits

Author SHA1 Message Date
Pascal Nowack
7d18ca4dc2
rdpsnd/client: Fix handling of WaveConfirm PDUs (#7910)
Currently, all FreeRDP-based clients don't send any WaveConfirm PDUs
for received samples, when using a dynamic channel for audio output
redirection.
[MS-RDPEA] 2.2.3.8 Wave Confirm PDU mentions, that a WaveConfirm PDU
MUST be sent, when a WaveInfo PDU + Wave PDU, or Wave2 PDU is received
and when the audio data sample is emitted to completion by the client.
The first WaveConfirm PDU is used by the server to determine the
network latency and the second WaveConfirm PDU is used by the server to
determine the render latency.

So, fix the current behaviour, where FreeRDP currently does not send
any WaveConfirm PDU, when using the dynamic channel, or only sends one
WaveConfirm PDU for the sample.
For the first WaveConfirm PDU, use the same timestamp, that was
included in the first WaveInfo/Wave2 PDU.
For the second WaveConfirm PDU, add the render latency on top of the
arrival timestamp.
2022-05-18 08:47:54 +02:00
Felix Deimel
8cabdf6a04 Fixed memory leak in audin mac 2022-05-13 10:23:41 +02:00
Felix Deimel
b0772fe2f0 Fixed memory leaks in rdpsnd mac 2022-05-12 14:51:56 +02:00
David Fort
77413f49b2 winpr: rework alignment functions
_align_XXX functions aren't widely available depending on the C runtime. That causes
problems with mingw where we can easily have some runtime mixes (which lead to mysterious
segfaults most of the time). This patch introduce winpr_aligned_XXX functions that will
either use the function available, or use an emulation layer.
2022-05-12 11:36:01 +02:00
akallabeth
860f44f762 CMake check_include and struct cleanup
Move to WinPR what should be there.
2022-04-29 14:27:44 +02:00
akallabeth
1819c24808 Remember received sound volume and apply on open. 2022-04-28 18:56:17 +02:00
akallabeth
5521a73e90 Some rdpsnd debug improvements 2022-04-28 18:56:17 +02:00
akallabeth
962c5c3ef0 Fixed dead store warnings 2022-04-28 12:37:19 +02:00
akallabeth
6fd71fe737 Eliminate Dead nested assignment warnings 2022-04-28 12:37:19 +02:00
akallabeth
ec699f6c75 scanbuild fixes 2022-04-28 12:37:19 +02:00
akallabeth
1dcc5a180a Fixed warnings 2022-04-28 11:24:51 +02:00
akallabeth
cc3e28f2f1 Fixed -Wdocumentation errors 2022-04-28 11:24:51 +02:00
akallabeth
667b471686 Fixed cast-quality warnings 2022-04-28 09:17:20 +02:00
akallabeth
73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
akallabeth
1378c8e671
Fixed #7753: Step calculation in YUV decoder (#7758)
* Fixed #7753: Step calculation in YUV decoder

* Fixed rectangle_is_empty

* Added rectangle intersection check in YUV decoder

* Skip intersecting rectangles in YUV decoder

* Refactored YUV work object handling

* Allocate / free in yuv_context_new and yuv_context_free
* WINPR_ASSERT all function arguments

* Pass yuv_context_reset result from h264_context_reset

* Reset PTP_WORK buffer to NULL after use
2022-03-29 13:55:52 +02:00
akallabeth
610f4b6bac Fixed WINPR_UNUSED/WINPR_ASSERT mixup 2022-03-28 15:52:32 +02:00
akallabeth
1319c08bba Cleaned up use of rdpSettings in channels 2022-03-28 15:52:32 +02:00
Armin Novak
c6924cb126 Moved clipboard utils to core library, fixes #6760 2022-03-28 14:59:30 +02:00
Zhengyi Fu
75a6e17752 drive: fix number of links 2022-03-24 13:40:31 +01:00
Armin Novak
e5b50c550b Use GetComputerName instead of gethostname 2022-03-22 10:59:58 +01:00
Armin Novak
ce63397323 Move drdynvc main path messages to trace level
They are noisy and hide more important information from debug log
2022-03-08 16:15:18 +01:00
akallabeth
37421b6614
Unified rdpsnd cleanup code (#7697) 2022-03-04 09:55:37 +01:00
Armin Novak
46e0adda93 Removed HAVE_CONFIG_H uses 2022-03-03 11:26:48 +01:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
Armin Novak
a9463bfdda Fixed const warnings 2022-03-01 08:00:25 +01:00
Martin Fleisz
1371970783 disp: Remove wrong assert 2022-02-25 11:57:28 +01:00
Armin Novak
42468f3684 Removed pdb file on windows (BUILDIN_CHANNELS removed) 2022-02-24 14:48:46 +01:00
Armin Novak
94634bfd67 Fixed const warning 2022-02-24 12:06:06 +01:00
Martin Fleisz
8d49175a94 Revert "drdynvc: Prevent opening an already opened dynamic channel"
This reverts commit feda57a739.
2022-02-23 17:18:50 +01:00
Armin Novak
fd027d1bf0 Removed BUILTIN_CHANNELS
Building client channels out of tree does not work reliable as the
dependencies can not be easily split. (exceptions may be simple ones
as echo channel)
It does complicate the build system and code though, so remove this
for maintainability reasons.
2022-02-23 10:43:46 +01:00
Armin Novak
130094de32 Fixed compilation warnings in ainput channel 2022-02-22 12:21:21 +01:00
Armin Novak
951a83e295 Fixed deprecated mac symbol 2022-02-22 11:29:56 +01:00
Armin Novak
0c7e6c3c2d Refactored disp channel
* Assert all input parameters
* Use DISP_CHANNEL_NAME define for channel name
2022-02-22 11:29:56 +01:00
Pascal Nowack
b2d0c42cbb server/disp: Sanitize optional physical monitor size values
The server sided handling of the display control channel currently
treats the physical monitor size values as obligatory values.
When the physical monitor size is invalid according to the
documentation, it is supposed to be ignored.
However, this is currently not done, leading to an abort of the display
control channel handling, when using Remmina, as Remmina does not submit
physical-monitor- widths and -heights.

Fix this issue by sanitizing the physical monitor size values, instead
of handling them as obligatory values, where both the physical with and
the physical height must be constrained to the values in the
documentation.
2022-02-22 10:55:22 +01:00
akallabeth
c5f7f9fba8 Add option for external thread to ainput server channel 2022-02-22 09:44:13 +01:00
akallabeth
42abdb056f Use define for channel name 2022-02-22 09:44:13 +01:00
Armin Novak
f03059e718 Extended AINPUT API:
* Each event now has a timestamp
* Relative and absolute events are sent simultaneously
* Added a flag indicating relative events are available
2022-02-22 09:44:13 +01:00
akallabeth
54259bc37c Added event logging for ainput channel 2022-02-22 09:44:13 +01:00
akallabeth
f45e515fcd Added Advanced Input Channel 2022-02-22 09:44:13 +01:00
Armin Novak
bf9f1eccc1 Fixed issued with mingw build 2022-02-18 08:38:28 +01:00
akallabeth
8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
akallabeth
2422985f2a Fixed cliprdr_parse_file_list 2022-02-05 14:06:08 +00:00
Armin Novak
b9cfa10513 Fixed some more warnings 2022-01-31 15:55:10 +01:00
Felix Deimel
6bc3def9d1 Fixes https://github.com/FreeRDP/FreeRDP/issues/7408 2022-01-31 15:54:17 +01:00
akallabeth
db1ee0cae6 Update nAvgBytesPerSec in audin_winmm_set_format
The format channel count and alignment may have changed.
Update nAvgBytesPerSec accordingly
2022-01-27 15:57:03 +01:00
akallabeth
4b416968c4 Added checks and asserts in rdpgfx_common 2022-01-27 10:33:30 +01:00
akallabeth
6f154da1ae Added plausibility checks and assert to rdpgfx_read_header 2022-01-27 09:50:35 +01:00
zbstao
5b8db18f26 Added pduLength check in rdpgfx_read_header function
if pduLength is zero will lead to an infinite loop in rdpgfx_recv_pdu function.
2022-01-27 16:24:26 +08:00
akallabeth
7dedfbb0b0 Added support for getpwuid_r, replaced duplicate code
* Use GetUserNameExA to get current user name when required.
* Add support for getpwuid_r if available
2022-01-25 15:33:04 +01:00