0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

3112 Commits

Author SHA1 Message Date
jpark37
ab7d370ada win-wasapi Improve default device handling
Remove lastNotifyTime throttle. Could ignore last device notification.
Will bring back if necessary, but seemed like overkill.

Make isInputDevice const for safety.

Make isDefaultDevice atomic. Allows it to be accessed simultaneously
from settings and notification callback threads. Race between setting
change in OBS and Windows is not a problem, a signal will be sent after
both to consolidate. Worst that should happen is a redundant reconnect
cycle.

Only read/write default_id from notification callback for thread safety.
2021-10-10 19:53:27 -07:00
jpark37
24d82062ae win-wasapi: Schedule work on real-time work queue
MS claims it can schedule audio better if we use their API.
2021-10-10 19:53:27 -07:00
jpark37
d1230c292e win-wasapi: Register capture thread with MMCSS
Ensure audio gets more priority to help prevent glitching.
2021-10-10 19:53:27 -07:00
jpark37
a995c305b7 win-wasapi: Remove bools and persist threads
This simplifies synchronization, and fixes several races.
2021-10-10 19:53:27 -07:00
jpark37
a504691af8 win-wasapi: Clean reset on initialization failure
Do not store IAudioClient and IAudioCaptureClient onto the source object
until initialization is almost complete, right before the capture thread
is created. We don't to retain objects from failed attempts. Also clear
them when stopping.
2021-10-10 19:53:26 -07:00
jpark37
b166b0488b win-wasapi: Remove unnecessary inline tags 2021-10-10 19:53:26 -07:00
jpark37
49aa9074f8 win-wasapi: Remove undefined function InitName 2021-10-10 19:53:26 -07:00
jpark37
88164affae win-wasapi: Rename InitRender to ClearBuffer
We no longer persist the render client.
2021-10-10 19:53:26 -07:00
jpark37
5a2e884d14 win-wasapi: Simplify sample rate logging 2021-10-10 19:53:26 -07:00
jpark37
4503c4fdac win-wasapi: Remove persistent references
Only need IMMDevice and IAudioRenderClient during initialization.
2021-10-10 19:53:26 -07:00
jpark37
15f9d37aef win-wasapi: Persist objects beyond Start/Stop
Initialize IMMNotificationClient and IMMDeviceEnumerator in constructor
to simplify cleanup and initializaiton. Both can survive a reset.
2021-10-10 19:53:26 -07:00
jpark37
12442c3e57 win-wasapi: Make InitDevice throw to log errors 2021-10-10 19:53:26 -07:00
jpark37
8f33e01b84 win-wasapi: Fix incorrect log strings 2021-10-10 19:53:26 -07:00
jpark37
5f2d0456bc win-wasapi: Mark GetWASAPIAudioDevices_ as static 2021-10-10 19:53:26 -07:00
jpark37
8ce1bb645f win-wasapi: Remove monitor invalidation code
The previous monitor recovery logic touches the source monitoring type,
resets the monitor even if the output device hasn't been invalidated,
and was susceptible to races. Monitor invalidation should live within
the monitor abstraction.
2021-10-10 19:22:35 -07:00
jpark37
cf6e106939 obs-outputs: Remove unnecessary header 2021-10-10 19:12:45 -07:00
jpark37
e581802812 obs-outputs: Remove WIN32_LEAN_AND_MEAN define
It should already be defined near the Windows.h include.
2021-10-10 19:12:45 -07:00
jpark37
d4bf7d4c23 coreaudio-encoder: Remove NO_MIN_MAX
Misspelled NOMINMAX is unnecessary.
2021-10-10 19:12:45 -07:00
jpark37
13d8f1127f obs-text: Update header for ARM64 compile 2021-10-10 19:12:45 -07:00
jpark37
7e854581a7 decklink: Make header self-sufficient 2021-10-10 19:12:45 -07:00
Matt Gajownik
c3d6e7a7c4 vlc-video: Improve logging with prefix & VLC version 2021-10-10 10:52:43 +11:00
jpark37
6a288b255a win-capture: Use DPI context for game capture
Fixes cursor position for windows unaware of DPI.

Only works on Windows 10 1607 and above.
2021-10-09 15:45:55 -07:00
jpark37
3706a21327 win-capture: Use DPI context for window BitBlt
Fixes GetClientRect and cursor position for windows unaware of DPI.

Only works on Windows 10 1607 and above.
2021-10-09 15:45:55 -07:00
jpark37
cadd83f786 obs-browser: Filter textures in linear space 2021-10-01 10:00:09 -07:00
jp9000
9deb8fe292 win-capture: Update graphics hook version to 1.7.1
Makes sure that OBS updates its graphics hook version
2021-09-28 10:08:55 -07:00
Kurt Kartaltepe
3e2ad118b9 linux-capture: Fail when libdrm missing
I forgot to extend the FATAL_ERROR messages to include libdrm.
2021-09-25 15:27:51 -07:00
Matt Gajownik
79f98f8fb8 obs-browser: Update translations from Crowdin 2021-09-25 17:31:24 +10:00
Matt Gajownik
cc2831e8b3 obs-browser: Update version to 2.16.2
Translate common SSL error codes on browser panel load failure
2021-09-25 09:27:41 +10:00
Vainock
11a690b038 Update translations from Crowdin 2021-09-24 09:42:08 -07:00
Kurt Kartaltepe
7384f6f061
linux-capture: Add libdrm dependency check (#5326)
We require libdrm for its header so add the cmake module and header path
to the build. We don't need to link libdrm though so we dont add it to
libraries.
2021-09-23 13:05:53 -05:00
columbarius
7bc06e0db6 linux-capture: Omit implicit modifier token when creating texture
DRM_FORMAT_MOD_INVALID is a token for implicit modifier. When importing
a DMA-BUF with implicit modifier we should call
gs_texture_create_from_dmabuf() without modifier.
2021-09-21 12:57:49 -03:00
Thomas Schnitzler
22f5e68121 win-dshow: Don't buffer Elgato Facecam device by default
Buffering should be disabled for Elgato Facecam in "Auto-detect" mode to
prevent latency changes over time
2021-09-20 18:42:36 -07:00
Georges Basile Stavracas Neto
ef0540c0d7 linux-capture: Lookup session handle without typechecks
g_variant_lookup() obligatorily receives the type of the variant to
lookup. This function is used when retrieving the session handle
from the portal's response, and the variant type passed is "s" (a
string).

However, xdg-desktop-portal had a bug: the documentation explicitly
mentions that the session handle is an object path (of variant type
"o"), but it passed a string (of variant type "s"). This mismatch
was fixed in the xdg-desktop-portal release 1.10 [1], but that broke
the PipeWire capture code, which was passing specifically the "s"
value to the variant lookup.

Fix this by not checking the variant type at all. Object paths ("o")
are simply strings with a few extra checks, and we don't actually need
to perform these checks.

This change probably broke other apps, and that makes me extremely sad :(

[1] https://github.com/flatpak/xdg-desktop-portal/pull/609
2021-09-17 08:36:56 -07:00
jpark37
40cea9ca50 win-capture: Remove dependency on psapi.lib 2021-09-12 14:10:36 -07:00
Tommy Vercetti
e075ad5bca obs-outputs: Add WIN32_LEAN_AND_MEAN to avoid symbol clash 2021-09-11 15:50:06 -07:00
kiwialec
dda48c99bc rtmp-services: Add Disciple Media 2021-09-08 06:58:25 -07:00
Richard Stanway
9411c548d3 obs-outputs: Disable Windows socket loop when using RTMPS
Since this is activated after starting the output, it assumes there is
no need to read anything from the connection as RTMP is send-only from
that point on. However with TLS, reading protocol messages is required
for proper operation, causing it to immediately fail on RTMPS
connections. This is a complex fix due to the way it interacts with
librtmp and mbedTLS so let's just disable it for now to avoid breaking
things for users.
2021-09-03 18:15:17 +02:00
Jim
9b6cc99828
Merge pull request #5180 from jpark37/leaks
Fix a bunch of pthread leaks
2021-08-27 22:55:58 -07:00
jpark37
c5e7a6f23b win-capture: Clear stale pointers for game capture
Fixes shmem crashes when using Alt+Tab.
2021-08-27 22:46:17 -07:00
Willy Liu(HQ ENG)
e276b23f94
rtmp-services: Remove 17LIVE 2021-08-26 13:55:37 +02:00
columbarius
ed5749e466 pipewire: Create textures from multiplanar DMA-BUF
The gs_texture_create_from_dmabuf function is able to create textures
from multiplanar DMA-BUF data. However, the only in-tree consumer of
this function - the PipeWire capture - does not use that.

Make PipeWire create textures from multiplanar buffers.
2021-08-25 19:48:22 -07:00
Colin Edwards
083461698d
Merge pull request #5166 from cg2121/decklink-activate-fix
decklink: Fix deactivate when not showing
2021-08-24 20:10:21 -05:00
Jim
84bf08c171
Merge pull request #4720 from jpark37/detours-integration
Finish Detours integration for remaining game capture APIs
2021-08-23 23:18:10 -07:00
jpark37
3d342cd1e1 obs-filters: Fix NvAFX mutex leak 2021-08-23 23:15:11 -07:00
Matt Gajownik
0b70b479a1 obs-browser: Disable Qt tooltip on old Qt versions 2021-08-24 12:08:21 +10:00
jp9000
b9e7ab9e68 obs-browser: Update version to 2.16.0
Render web tooltips in browser source Interact using Qt, and expose OBS
controls to browser sources
2021-08-23 18:31:18 -07:00
Richard Stanway
1444ead812 Revert "obs-ffmpeg, obs-qsv11: Disable dynamic bitrate support"
This reverts commit 1b29bfc884.
2021-08-23 18:26:37 -07:00
Clayton Groeneveld
cb317f2b3b image-source: Fix gif not working in studio mode
GIFs wouldn't render on the preview side in studio mode.
2021-08-23 08:01:21 -07:00
Clayton Groeneveld
5fd40b3feb decklink: Cleanup hide/show code
The obs_source_showing calls are unnecessary in these
functions.
2021-08-21 12:53:28 -05:00
Clayton Groeneveld
d83f45992a decklink: Fix deactivate when not showing
If the option to deactivate when not showing was on, the Decklink
input device wouldn't deactivate/activate when hiding/showing.
2021-08-20 23:39:12 -05:00