Commit Graph

302 Commits (500111e230a4f55643db1c966ca2bdb61b38b375)

Author SHA1 Message Date
Peter Geis 64d0b7fcb4 libobs: Enable compilation on aarch64
Add arch checks to enable aarch-compat layer on aarch64, retain normal
gcc intrinsics on x86 and ppc64.
2019-11-25 13:04:21 -05:00
Clayton Groeneveld 82ffcdc827 UI: Add source icons 2019-11-24 20:50:42 -08:00
tujinshu 76e6a99124 win-capture: Fix rare crash when GL program exits
**Commit message modified and clarified by Jim**

When hooking a program that has both DirectX and OpenGL contexts in use,
it is possible to cause a crash on shutdown due to capture_active()
returning true when an OpenGL context is deleted.  Normally, when
capturing an OpenGL program, this would not happen because the 'active'
variable would not be set due to OpenGL capture not being initialized,
but if DirectX is captured while an OpenGL context is available, and
OpenGL could not load these required functions, then GL can crash due to
trying to use unavailable functions.

This case is extremely rare and doesn't happen under normal
circumstances; only if a program is using both DirectX and OpenGL within
the same program simultaneously, and *only* if OpenGL could not load the
required functions.  This likely almost never happens under normal
programs, games, and hardware.  This was apparently produced by hooking
a GL Qt program that used QWebEngine, which used multiple contexts at
once.
2019-11-05 13:44:15 -08:00
Joel Bethke 6fb3552d70 win-capture: Add additional exe to window capture blacklist
These are additional internal windows processes that should not
be listed in the window capture dropdown.
2019-10-16 19:47:43 -05:00
Jim 6b08c064f6
Merge pull request #2066 from jpark37/feature-level-baseline
Use D3D_FEATURE_LEVEL_10_0 as baseline
2019-10-12 20:55:33 -07:00
jpark37 1ce61c57c0 win-capture: Fix extra duplicator refs
Make duplicator_capture_tick the sole creater, and reference adder of
IDXGIOutputDuplication objects. This prevents a situation where
duplicator_capture::showing cause be false while
duplicator_capture::duplicator was not null at startup on background
scenes, preventing IDXGIOutputDuplication from being recreated when
DXGI_ERROR_ACCESS_LOST.
2019-10-10 19:03:18 -07:00
Gol-D-Ace 03b5be75e4 Update translations from Crowdin 2019-09-17 23:21:00 +02:00
jpark37 3ddef4bf7d win-capture: Remove support for feature level 9.3
Be consistent with libobs-d3d11, which now uses 10_0 as the baseline.
2019-09-08 22:43:41 -07:00
jpark37 ef39715c31 win-capture: Remove unused variable from D3D12 capture 2019-09-08 22:36:25 -07:00
craftwar e004ce8064 graphics-hook: Fix format specifier 2019-09-02 21:12:27 +08:00
jp9000 d981c10906 Revert "win-capture: Don't leak dynamic library references"
This reverts commit c5928bff4a.

This breaks game capture.
2019-08-17 12:23:44 -07:00
Michael Fabian 'Xaymar' Dirks c5928bff4a win-capture: Don't leak dynamic library references 2019-07-24 18:26:45 +02:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
jp9000 53615ee10f clang-format: Add clang-format files 2019-06-23 01:53:56 -07:00
Gol-D-Ace 973bc481ce Update translations from Crowdin 2019-06-11 01:42:42 +02:00
jp9000 1f39259bc5 win-capture: Add discord to game capture blacklist 2019-06-01 20:07:39 -07:00
geemion f6581952bc win-capture/graphics-hook: Check if mutex abandoned
It's possible that the mutexes used with shared memory capture to return
WAIT_ABANDONED if OBS is shut down abnormally while the mutex is locked.
2019-04-14 03:44:48 -07:00
Gol-D-Ace e78ac5ebef Update translations from Crowdin 2019-04-04 16:19:51 +02:00
jp9000 93cc09f078 obs-text, win-capture: Do not use premultiplied alpha 2019-03-07 08:14:34 -08:00
Gol-D-Ace c3711bdd5e Update translations from Crowdin 2019-02-20 22:26:07 +01:00
jp9000 c372d26c02 win-capture: Don't try to find window every frame
When window capture is not capturing a window, don't try to find the
window every frame.  Instead, just check once per frame.  The process of
finding a window has a lot of checks and requires a surprising amount of
processing.
2019-02-11 17:57:24 -08:00
Colin Edwards 17524a9691
Merge pull request #1638 from WizardCM/offset-monitor-count
win-capture: Start user-facing monitor count at 1
2019-02-04 21:00:05 -06:00
jp9000 a4e8b93653 win-capture: Add a few more blacklisted capture exes 2019-02-04 18:16:43 -08:00
jp9000 da1f84133e win-capture: Do not capture "explorer.exe" with null titles 2019-02-04 18:16:43 -08:00
Matt Gajownik 84a3a906a0 win-capture: Start user-facing monitor count at 1
Operating systems don't report monitors from 0, so OBS shouldn't
either. This avoids user confusion when display capture doesn't work.
This does not change monitor count internally.
2019-02-03 11:18:00 +11:00
Christopher Serr 7c53483388 Use Premultiplied Alpha for Text and Game Capture (#1578)
The GDI+ based Text Source actually uses Premultiplied Alpha. The edges
of the fonts are therefore incorrectly blended, causing ugly artifacts
especially if bright text above a bright background is used. Here's an
image comparing the new text blending (left) to before (right):
![https://i.imgur.com/VhhkQcZ.png](https://i.imgur.com/VhhkQcZ.png)

Additionally, the game capture has the same problem, so premultiplied
alpha is used there as well now.
2019-01-30 21:54:24 -06:00
Richard Stanway 7a32f12d9c win-capture: Disable cached offsets writing
We don't read cached offsets any more, so it makes little sense to write
them on every startup.
2019-01-27 16:18:53 +01:00
Richard Stanway f48b210d61 win-capture: Improve reading from get-graphics-offsets
Increase the buffer size to read the response in one call if possible,
and cause an error condition with log message if the offsets string is
empty.
2019-01-27 16:18:53 +01:00
Jim 0f6761468b
Merge pull request #1479 from tompeeters368/master
win-capture: Add option to adjust hook rate for game capture
2018-09-17 13:52:41 -07:00
Jim af320a0838
Merge pull request #1480 from kkartaltepe/module-descriptions
Plugins: Add descriptions to modules
2018-09-16 15:34:28 -07:00
Tom Peeters 6bbeaae02e win-capture: Add option to adjust hook rate for game capture
This option slows down or speeds up the rate at which
the game capture plugin checks for a valid window.
2018-09-13 19:35:37 +02:00
jp9000 b3ef46d986 cmake: Make static VC runtime libraries consistent
Makes Visual C runtime libraries consistent across
Debug/MinSizeRel/Release/RelWithDebInfo, rather than just changing those
flags for RelWithDebInfo.  Also adds /Zl for statically linked
libraries.

Closes obsproject/obs-studio#1421
2018-09-12 07:49:13 -07:00
Kurt Kartaltepe d86c8121ed Plugins: Add descriptions to modules 2018-09-11 18:28:58 -07:00
Jim 4e90b61210
Merge pull request #1364 from kkartaltepe/patch-5
[win-capture] Modify log for sharedmem
2018-09-05 23:59:03 -07:00
Matt Gajownik d2538690b5 UI: Blacklist LockApp and Text Input from Game Capture
Occasionally users accidentally select the following applications built
into Windows 10 using game capture, which cannot be captured.
This PR simply hides them from the game capture list.
The latter takes up 6 entries in the dropdown.

LockApp.exe - the lock screen which doesn't run in user space
WindowsInternal.ComposableShell.Experiences.TextInput.InputApp
2018-09-02 15:21:10 +10:00
Gol-D-Ace a79aaa28ab Update translations from Crowdin 2018-08-18 04:16:35 +02:00
sorayuki b3ed50aa08
win-capture: Avoid segfault when retrieve size
When changing size of a game-capture scene item in preview window, 
if the capture target window closed, it may crash.
2018-08-08 16:28:40 +08:00
sorayuki ce53c5cc70
win-capture: Avoid tex size mismatch for cursor
Re-fetch texture when cursor's either width or height changed.

When the cursor icon changed and the new one has the same width or height,
it may not recreate the texture and thus cause memory access violation.
2018-08-07 17:15:07 +08:00
Kurt Kartaltepe f90a052b5e win-capture: Modify log for sharedmem
Distinguish in the log that this is for shared-mem/mutli-adapter
not anti-cheat.
2018-07-13 23:14:30 -07:00
SuslikV a75724d8a5 win-capture: Fix cursor draw size with certain cursors
When drawing cursor to window capture area - use actual resource width
and height instead of system metric values for icons.  Fixes an issue
where under rare circumstances, certain cursors would not draw at the
correct size.

Closes obsproject/obs-studio#1284
2018-05-06 11:38:49 -07:00
Richard Stanway 4df7914767
win-capture: Update D3D9 signature for Win10 April 2018 Update 2018-05-02 14:00:44 +02:00
Zachary Lund 6475a1c000 win-capture: Avoid obs functions in init_hooks 2018-04-24 14:17:28 -07:00
Gol-D-Ace 88282c168c Update translations from Crowdin 2018-03-15 09:00:28 +01:00
jp9000 4b54bde426 cmake, libobs, win-capture: Fix VS2017 warnings 2018-03-12 16:16:38 -07:00
jp9000 8a16fa8341 win-capture/graphics-hook: Fix memory offset calculation
Fixes an issue where align_pos could be smaller than
sizeof(struct shmem_data), potentially overwriting memory of the header.

References jp9000/obs-studio#1202
2018-02-24 21:48:50 -08:00
Gol-D-Ace ae22886f67 Update translations from Crowdin 2018-01-22 04:55:52 +01:00
jp9000 ae259bf8d8 win-capture: Make minor clarification to locale string 2018-01-13 18:30:23 -08:00
Joel Bethke 10b27723a3 win-capture: Change string for memory capture option
Makes it a bit more clear this option shouldn't be used unless you're on
SLI/crossfire.

In the future, something should be put in to the program that detects
laptops and warns on how to set up their adapter for efficient capture.

Closes jp9000/obs-studio#1138
2018-01-08 15:44:05 -08:00
Richard Stanway 66ec96d52c
win-capture: Fix memory capture crash on new capture
If the target process re-creates its D3D context, the game capture tick
can trigger before the capture is setup, in which case OBS gets a
CAPTURE_RETRY message. However with the memory capture method, it
continues to try and copy from the shared memory pointer which is no
longer valid, resulting in a crash. The fix uses the old texture until
the next tick at which point the new capture should be ready for use.
2017-12-14 16:40:14 +01:00
Richard Stanway cf9f016820
win-capture: Rename structs to avoid SDK conflict
Windows SDK 10.0.16299.0 defines these structures as part of winternl.h
but using different types and names. Unfortunately there's no macro to
detect the SDK version, so to avoid conflicting with newer / older SDKs
the OBS structs have been renamed.
2017-12-12 18:20:56 +01:00