Commit Graph

3050 Commits

Author SHA1 Message Date
Geoffrey McRae
0a768a5a7f [client] main: add new option for integer only upscaling
The new option `win:intUpscale` will limit upscaling to integer sizes
only if enabled.
2022-05-09 18:23:53 +10:00
Geoffrey McRae
6afd262a27 [client] egl: update AMD FSR to 1.0.2 2022-05-04 15:29:21 +10:00
Geoffrey McRae
87077dfe6e [host] nvfbc: add downscale support 2022-05-04 13:38:49 +10:00
Geoffrey McRae
7ed18e24e2 [host] linux/pw: add missing include for min define 2022-05-04 12:28:20 +10:00
Geoffrey McRae
60834a5719 [host] xcb/pipewire/nfbc: use min and correct inverted logic 2022-05-04 12:23:20 +10:00
Geoffrey McRae
d5e2689d64 [host] nvfbc: fix inverted truncated frame logic 2022-05-04 11:58:04 +10:00
Geoffrey McRae
7b7a06b63f [client] fix invalid bitwise comparison 2022-05-04 11:02:02 +10:00
Geoffrey McRae
81f91caf0e [host] pw: fix build due to frame info structure changes 2022-05-04 10:59:44 +10:00
Geoffrey McRae
3d727a2254 [host] xcb: fix build due to frame info structure changes 2022-05-04 10:58:19 +10:00
Geoffrey McRae
e4a4e2331a [host] nvfbc: fix build due to frame info structure changes 2022-05-04 10:37:52 +10:00
Geoffrey McRae
8682ec207e [host] dxgi: check for invalid usage of d3d12 & downsampling 2022-05-04 10:23:42 +10:00
Geoffrey McRae
c8a5293645 [host] dxgi: refactor dxgi_copyFrame 2022-05-04 09:27:52 +10:00
Geoffrey McRae
15334c89d6 [host] dxgi: match the last entry in the downsample rule list 2022-05-03 17:58:41 +10:00
Geoffrey McRae
2eec459b47 [host] dxgi: finish downsample support for d3d11 backend 2022-05-03 12:15:24 +10:00
Geoffrey McRae
947325e00d [host] dxgi: fix failure to copy to texture with sub resources
`CopyResource` will silently fail when trying to copy from a texture
with no subresources to one with. Instead we must use `ResolveSubresource`
2022-05-02 15:53:20 +10:00
Geoffrey McRae
eae559b4c9 [client/obs] update to support downscaled frames coming from the host 2022-05-01 19:51:25 +10:00
Geoffrey McRae
3134ec84de [host] dxgi: add support for downsampling the capture before sending
This is an experimental & incomplete feature for those using
supersampling. Anything > 1200p will be downsampled by 50% before
copying out of the GPU to save on memory bandwidth.

Unfinished! Has issues with damage tracking and currently can not
be configured. Only dx11 has been tested at this point, everything
else will likely have problems/crash.
2022-05-01 19:45:44 +10:00
Netboy3
132d0e3c42 [client] audio/pw: pw_stream_get_time() deprecated
pw_stream_get_time() is deprecated in PipeWire 0.3.50.
Use pw_stream_get_time_n() instead based on PipeWire
library version.
2022-04-14 01:47:34 +10:00
Babbaj
4bbdd30284 [all] Add Babbaj to AUTHORS 2022-04-09 16:19:11 +10:00
Babbaj
6d06320fb2 [client] audio/pw: fix muting
Pipewire documents the mute parameter as a bool, however `pw_stream_set_control` expects a float value and converts it to a bool.

6ad6300ec6/src/pipewire/stream.c (L2063)
2022-04-09 16:19:11 +10:00
Quantum
f3fe774f69 [client] overlay/record: do not invalidate window during shutdown 2022-03-19 18:52:07 +11:00
Quantum
e053c014f7 [client] audio: display record indicator when necessary 2022-03-19 18:52:07 +11:00
Quantum
9c8a8a1b44 [client] config: add new option audio:micShowIndicator
This will be used to control the display of the microphone recording
indicator.
2022-03-19 18:52:07 +11:00
Quantum
1685249f3a [client] overlay: add record indicator 2022-03-19 18:52:07 +11:00
Quantum
97cef000fd [client] audio: avoid prompting when changing record format
If a recording is already in progress, we should not prompt again.
2022-03-19 15:10:39 +11:00
Quantum
8f45290beb [client] audio: cancel confirm dialog when a new recording starts 2022-03-19 10:04:23 +11:00
Quantum
9afe170413 [client] audio: prompt before allowing audio
If the user clicks no, the guest only receives silence.
2022-03-19 10:04:23 +11:00
Quantum
dd6d9c44df [client] config: add new audio:micAlwaysAllow option
This will be used to always grant access to microphones instead of
prompting every time.
2022-03-19 10:04:23 +11:00
Quantum
fb5a71c47e [client] audiodevs/pipewire: implement proper recording stop/restart
Before, pipewire_recordStop did nothing since pw.record.active was
always false.
2022-03-19 10:04:23 +11:00
Quantum
75370e464d [client] overlay/msg: fix type for app_msgBoxClose
It should not be taking a pointer to MsgBoxHandle.

Also changed the type of MsgBoxHandle to prevent similar bugs.
2022-03-19 10:04:23 +11:00
Quantum
c55d0a82f2 [client] overlay: add support for confirmation dialogs 2022-03-19 10:04:23 +11:00
Quantum
f28084e653 [client] core: remove state tracking in core_updateOverlayState
The state is never updated when a message box is dismissed, so the
cursor is never displayed when a second message box shows up.

The only other caller, app_setOverlay, has state tracking already.
2022-03-19 10:04:23 +11:00
vmfortress
6c76d6ada5 [host] xcb: fixed early start of pointer thread by adding xcb_start 2022-03-08 06:12:17 +11:00
Geoffrey McRae
3a8cb6a613 [client/common] fixes for issues detected through static analysis. 2022-03-07 10:14:52 +11:00
Tudor Brindus
a3820536ab [client] overlay: make "Show timing graphs" checkbox consistent in case 2022-03-06 17:21:32 +11:00
vmfortress
36f97f08ad [host] dxgi: add nanosecond-scale sleep capability to d3d12
The nsleep() call lets d3d12 sleep for a more precise amount of
time while maintaining the current millisecond-scale sleep
interface in the configuration file.
2022-03-06 17:21:14 +11:00
Shootfast
48cf099638 [client] input: fix confine_pointer argument marshalling
Under Wayland, if the mouse pointer is disconnected whilst captured
(like say via KVM switch), the waylandWarpPointer code will be called
but the pointer will be NULL. This results in the cryptic message:

error marshalling arguments for confine_pointer (signature noo?ou): null value passed for arg 2
Error marshalling request: Invalid argument

This patch adds a check on the wlWm.pointer pointer before attempting
to warp the pointer, and avoids the crash.
2022-03-05 09:33:45 +11:00
Tudor Brindus
88d60d4b3d [client] enforce building with -Wstrict-prototypes 2022-02-28 11:56:26 +11:00
Tudor Brindus
3189c7bcd6 [client] kb: update for ImGui 1.87 2022-02-28 11:56:26 +11:00
Tudor Brindus
d1da0d62ed [client] update cimgui submodule 2022-02-28 11:56:26 +11:00
Chris Spencer
72033f3822 [client] audio: reduce hardcoded minimum latency
The current minimum target latency is partially based upon the default qemu
behaviour whereby audio packets are delivered in a sawtooth pattern, with
packet timestamps drifting between 5ms above and below the measured clock.
This 5ms error is baked into the minimum target latency to avoid
underrunning.

This sawtooth pattern can be reduced by specifying a lower timer period in
the qemu configuration, so remove it from the hardcoded minimum latency and
add it to the default configurable buffer latency instead. This allows
users that have configured their VM appropriately to reduce the overall
latency.
2022-02-28 11:52:16 +11:00
Chris Spencer
c2523be4b4 [client] audio: reduce resampler latency
The best quality resampler has an intrinsic latency of about 3ms, and the
processing itself takes another 1-2ms per 10ms block. The faster setting
has an intrinsic latency of about 0.4ms, with about 0.04ms processing time.
This makes for an overall saving of about 4ms, with negligible loss in
quality.
2022-02-27 23:47:43 +11:00
Chris Spencer
7efc274e81 [client] audio: use block comments 2022-02-27 23:47:43 +11:00
Chris Spencer
7c2d493bb5 [client] audio: add latency tuning parameter
This adds a new `audio:bufferLatency` option which allows the user to
adjust the amount of buffering LG does over the absolute bare minimum. By
default, this is set large enough to absorb typical timing jitter from
Spice. Users may reduce this if they care more about latency than audio
quality.
2022-02-25 20:41:47 +11:00
Chris Spencer
9908b737b0 [client] audio: make the requested audio device period size configurable
This adds a new `audio:periodSize` option which defaults to 2048 frames.
For PipeWire, this controls the `PIPEWIRE_LATENCY` value. For PulseAudio,
the controls the target buffer length (`tlength`) value.
2022-02-25 20:41:47 +11:00
Chris Spencer
0dad9b1e76 [client] audio: fix latency calculation if audio device starts early
If the audio device starts earlier than required, we slew the read pointer
backwards to avoid underrunning. We need to apply this same offset to the
recorded device position, otherwise the Spice thread will think playback is
further ahead than it really is and inject unnecessary latency to
compensate.
2022-02-25 20:41:47 +11:00
Chris Spencer
a13c90bd27 [client] audio/pa: wait until stream is ready before starting playback
Uncorking the stream does not work if the stream is not ready yet.
2022-02-25 20:41:47 +11:00
Chris Spencer
84b5478b02 [client] audio/pa: fix assertion failure when keep alive playback stops
When the 'keep alive' playback times out, playback is stopped from the
audio callback, resulting in an assertion failure inside PulseAudio as we
try to lock the main loop thread while already inside it.
2022-02-25 20:41:47 +11:00
Tudor Brindus
38340d3497 [common] allow building with -Wstrict-prototypes 2022-02-25 20:38:44 +11:00
Tudor Brindus
eeefc15e46 [host] build with -Wstrict-prototypes 2022-02-25 20:38:44 +11:00