Commit Graph

18 Commits (master)

Author SHA1 Message Date
jpark37 b7ab8cf838 libobs-d3d11: Simplify duplicator formats
Remove DXGI_FORMAT_R10G10B10A2_UNORM since it can be ambiguous whether
it is Rec. 2020 PQ, or high-precision sRGB. We can revisit later.
2022-03-09 23:05:45 -08:00
jpark37 e77421a805 libobs-d3d11: DuplicateOutput1 for DXGI capture
Despite DuplicateOutput deing documented to always return BGRA8, it is
seen fluctuating between BGRA8 and RGBA16F when HDR is enabled.
DuplicateOutput1 seems to provide a stable format whether SDR or HDR.

Also update the texture recreation logic to check for format changes.
2021-12-21 02:38:42 -08:00
jpark37 6d59cf19e9 libobs-d3d11: Use typeless texture for duplicator
This allows us to use an SRGB SRV for automatic decompression.
2021-07-11 08:26:29 -07:00
jpark37 2b652cc763 libobs: gs_duplicator_get_monitor_index
Helper function to find DXGI output index of HMONITOR.
2021-01-26 17:11:04 -08:00
jp9000 8ecfb405ce Revert "win-capture, libobs: Show names of displays in Display Capture"
This reverts commit 9931f22ff4.
2020-03-19 06:43:57 -07:00
Matt Gajownik 9931f22ff4 win-capture, libobs: Show names of displays in Display Capture 2020-03-09 11:13:59 +11:00
jpark37 471d752d75 libobs-d3d11: Use unordered_map for duplicator collection
Not in love with STL, but lets at least use the semantically-correct
collection. It's also a shame this is a global variable with gross
pre-main allocations, but attaching it to the device instance would
break the interface.
2019-10-10 19:29:15 -07:00
jpark37 fe02a8286e libobs-d3d11: Consistent exception catch parameters
Fixed missing references, and stray usages of const references instead
of reference to const types. Apply const correctly where applicable.
2019-08-28 21:10:51 -07:00
Michael Fabian 'Xaymar' Dirks 1154c01266 libobs-d3d11: Catch be reference 2019-07-24 18:26:43 +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
Wouter 65f81105f5 libobs-d3d11: Allow multiple display captures of same monitor
This commit fixes a bug that occurs on Windows 8+ when two or more
"Display Capture" sources are active that are configured to capture the
same monitor.  Only one display capture would show, while all subsequent
display captures would display nothing.

Closes jp9000/obs-studio#1142
2018-01-09 19:49:54 -08:00
jp9000 e74a007718 libobs-d3d11: Allow rebuild even if output duplicator fails
Prevents an issue where the output duplicator would cause the program to
crash if the graphics driver crashes and the graphics subsystem needs to
be rebuilt.
2017-11-16 20:49:56 -08:00
jp9000 951c6892b0 libobs-d3d11: Use linked list for all objects (for rebuilding) 2016-11-03 09:23:21 -07:00
jp9000 a5ed61e02e libobs-d3d11: Store index and add "Start" function
This allows restarting the duplicator at a later point in time.
2016-11-03 09:23:13 -07:00
jp9000 29eea269fc libobs-d3d11: Store dxgi adapter used for device
Keeping a reference is useful, and additionally allows pruning a bit of
duplicated code in the dupicator object.
2016-11-03 09:23:07 -07:00
jp9000 fd591fbd45 libobs-d3d11: Use debug log if duplicator fails to create
The duplicator is supposed to be able to safely fail to create, so using
a debug log message is more appropriate.
2015-11-16 11:11:16 -08:00
jp9000 1b2c3a6176 libobs-d3d11: Fix initializer list ordering
Microsoft's compiler doesn't seem to care about warning about things
like initializer list ordering.  Mingw actually reports on this to
prevent potential confusion about ordering.
2015-02-09 03:56:09 -08:00
jp9000 44b8c24f34 libobs: Add output duplicator support
This adds support for the windows 8+ output duplicator feature which
allows the efficient capturing of a specific monitor connected to the
currently used device.
2015-01-03 02:37:13 -08:00