Commit Graph

2567 Commits

Author SHA1 Message Date
Antti Tapaninen
44fe366fb0 libobs: Override fps ovi for aux views 2022-12-03 15:15:50 -08:00
Ryan Foster
9f31a9d7a5 libobs: Suppress LNK4098
Suppress LNK4098 to allow building against pre-built Jansson for now.
2022-11-22 00:14:16 -05:00
Jim
02d20e9f36 libobs: Fix adapter index not getting applied to resets 2022-11-21 17:56:45 -08:00
derrod
cdc9313829 cmake/libobs: Set OBS_COMMIT based on git describe 2022-11-22 02:54:07 +01:00
Jim
e62759a3fa libobs-d3d11: Make sure libobs knows the new adapter index
Because Intel has wonderful code which forces it to run on the iGPU if
there are both an Intel iGPU and an Intel dGPU on the same system, the
adapter index OBS is set to internally will no longer be valid, thus if
anyone calls `obs_get_video_info()` to try to find out what adapter
index OBS is running on, it will be invalid on those computers.
Wonderful.

So, basically, this code here just fixe it so if you want to call
`obs_get_video_info()`, it'll actually have a valid adapter index now,
that way we can reference the adapter index when determining what GPU
we're actually running on without having to like, do anything super
complicated and silly like comparing adapter GUIDs just to figure out
what adapter OBS is actually runing on. I don't want the code to be a
mess anymore.

(I like how in any other situation on the face of the planet, there's no
need to force OBS to run on an integrated adapter. *Normally* OBS
*should* run on the dedicated adapter, that way it can actually capture
games properly. You can probably guess as to why they're forcing it to
run on the integrated adapter rather than the dedicated adapter. But you
know what? Whatever. I don't really care anymore I guess. Just...
whatever. Here we are I guess. Also I was in a bad mood while writing
this just as a disclaimer.)

(I hate that this commit exist. I hate that the commit c83eaaa51c exists
even more.)
2022-11-21 08:47:36 -08:00
gxalpha
34e6a5b73f libobs: Deprecate obs_get/set_master_volume
These methods were never implemented to do anything.
2022-11-19 20:37:22 -05:00
Antti Tapaninen
c7f4c78a69 libobs: Allow overriding video resolution per view 2022-11-19 15:34:54 -08:00
jpark37
3d36ba5579 libobs: Fix SRGB to SCRGB async video rendering
SDR source projectors are no longer blown out on HDR displays.
2022-11-17 02:16:48 -08:00
PatTheMav
c6cb1eb7d1 libobs: Replace invocations of sprintf with snprintf
Fixes deprecation warnings in Xcode 14/clang on macOS and reduces
chance of buffer overflows.
2022-11-11 19:51:27 +01:00
pkv2
252e352a51 libobs: Change audio resampler to new channel API
The channel_layout API was overhauled by FFmpeg [1-5]. The previous
bitmask channel_layout is replaced by a struct ch_layout which combines
the number of channels, a bitmask and other infos.
The resampler needs to be updated whenever using swresample > 4.5.100.
This commit makes the necessary changes.

[1] Bump minor versions after the channel layout changes
FFmpeg/FFmpeg@cdba98b
[2] lavc: switch to the new channel layout API
FFmpeg/FFmpeg@548aeb9
[3] avutil/channel_layout: Add a new channel layout API
FFmpeg/FFmpeg@086a804
[4] avframe: switch to the new channel layout API db6efa18
FFmpeg/FFmpeg@db6efa1
[5] swresample: convert to new channel layout API
FFmpeg/FFmpeg@8a5896e

Signed-off-by: pkv <pkv@obsproject.com>
2022-11-10 19:37:07 -05:00
jpark37
e709797d80 libobs: Add P3 shaders for Mac 2022-11-09 22:34:50 -08:00
Tommy Vercetti
1adb984bd9 libobs: Log Windows emulation status 2022-11-09 03:03:26 -08:00
Tommy Vercetti
eb93011463 libobs: Log macOS Rosetta status 2022-11-09 03:03:26 -08:00
Tommy Vercetti
41efdc498c libobs/util: Add function to get Windows x64 emulation status 2022-11-09 03:03:26 -08:00
Richard Stanway
da3a81a637 libobs: Remove Aero logging 2022-11-08 20:44:47 -08:00
derrod
567505b2ed libobs: Fix reading Windows release name 2022-11-08 08:47:23 -05:00
derrod
1b6e1ce655 libobs: Add utility function to get total RAM 2022-11-08 05:38:37 -08:00
jpark37
6306c8de74 libobs: Move async filtering from render to tick
Fixes frame/texture size mismatch crash that can happen at render time.
2022-11-08 05:37:47 -08:00
gxalpha
5658bf6732 libobs: Add "source_update" signal
Adds a source signal that gets triggered when a source's settings are
updated.
2022-11-05 18:06:53 -07:00
Jim
6bd4b854f7 libobs: Update to 28.1.2 2022-11-05 06:33:04 -07:00
PatTheMav
bbb3dc0059 libobs: Force hvc1 codec tag for HEVC video and respect input tags 2022-11-02 22:44:20 +01:00
jp9000
808c8105cc libobs: Update version to 28.1.1 2022-11-01 00:51:42 -07:00
jp9000
da6bf3ffba libobs: Update version to 28.1.0 2022-10-31 14:28:33 -07:00
jpark37
080095786f libobs: Force SRGB conversion for tonemapped video
Fixes case where video capture is darkened when both luma wipe and scale
filtering are set.
2022-10-31 14:05:04 -07:00
jpark37
3d985f7c60 libobs: Fix blend method in studio mode
Property was not being copied over.
2022-10-29 16:15:58 -07:00
Kurt Kartaltepe
a9641940cb libobs: Add media key support for linux
Links up the xkb keysyms with the obs vk codes.

Fixes #7649
2022-10-29 16:08:16 -07:00
Richard Stanway
a282b1c64d libobs: Add ifdef for Windows-only variable assignment 2022-10-15 16:17:46 -07:00
jp9000
3dfcdb8c07 Revert "libobs: Update version to 28.1.0"
This reverts commit 9baf7f4a8f.
2022-10-11 19:37:32 -07:00
jp9000
9baf7f4a8f libobs: Update version to 28.1.0 2022-10-11 17:11:47 -07:00
jpark37
e119a7024d libobs: Sample video at default chroma location
Expect left for 4:2:0 SDR and 4:2:2, and top-left for 4:2:0 HDR.

MJPEG will be a half-pixel off, but we'll live with that for now.
2022-10-09 16:15:16 -07:00
jpark37
2a76ffaf02 libobs/graphics: Precompute more accurate matrix
This is generated with .NET BigInteger fractions, and late divide.
2022-10-05 08:36:29 -07:00
jpark37
51c452e937 libobs: Precompute more accurate matrices
These are generated with .NET BigInteger fractions, and late divide.
2022-10-05 08:36:29 -07:00
jp9000
77b11c16f1 libobs: Update version to 28.0.3 2022-10-01 17:39:24 -07:00
jp9000
4741a9aa50 libobs: Add function to get encoder pause offset 2022-09-30 13:07:19 -07:00
jpark37
3dd0f895f8 libobs/media-io: Restore color range conversion
FFmpeg needs color range during context init to handle conversions.
sws_setColorspaceDetails after the fact is too late.
2022-09-26 21:26:01 -07:00
jpark37
5af9c87e1b libobs/media-io: Avoid scaler for range diff
Green tint appears when using converting full NV12 to limited NV12 with
swscale, so just avoid creating scaler by color range for now.
2022-09-24 16:45:01 -07:00
jpark37
a34fae0327 libobs,UI: Swap red/blue render/output channels
Don't need to unswizzle channels for DeckLink output in the future.
2022-09-24 16:06:34 -07:00
Kurt Kartaltepe
615728fa3b libobs/util: Reject plugins linking Qt5 library for Linux
Since obs-studio switched to Qt6, old plugins linking Qt5 should be
rejected. On Linux system, OBS and it's plugins link the system
libraries so that obs could be crashed by such plugins that links Qt5
when Qt5 functions are called.

Co-authored-by: Norihiro Kamae <norihiro@nagater.net>
2022-09-19 10:01:18 -03:00
jpark37
bb02620169 libobs: Add support for reading NV12/YUY2 PQ/HLG
8-bit HDR shouldn't exist, but OBS looks broken, so just support it.
2022-09-17 16:36:31 -07:00
jpark37
1a7e5babc2 libobs: Add support for reading I420 HLG
Sony cameras can create 8-bit HLG videos for some reason.
2022-09-16 03:04:23 -07:00
jpark37
70f8e83353 libobs/media-io: Create scaler in more cases
Check for other data mismatches the scaler can fix up.
2022-09-10 15:36:27 -07:00
jpark37
1ddabc5c7c libobs: Remove unnecessary branch
Fast path for output texture shouldn't care what the effect is.
2022-09-10 15:34:29 -07:00
jp9000
4563413d15 libobs: Update version to 28.0.1 2022-09-02 19:06:23 -07:00
jp9000
3cde5dd48a libobs: Update version to 28.0.0 2022-08-30 20:17:35 -07:00
jpark37
b4cc32c4c9 libobs: Extend NVIDIA anti-flicker to desktops 2022-08-29 10:02:32 -07:00
jpark37
37389ff243 libobs: Avoid display clear workaround if possible 2022-08-27 16:32:50 -07:00
jp9000
07df6548fd libobs: Increase texture encode buffering
Seems to solve lag encountered on the new AMF encoder. The SubmitInput
call in the AMF encoder can occasionally stall for quite a long amount
of time, but most take microseconds, so we can compensate by simply
increasing the buffering (3 to 10 textures).
2022-08-27 14:29:28 -07:00
PatTheMav
2bb0818fb4 libobs: Use system header notation for pthread.h include
Using a relative path for the pthread.h header by w32-pthreads breaks
compilation of plugins which include threading.h from libobs (as
w32-pthreads will exist at a different location relative to the
libobs header).

As w32-pthreads (and its include directory) is added to the libobs
target by CMake, the pthread.h header will be found even when using
system header notation.

Fixes https://github.com/obsproject/obs-studio/issues/7155
2022-08-24 05:40:37 -07:00
derrod
44eb8ffbb6 libobs: Fix Windows 10/11 Gamemode/HAGS detection
It seems that the older key still exists on Win 11 and 10 but is always
set to 0, so use the newer to start with and fall back to the old one if
necessary.

Additionally, if the key for HAGS and GameMode do not exist assume
they're on as this is the default on Win 11. On Windows 10 game mode is
also on by default in recent versions.

Also changes "10" to "10/11" just for correctness.
2022-08-24 05:08:04 -07:00
jpark37
f88300a613 libobs: Emulate clear with draw for displays
Laptops that render OBS displays on NVIDIA, and display through Intel
have been seen flickering, and we think the driver is not properly
handling swap chain buffers that have been cleared but not drawn to. To
work around this, we use a draw to simulate a render target clear. This
is not as efficient, so hopefully NVIDIA will fix this soon.
2022-08-24 05:01:08 -07:00