3008 Commits

Author SHA1 Message Date
Ryan Foster
1da97fb0d0 win-capture: Check for WGC support on plugin load
We shouldn't have to check WGC support for every display capture or
window capture source. Either the system supports it or it doesn't.
Check when the plugin loads and use that result.
2021-06-30 01:45:42 -07:00
Ryan Foster
2f3c0911fa win-capture: Determine D3D11 usage once per run
The device type (OBS renderer) cannot change without restarting OBS, so
we should only have to check if we're using D3D11 once instead of
checking every time a new display capture or window capture source is
created.
2021-06-30 01:45:42 -07:00
Exeldro
62d0661f98 obs-ffmpeg: Don't purge packets when there are none 2021-06-29 08:40:13 -07:00
Georges Basile Stavracas Neto
6942bb814d pipewire: Properly account for cursor hotspot
The cursor bitmap is centered on the hotspot, so not accounting
for it means PipeWire captures were positioning the cursor sprite
slightly off.

Properly account for the hotspot by subtracting it from the cursor
position.

Related: https://github.com/obsproject/obs-studio/issues/4766
2021-06-22 19:36:15 -07:00
Translation
ef2b1eb1c6 Update translations from Crowdin 2021-06-11 07:18:15 -07:00
jpark37
ba3eb46bf9 obs-ffmpeg: Add missing return statement 2021-06-07 22:14:38 -07:00
jpark37
a8414a09cc obs-ffmpeg: NVENC usage fixes
Only use lossless encode if the capability is supported.

Set qpPrimeYZeroTransformBypassFlag to 1 for lossless.

Do not set profileGUID for lossless.

For both NVENC implementations, retry with a heavier reset because both
are unable to recover from failure lightly.
2021-06-07 21:43:58 -07:00
jpark37
07084de805 obs-ffmpeg: Support lack of Psycho Visual Tuning
For new NVENC, warn if PVT is requested, but unsupported by the GPU.
Also retry without PVT on failure to try to catch bad cominbations.

For old NVENC, if PVT is enabled when FFmpeg failure occurs, retry
without PVT.
2021-06-06 11:05:04 -07:00
jpark37
15e37f96d1 obs-ffmpeg: Add linear alpha setting
Allow proper linear treatment of alpha for authoring sanity.
2021-06-04 19:04:08 -07:00
jpark37
08c5f02010 obs-filters: Fix swapped chroma distance values 2021-06-02 03:37:46 -07:00
Gol-D-Ace
90df8d44df Update translations from Crowdin 2021-05-30 20:33:35 +02:00
Richard Stanway
c5bb1278f4 obs-filters: Test if NVAFX is supported on load
Prevents situations where the redistributable is installed and OBS
enables the RTX denoiser but it is non-functional. Changes were tested
on systems with both supported / unsupported GPUs and it adds around
10-20ms to the load time in both cases.
2021-05-28 23:14:37 -07:00
jp9000
6792e9c1c6 obs-transitions: Disable separate track matte file for now
Because it's not currently possible to guarantee synchronization between
two separate media files (yet), disable separated track matte media
files for now. It'll just result in support requests that can't be
solved.
2021-05-23 04:00:18 -07:00
jpark37
0ffcb66526 graphics-hook: Add Detours include dir 2021-05-19 19:52:49 -07:00
jpark37
924d9a7d9c win-capture: Remove D3D12 fix toggle
The new D3D12 path seems stable enough. Remove the old path.
2021-05-18 12:47:25 -07:00
jpark37
a05b6f7280 win-capture: Bump graphics hook version to 1.5.0 2021-05-17 02:28:11 -07:00
jpark37
c6cee82c92 graphics-hook: Try multiple D3D12 queues
Keep trying queues until one of them passes D3D11On12CreateDevice.
2021-05-17 02:28:11 -07:00
jpark37
5290326b77 graphics-hook: Do not persist device unnecessarily 2021-05-17 02:28:11 -07:00
jpark37
7439e1c4b8 graphics-hook: More logging to help debugging 2021-05-17 02:28:11 -07:00
jpark37
d9d87e6502 graphics-hook: Kill early return 2021-05-17 02:28:11 -07:00
jpark37
c160a6ff3e graphics-hook: Give up on DXGI swap chain
If a swap chain hasn't been seen in a while, assume it no longer exists,
and reset the capture.
2021-05-17 02:28:11 -07:00
jpark37
3412f6fece graphics-hook: Reduce variable scopes 2021-05-17 02:28:11 -07:00
jpark37
32f9fc120a graphics-hook: Prevent recursive free
Make sure to set data.swap to null before calling data.free().
Otherwise, we may call data.free() again in the Release() hook.
2021-05-17 02:28:11 -07:00
jpark37
b899f06877 graphics-hook: Fix potential D3D12 device leak 2021-05-17 02:28:11 -07:00
jpark37
2e7b0e3340 graphics-hook: Use Detours for D3D12 hook
Will attempt to fully use Detours after 27 ships.
2021-05-17 02:28:11 -07:00
jpark37
4de5863d07 graphics-hook: Link Detours library 2021-05-17 02:28:11 -07:00
jp9000
740ff34b65 obs-vst: Remove unused code 2021-05-16 19:24:38 -07:00
Clayton Groeneveld
e1580d12fb obs-transitions: Make sure gs calls are in graphics context
This would cause a memory leak when toggling the track matte
transition.
2021-05-14 07:43:27 -07:00
jpark37
5fcffb066e obs-filters: Fix blend state for Scale filter
Was incorrectly using straight alpha blend instead of premultiplied.
2021-05-14 01:01:05 -07:00
jpark37
9e3dfa2409 obs-filters: Premultiply alpha for precision
For Apply LUT, and Luma Key, multiply alpha in shader instead of blend
unit for extra precision.
2021-05-14 01:01:05 -07:00
jp9000
6698638450 obs-transitions: Fix memory leak
Fixes a memory leak with stinger texrender objects. These functions must
be called while the graphics context is locked. Caught via warnings
generated by the destroy functions.
2021-05-13 15:13:07 -07:00
tt2468
ca88ba8bbc decklink: Fix crash during shutdown when output is on
The actual crash is caused because obs_module_unload() is called before
the decklink outputs are stopped. In obs_module_unload(), the deviceEnum
pointer is freed. During decklink_output_stop(), the removed code tries
to retrieve a reference of the decklink device from the deviceEnum and
crashes because it has already been freed. This code appears to serve no
purpose anyway, so we remove it.
2021-05-11 21:09:22 -07:00
Jim
055bc1d1ea
Merge pull request #4686 from jpark37/fast-image-source
Premultiply image sources on load
2021-05-11 20:27:53 -07:00
jpark37
9e092bf28e obs-filters: Fix color key distance
Was incorrectly computing distance between linear color and nonlinear
key. Make color nonlinear to match previous behavior.
2021-05-11 20:23:19 -07:00
jpark37
3ee57878a3 image-source: Premultiply images on load
This ensures correct texture filtering, simplifies the render callback,
and allows us to remove the custom draw flag, restoring the direct
rendering optimization for filters against image sources.
2021-05-11 03:44:06 -07:00
jp9000
fa3d87b770 obs-transitions: Use texrender with stacked track mattes
When using a stacked track matte stinger transition with a visibility
transition, the matte portion of video would also be visible on the
right side or below the source. This fixes it by first rendering the
video to a texrender object in order to filter out the unwanted portion.

(Jim note: So basically, track matte stingers now use two texrenders.  I
really don't like this. Texrender objects can already cause stalling as
it is.)
2021-05-11 00:58:16 -07:00
jp9000
c4e0a68641 obs-transitions: Fix track matte rendering improper sizes
When using track matte stingers as visibility transitions, it would
render the matte portion at the incorrect size. This was due to the fact
that texrender render code blocks do not set the projection matrix.
You're supposed to do that manually. Thus, it was using whatever the
current projection matrix was, which was usually the canvas projection
matrix.

(Jim note: There were reasons why I didn't make texrender objects do
this automatically, mostly scaling and performance reasons, but I
realize now I should have at least provided an option for it instead to
prevent this "gotcha" situation from happening. Bad design on my part. I
do not blame Palakis for falling for this.)
2021-05-11 00:58:16 -07:00
jp9000
d4780e061c obs-transitions: Fix annoying log message
This would cause a null pointer check log message because matte_source
only exists when using an explicit separate video for track matte
stingers. Instead, explicitly set matte_ph to null if matt_source is
null to avoid the null pointer check logging.
2021-05-11 00:58:16 -07:00
jp9000
9867b9513f obs-transitions: Only check matte duration if matte exists
The code within this block was being called even when there is no matte
source present. Caught by null pointer checks in the log.
2021-05-11 00:58:16 -07:00
jp9000
279ca988cd obs-transitions: Free matte texrender when not in use
This prevents the texrender object from lingering if the user changes
the transition properties.
2021-05-11 00:58:16 -07:00
jp9000
84b12afa5f obs-transitions: Remove unnecessary matrix push/pop
texrender objects already push/pop the matrix internally, so doing this
within a texrender rendering code block isn't necessary.
2021-05-11 00:58:16 -07:00
jp9000
4636413334 obs-transitions: Reset track matte texture in tick
This causes the track matte render target to only be reset once per
frame, rather than potentially multiple times per frame. Palakis most
likely did not know that you're supposed to reset only once per frame in
order to prevent the render target from being rendered more than once
per frame.

(Jim note: I probably should have made texrender objects automatically
detect new frames internally so it wouldn't require this. Not Palakis'
fault.)
2021-05-11 00:57:26 -07:00
jp9000
07783c1846 Revert transition scaling fix
This reverts commit 091bdb983251380, dc2b00a4dd6669, and
661256e6de080df.

These did not fix the problem with track matte scaling.
2021-05-11 00:25:04 -07:00
jp9000
8ecf634ba7 Revert "rtmp-services: Add Odysee.com"
This reverts commit e876ad6596d11099111d6c526b03a86f9fd8a45c.
2021-05-09 00:55:16 -07:00
jpark37
9d7330ca44 obs-transitions: Blend in linear space
Color mismatch is apparent when using source transitions, which lerps
against transparent black and blends into the canvas nonlinearly. When
the transition is done, the blend switches to linear, leading to a pop.

Fix the issue by blending into the canvas in linear space. The lerp is
still nonlinear by design.
2021-05-08 20:53:44 -07:00
iamflorencejay
e876ad6596 rtmp-services: Add Odysee.com 2021-05-08 15:31:43 -07:00
geekenmd
200c154238 rtmp-services: Add Brime Live service
rtmp-services: Add Brime Live service
2021-05-08 15:14:19 -07:00
jpark37
f40eede37a obs-filters: Fix unreferenced variable warning 2021-05-08 14:12:54 -07:00
jpark37
366b716f20 libobs-winrt,win-capture: Cursor toggle exceptions
A user has reported that toggling the cursor can cause exceptions.

Propagate that information upward, so we can reset the capture.

Display capture never needed to call the function in the first place.

Shuffle around window capture code to make a common reset function.

Builds on PR #4663.
2021-05-07 23:50:13 -07:00
jpark37
3514f4fea5 win-capture: Fix WGC disable index for display
Previously disabled DXGI because the index is wrong.
2021-05-06 13:58:14 -07:00