Commit Graph

121 Commits

Author SHA1 Message Date
akallabeth
43311130a2 Fixed CodeQL warnings 2021-02-19 11:19:49 +01:00
Kobi Mizrachi
b94143f644 rdpsnd: server: fix leak in rdpsnd_server_context_free 2020-01-15 13:51:05 +02:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
5490ceb4ed Fixed source format for freerdp_dsp_encode in rdpsnd_server_send_wave_pdu 2018-11-14 13:27:20 +01:00
Armin Novak
83f959ce6b Fixed format issues with server sound channel (review by @llysz) 2018-11-14 13:27:20 +01:00
Armin Novak
e2e1071ff5 Seal length in wave pdu alignment. 2018-10-22 12:16:18 +02:00
Armin Novak
1a015612a6 Align wave pdu size 2018-10-22 12:00:07 +02:00
Norbert Federa
d35470f8af rdpsnd: always call rdpsnd_server_send_formats
Since the rdpsnd_server_send_formats function is no longer exported
we must always call it, even if the rdpsnd server application uses
its own thread.
2018-10-18 10:21:15 +02:00
Armin Novak
2cf0662559 Unified format support for rdpsnd. 2018-09-26 12:49:52 +02:00
Armin Novak
106dde9571 Working mic redirection for shadow server. 2018-09-26 12:49:09 +02:00
Armin Novak
28efbbc01f Refactored audio_format* functions. 2018-09-26 12:49:09 +02:00
Armin Novak
d90e5da865 Fixed unused label warning. 2018-08-24 13:40:36 +02:00
Armin Novak
98c254ffa0 Fixed invalid return value type. 2018-08-01 12:56:18 +02:00
Martin Fleisz
0ec9579013 rdpsnd: Fix sending of wave2 PDU
According to MS-RDPEA 2.2.3.10 the Wave2 PDU's header BodySize field
should be equal the size of the PDU minus the header (4 Bytes).
2018-07-11 15:06:31 +02:00
Armin Novak
a554207c11 Added target dependencies. 2018-07-02 16:58:14 +02:00
Armin Novak
373bfac9ab Added support for WAVE2 PDU in server side audio channel. 2018-07-02 16:20:39 +02:00
Armin Novak
3f712cab70 Fixed formatting of changed files. 2018-04-05 13:14:16 +02:00
Armin Novak
f89c1857b9 Rewrite of sound and microphone channels
The sound and microphone redirection channels (and in part TSMF)
did not properly decouple encoding/decoding from the backends used
to play/record sound.
Encapsulating encoding/decoding in rewritten freerdp_dsp_* functions
with variable backends, simplifying alsa/oss/pulse/... audio backends.
2018-04-05 13:14:16 +02:00
Armin Novak
2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
David Fort
41823080f9 Fix users of Stream_GetPosition() that returns size_t 2017-12-11 22:38:58 +01:00
Armin Novak
8b9e3fa51e Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02: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
Bernhard Miklautz
00dae7c5ef Fix some spelling errors
Fixes #3633
2016-12-01 15:36:49 +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
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
Vic Lee
019a569d42 rdpsnd/server: decrease audio latency and make it configurable. 2016-06-21 17:22:43 +08:00
zihao.jiang
444b678e71 shadow/rdpsnd: Fix race condition in rdpsnd channel server. The output buffer and format parameters are not protected. This cause some data inconsistence if rdpsnd has own thread 2016-05-22 22:13:32 +08:00
Bernhard Miklautz
6fa3608111 cleanup cmake exports and pkg-config files
With this commit the "exported" components (usable with pkg-config and
cmake find module package)
* winpr - winpr library and headers
* freerdp - core library and headers
* freerdp-client - client specific library
* freerdp-server - server specific library
* rdtk - rdtk headers and library

To allow the installation of multiple different version (different major
number) the include files were moved into the respective sub folder:
freerdp -> freerdp{MAJOR}/freerdp (currently freerdp2/freerdp/)
winpr -> winpr{MAJOR}/winpr (currently winrp1/winpr/)
rdtk -> rdpk{MAJOR}/rdtk (currently rdtk0/rdtk/

The generated pkg-config and cmake find modules now also include the major
version number. Currently the following pkg-config are generated and
installed.
* winpr1
* freerdp2
* freerdp-server2
* freerdp-client2
* rdtk0

As cmake is able to handle multiple versions out of the box the
following can be used to find a specific module:

find_package(WinPR)
find_package(FreeRDP)
find_package(FreeRDP-Server)
find_package(FreeRDP-Client)
find_package(RdTk)

As cmake doesn't automatically resolve dependencies for packages it is
necessary to manually include the requirements. For example if
FreeRDP-Client is required WinPR and FreeRDP need to be included
(find_package) as well.

This commit also fixes the installation when STATIC_CHANNELS are built.
WITH STATIC_CHANNELS all channels are linked into libfreerdp-client, for
this all channels are generated as linker archive and linked together in
the final step. Before the intermediate linker archives were, although
not required and useful, installed. Same applies for server side
channels.
2016-01-12 17:32:33 +01:00
Armin Novak
cb958ba9c6 Added pdb files to package target.
Fixed name collision with freerdp-shadow targets.
2015-12-15 12:07:21 +01:00
zihao.jiang
f21749ac07 server: Fix several memory leak while running valgrind on freerdp-shadow 2015-09-17 01:02:22 +08:00
Martin Haimberger
52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
Martin Haimberger
65fd259610 misc fixes:
fixed all bugs from the review
checking all WaitFor*Object/s calls
2015-07-30 06:49:21 -07:00
Martin Haimberger
f65d15feeb fixed audioserver
if no data could be read, the ERROR_NO_DATA is returend to
indicate a further read.
2015-07-22 03:16:46 -07:00
Martin Haimberger
b8c110d19b introduced channel error reporting system
The rdpContext gets an event which will
get set if an error occoured in a channel.

If a thread or a void callback has to report an
error it will get signaled by this system.
2015-07-15 00:50:35 -07:00
Norbert Federa
1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +02:00
Bernhard Miklautz
79de8168f9 Integrate feedback from pull request
* orders.c: remove ; at eol
* rdpdr_main.c: simplify error case
* rdpsnd_pulse.c: fix incorrect check
* rdpsnd_main.c: adapt return value according to documentation
* update.c: fix incorrect return values
2015-03-30 18:29:32 +02:00
Bernhard Miklautz
74c8400789 coding style fixes
Add missing space after if
2015-03-30 17:15:45 +02:00
Bernhard Miklautz
f469e069dc stream: Stream_Ensure*Capacity: change return type
Change the return type of Stream_Ensure*Capacity from void to BOOL to be
able to detect realloc problems easily. Otherwise the only way to detect
this was to check if the capacity after the call was >= the required
size.
In case Stream_Ensure*Capacity fails the old memory is still available
and need to freed outside.

This commit also adds checks to most calls of Stream_Ensure*Capacity to
check if the call was successful.
2015-03-30 16:33:48 +02:00
Armin Novak
918ca132f6 Fixed resource cleanup locations.
Additional error checks and logging.
2015-01-20 11:59:13 +01:00
Armin Novak
059374457d Removed library prefix override. 2014-09-17 11:27:11 +02:00
Armin Novak
4529eb00ee Decreased logging verbosity. 2014-09-15 19:37:53 +02:00
Armin Novak
b1e9ffb655 Using wlog for channel logging now.
Fixed compiler warnings and broken callback in urbdrc.
2014-09-15 08:48:46 +02:00
Marc-André Moreau
f5ff6e1bd8 Merge pull request #2095 from bmiklautz/feat/byemonolithic
Remove non-monolithic builds of libfreerdp
2014-09-11 18:46:32 -04:00
Bernhard Miklautz
0313ca3622 libfreerdp: always build "MONOLITHIC"
"libfreerdp" consisted of multiple (small) single libraries. If the cmake
option MONOLITHIC was used only one library was build combining all of
the libfreerdp-* libraries.
The only exceptions to this are libfreerdp-server and libfreerdp-client these
are build as separate libraries.

This commit obsoltes non-monolithic builds and makes monolithic builds
the default. The cmake option MONOLITHIC is also removed.
2014-09-12 00:19:53 +02:00
Bernhard Miklautz
96cd479c99 rdpsnd_server_handle_messages: change return type
With BOOL as return type it is not possible to differentiate between
success and "no data can be read" (when a channel read would block).

rdpsnd_server_handle_messages returns now int with the following
possible values:

-1 if no data could be read
0 error (like connection close) (formerly FALSE)
1 succsess (also if further bytes need to be read) (formerly TRUE)

Not using -1 for error cases was chosen to be compatible with the BOOL
return values used before.
2014-09-11 13:45:23 +02:00
Bernhard Miklautz
e603655048 rdpsnd server: seal stream before processing
If the stream is not sealed Stream_GetRemainingLength might return bogus
values.
2014-09-11 12:30:37 +02:00
Bernhard Miklautz
bbaecbd42d rdpsnd server: add support for clients version < 6
MS-RDPEA 2.2.2.3 states (Appendix A <6>) that quality mode PDU
should be ignored if the client version is < 6. For these clients the sound
channel got never activated since activated was only called after
reception of the quality mode PDU.

For clients < version 6 activated is now called after
CLIENT_AUDIO_VERSION_AND_FORMATS was received.
2014-09-11 12:30:37 +02:00
Armin Novak
66b8905ac6 Using special log defines for channels now. 2014-08-11 09:12:01 +02:00