Commit Graph

84 Commits

Author SHA1 Message Date
akallabeth
78acedb40e
[warnigns] fix Wshorten-64-to-32 2024-11-11 10:22:37 +01:00
akallabeth
ee81bb017b
[warnings] fix assign enum
* add missing value for rdpecam
* use an integer for a badly designed API
2024-10-01 13:05:30 +02:00
akallabeth
4b60f0651c
[channels] Fix PulseAudio assertions/NULL checks 2024-09-23 12:01:13 +02:00
akallabeth
ae3330d63d
[codec,dsp] reorganize experimental codecs
* Remove ALAW/µULAW from sound channels
* Make everything except PCM and AAC experimental
2024-09-23 12:01:11 +02:00
akallabeth
fe6d861a5c
[channels] fix VCAPITYPE for all channel entry points 2024-09-03 17:26:58 +02:00
akallabeth
cc626276d0
[warnings] integer cast and checks 2024-08-29 15:49:33 +02:00
akallabeth
15456e1ee1
[warnings] fix implicit widening conversion 2024-08-29 10:47:20 +02:00
akallabeth
56d660f258
[cmake] mark dependency includes SYSTEM
Mark all dependency include paths SYSTEM so warnings from system headers
are excluded from ci warning statistics
2024-08-26 11:10:49 +02:00
akallabeth
122a35fb73 [coverity] 1543932 Resource leak 2024-04-12 13:30:35 +02:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
Armin Novak
2e9ee7a583 [channels,rdpsnd] fix missing include 2023-11-24 18:19:03 +01:00
Igor V. Kovalenko
cfcb363c4a rdpsnd_pulse: Use C99 constants 2023-11-03 08:12:12 +01:00
Igor V. Kovalenko
2867c806fc rdpsnd_pulse: Allow reconnecting to pulseaudio server
Detect if pulseaudio context has lost connection to server and initiate
reconnection during play call.
2023-11-03 08:12:12 +01:00
Igor V. Kovalenko
087eb20431 rdpsnd_pulse: Eliminate synchronous write loop
Since complete sound frame is already available, just write it out to
pulseaudio stream using more efficient pa_stream_begin_write API.

This removes a few milliseconds of pure wait time from each play call and
makes audio playback a bit smoother.
2023-11-03 08:12:12 +01:00
akallabeth
f977de89e3 [pulse] move detection to module 2023-10-10 22:59:53 +02:00
akallabeth
bb5345c60e [freerdp,api] add FREERDP_ENTRY_POINT
C requires prototypes or compilers will complain about them missing. Our
library entry points do not have such, therefore add the macro
FREERDP_ENTRY_POINT which declares the function prototype automatically
before the function.
2023-08-25 14:36:05 +02:00
akallabeth
c054666311 [channels] simplified channel subsystem linking 2023-03-01 08:18:34 +01:00
Armin Novak
641022b795 [logging] remove __FUNCTION__ from actual message
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
akallabeth
7b02aba636 Removed ALAW/ULAW from alsa/oss/pulse backends
The codec does not work reliably with some hardware.
2022-07-05 14:20:19 +02:00
akallabeth
5521a73e90 Some rdpsnd debug improvements 2022-04-28 18:56:17 +02: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
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
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
Armin Novak
0f8c52b9ca Fixed const warnings with argument parser 2021-09-09 08:53:20 +02:00
Armin Novak
c4c5847f81 channels: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
akallabeth
e2fd9db0b5 Added const to function arguments 2021-02-17 11:29:56 +01:00
Armin Novak
f720ec5383 RDPSND device API refinements
* 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>
2020-01-08 17:14:09 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
0c87eaee4d COMMAND_LINE_ARGUMENT structs contain parser results, use one per instance
Remove the old global structs as the parser modifies them. When using
multiple instances in the same process space this could break parsing.
2019-10-28 13:30:05 +01:00
Norbert Federa
af992f4ce1 channels/client: fix alsa/pulse warning and checks
- pa_stream_writable_size() returns (size_t) -1 on error
- fix missing cast in alsa client sound channel code
2018-10-23 09:45:20 +02:00
Armin Novak
3ed50aaca2 Implemented rdpsnd_pulse_get_volume 2018-10-22 13:17:25 +02:00
Armin Novak
ff7e91fed0 Removed unnecessary pulse context check. 2018-10-22 10:18:17 +02:00
Pascal J. Bourguignon
15f2bafeab Cleaned up const char** -> char** for argv, since we definitely do modify the argv!
(we overwrite the password and pin arguments).
This implies changes in the argument parsing tests that now must pass a mutable argv
(copied from the statically declared test argvs).
Some other const inconsistency have been dealt with too.
2018-06-06 16:43:09 +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
6623927fe4 Free gsmBuffer on channel close. 2018-02-19 14:04:42 +01:00
Armin Novak
3b67190d17 Clean up GSM context on channel close. 2018-02-19 13:05:53 +01:00
Ondrej Holy
2fec57f1a0 rdpsnd/pulse: Fix crashes in pulseaudio
Function pa_stream_trigger has to be called under lock to avoid
following crashes on asserts:

Assertion 'e->mainloop->n_enabled_defer_events > 0' failed at pulse/mainloop.c:257, function mainloop_defer_enable(). Aborting.
Assertion '!e->next' failed at pulsecore/queue.c:104, function pa_queue_pop(). Aborting.
Assertion 'q->front' failed at pulsecore/queue.c:81, function pa_queue_push(). Aborting.
2016-10-04 15:18:16 +02:00
Norbert Federa
90cdfa7646 cmake: replaced STATIC_CHANNELS with BUILTIN_CHANNELS 2016-06-15 13:36:27 +02:00
Bernhard Miklautz
62cb5fac44 build: add missing dependencies
Add all missing dependencies found when building with
STATIC_CHANNELS=OFF.

Fixes #3281
2016-04-15 14:32:40 +02:00
Armin Novak
fb88ad0ee6 Fixed symbol export for sound plugins. 2016-03-03 17:17:13 +01: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
Martin Haimberger
52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
Bernhard Miklautz
f992568432 rdpsnd: restore old behavior and fixes
* oss: fix function signature
* autodetection - if only /sound is given all enabled
  plugins are tried in order and the first successful loaded is used.
	- this restores the previous behavior
* alsa/pulse fix command line parsing - no parameters shouldn't be
  treated as error
2015-07-20 12:28:49 +02: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
David FORT
1b7140d84e Fixed some more checks in rdpsnd channel 2015-07-04 00:17:37 +02:00
David FORT
a8fefae3a1 Harden the sound channel
This patch adds checks for the sound channel and plugins:

* checks for protocol bytes;
* checks for malloc/calloc;
* be more strict when interacting with sound plugin
2015-06-24 17:06:45 +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