Commit Graph

292 Commits

Author SHA1 Message Date
akallabeth
f1eaa01de2 [oss] moved detection to module 2023-10-10 22:59:53 +02:00
akallabeth
f977de89e3 [pulse] move detection to module 2023-10-10 22:59:53 +02:00
akallabeth
f06c027824 [alsa] move detection to module 2023-10-10 22:59:53 +02:00
akallabeth
046767b195 [opensles] moved detection to modules
* Rename variables to match package name
* Move find_package to where it is actually used
2023-10-10 22:59:53 +02:00
akallabeth
4eb3a16120 [channels,audin] fix return value type 2023-09-02 07:56:21 +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
ehdgks0627
d04ba8d6ef Correct typos and formatting errors in format strings
In several files, fixed typos in format strings that were causing unexpected output and formatting issues.
2023-07-28 15:34:46 +02:00
Armin Novak
3612948bad [channels,audin] assertions and warning fixes 2023-07-27 20:02:43 +02:00
Vic Lee
eda91e6695 [channels,audin] negotiated format must be cleaned after closing. 2023-06-28 08:39:33 +02:00
Armin Novak
a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
akallabeth
105f0d2366 [channel,audin] move common code to server channel
* manage channel related callbacks with default implementations
* use dynamic logger for server audin channel
2023-05-17 13:33:35 +02:00
Pascal Nowack
c5278c874f channels/audin: Rework API to be closer to documentation
The current server side channel handling of AUDIO_INPUT is currently
very constrained:

- Server implementations cannot measure the clients uplink, since the
  Incoming Data PDU is currently unhandled and FreeRDPs DSP handling
  delays the callback call of ReceiveSamples
- Servers currently cannot prefer a different protocol version
- Servers currently cannot change the used format

To solve these issues without running into the risk that some
simplifications constraint certain API usage, rework the current channel
handling to be very close to the documentation.
This means, that all documented API calls can be made by server
implementations and all documented PDUs, that the server side is
expected to receive are just parsed inside FreeRDP and then forwarded to
the API implementation.
2023-05-17 13:33:35 +02:00
akallabeth
a5b42f0f84 [includes] untangled circular includes 2023-03-15 08:22:23 +01:00
akallabeth
c054666311 [channels] simplified channel subsystem linking 2023-03-01 08:18:34 +01:00
akallabeth
cf9777cd92 [channels] simplified server linking 2023-03-01 08:18:34 +01:00
akallabeth
c3a82daad6 [channels] simplified client 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
8ed37e68d2 [stream] use logging capacity checks 2023-01-25 14:27:32 +01:00
Armin Novak
921315fdbf Fixed -Wmissing-variable-declarations 2022-11-21 10:12:31 +01:00
akallabeth
1849632c43
Fixed format strings to match arguments (#8254)
* Fixed format strings to match arguments

Reviewed and replaced all %d specifiers to match proper type

* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
Armin Novak
6a1d44bb67 Added support for audin version 2 2022-09-12 10:03:31 +02:00
akallabeth
c3e8720c87 Removed ALAW/ULAW from supported backend formats
pulse/alsa/oss do not reliably work with ALAW/ULAW codecs with all
hardware available.
Since these formats are poor quality anyway, deactivate them for
audin channel.
2022-07-05 14:20:19 +02:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth
5b163b7918 Add GetRdpContext function pointer for dynamic channels 2022-06-23 07:45:55 +02:00
David Fort
e389210673 client channels: mutualize common types between dynamic channels
Most dynamic channels share the same copied and pasted code for the XXX_CHANNEL_CALLBACK
and XXX_LISTENER_CALLBACK types. This patch introduce GENERIC_CHANNEL_CALLBACK and
GENERIC_LISTENER_CALLBACK that fits for most channels and discard custom type definitions.
2022-06-15 14:04:58 +02:00
Pascal Nowack
9d627e0df2 channels/server: Add APIs for DVCs to get notified of channel id
This allows server implementations to watch these channel ids for their
creation statuses.
2022-06-08 15:26:51 +02:00
Pascal Nowack
1f0b3c8004 audin/server: Do not overwrite values of the server audio formats
It just makes the usage of codecs impossible.
2022-06-08 15:26:51 +02:00
Felix Deimel
8cabdf6a04 Fixed memory leak in audin mac 2022-05-13 10:23:41 +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
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
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
6ef65b97aa Fixed const warnings audin/winmm 2022-01-19 09:24:57 +01:00
akallabeth
f8758a4b10 Fixed const warning in opensl es backend 2022-01-11 14:32:18 +01:00
Richard Markiewicz
16202322d1 freerdp: add audin channel for iOS 2021-12-21 08:31:04 +01:00
akallabeth
b73ce8a9f6 Fixed warning in mac audin backend. 2021-11-25 12:25:18 +01:00
David Fort
67986ea298 Fix compilation with mingw
This patch addresses some issues when compiling against mingw. With these changes
FreeRDP can be compiled out-of-the box on a Ubuntu 20.04.
2021-11-15 09:23:16 +01:00
akallabeth
834fdf0046
[audin] Always reset dsp_context before open (#7342) 2021-10-11 15:45:36 +02:00
Armin Novak
96cf17a45b Replaced (IWTSPlugin*) casts with struct address return 2021-10-07 16:22:04 +02:00
Simon Nivault
845947651e Force one channel input fallback for audin
Windows winmm backend does not support stereo microphone properly.
Fall back to mono and ensure that fallback is used.
2021-09-30 11:15:24 +02:00
Armin Novak
0f8c52b9ca Fixed const warnings with argument parser 2021-09-09 08:53:20 +02:00
Armin Novak
5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Simon Nivault
e42696bb2e
Some fixes for audin redirection (#7231)
* 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
2021-08-23 14:49:28 +02:00
Armin Novak
6854c7da7e Fixed windows audio recording issues:
1. Fix recording channels to mono
2. Fix alignment of PCM data to 2 bytes
2021-07-29 15:27:24 +02:00
Armin Novak
8ef57bf296 Replaced CMAKE_[SOURCE|BINARY]_DIR with PROJECT_[SOURCE|BINARY]_DIR
Thanks @Pollux42 for the hint in #7096
2021-06-22 08:54:18 +02:00
Armin Novak
c4c5847f81 channels: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
akallabeth
8b01c2f8ae Fixed codql warning 2021-06-17 10:35:22 +02:00