Commit Graph

10874 Commits (de11632a9c2000d142ba5c16da7ec175948fe449)

Author SHA1 Message Date
Matt Gajownik de11632a9c CI: Validate JSON Schema of Services files 2022-05-20 20:25:19 +10:00
Matt Gajownik 2960669f9a rtmp-services: Add JSONSchema definitions for services 2022-05-20 20:25:19 +10:00
gxalpha 41521b2816 UI: Move taskbar overlay functions into platform.hpp
Refactors the existing implementation for Windows into
platform-windows.cpp, allowing for other OS implementations in the
future.
2022-05-20 20:16:56 +10:00
Torge Matthies 5ac6c03a8a obs-ffmpeg: Initialize mapped_res field in nv_texture_init
Otherwise it might never be initialized and nv_texture_free might unmap
a non-existant resource.
2022-05-19 16:36:14 -07:00
Torge Matthies fe776a83eb obs-ffmpeg: Reserve jim-nvenc textures buffer space
Textures dynamic array buffer space was not reserved.
2022-05-19 16:36:14 -07:00
Ryan Foster 5a3e68a359 CI: Remove extra whitespace from Steam workflow 2022-05-19 18:50:03 -04:00
Ryan Foster b1c7d4eb4b CI: Update first-party GitHub Actions 2022-05-19 18:50:03 -04:00
tytan652 831fe03048 vlc-video: Fix sign-compare warning 2022-05-19 17:10:47 -04:00
derrod 5dcabaf5cf UI: Make OAuth base URL configurable 2022-05-19 09:31:38 -07:00
Matt Gajownik 73e6df5d09 obs-ffmpeg: Fix memory leak 2022-05-17 23:13:17 +10:00
jp9000 50c174df07 deps/opts-parser: Add missing c extern for cpp 2022-05-17 05:37:04 -07:00
jpark37 d70c6b9dfb obs-ffmpeg: Set 1000 nits for HLG metadata 2022-05-17 05:18:46 -07:00
Richard Stanway c7e83518e1 win-wasapi: Log source name when showing device errors
Sometimes users have a forgotten source pointing to an invalid device,
which is very difficult to locate without us showing the source name.
2022-05-17 02:47:08 -07:00
jpark37 d233065d60 libobs: Default 10-bit video to sRGB instead of PQ
Matches how VLC operates. HDR is only in effect with proper metadata.
2022-05-17 02:46:52 -07:00
jpark37 4304329d0c libobs: Ignore lower six bits for P010 sources 2022-05-17 02:46:41 -07:00
Ryan Foster 6a2e2aba03 cmake: Use correct capitalization for Qt in messages 2022-05-16 20:28:01 -04:00
Ryan Foster 872c6cd58c cmake: Normalize path to QtCore_DIR
Resolve the relative path to an absolute path once and then use that for
all other Qt file paths.
2022-05-16 20:28:01 -04:00
Ryan Foster 4d741833f8 cmake: Teach CopyMSVCBins to use Qt 5 or 6
Make CopyMSVCBins.cmake work with either Qt 5 or Qt 6 depending on what
version the user has chosen.
2022-05-16 20:28:01 -04:00
Ryan Foster 75d0f44551 docs: Update speaker_layout enum values
A documentation update was missed. Bring these values up to date with
the current reality.
2022-05-16 17:15:11 -04:00
Ryan Foster dbdf82da80 UI: Fix memory leak with Manage Broadcast dialog
When OBS has been connected to a YouTube account, the Manage Broadcast
dialog becomes available. Opening and closing this dialog leaks about
2-3 MB of memory each time. This happens because the dialog is never
deleted, and a new object is created every time the dialog opens.

If we set Qt::WA_DeleteOnClose on the dialog, then the dialog->exec()
call would call delete this. However, if the dialog->Valid() call
returned false (this should currently be impossible), then exec is never
called, so it would not clean up.

To fix this, make the dialog stack-allocated instead of using new and
delete.

Detected by clang-analyzer.
2022-05-16 22:46:50 +02:00
pkv 12d1f1c335 obs-ffmpeg: Fix 4 channel layout in ffmpeg-mux
Previously SPEAKER_4POINT0 was assigned to AV_CH_LAYOUT_QUAD, but later
was changed to AV_CH_LAYOUT_4POINT0 [1]. The change was forgotten in
obs-ffmpeg-mux. This is remedied here.
[1] 67e48ecc2c

Signed-off-by: pkv <pkv@obsproject.com>
2022-05-16 16:17:32 -04:00
pkv 5b6cc73c24 obs-ffmpeg: Fix for channel layout API change
The channel_layout API was overhauled by FFmpeg [1-4]. The previous
bitmask channel_layout is replaced by a struct ch_layout which combines
the number of channels, a bitmask and other infos. This struct must now
be supplied to AVframes since avutil >= 57.24.100 and to
AVCodecContext since avcodec 59.24.100 per (1].
This commit provides the required info to ffmpeg-mux,
obs-ffmpeg-output & to obs-ffmpeg-audio-encoders.

[1] Bump minor versions after the channel layout changes
cdba98bb80
[2] lavc: switch to the new channel layout API
548aeb9383
[3] avutil/channel_layout: Add a new channel layout API
086a804806
[4] avframe: switch to the new channel layout API db6efa18
db6efa1815

Signed-off-by: pkv <pkv@obsproject.com>
2022-05-16 16:17:32 -04:00
pkv e66542075d libobs: Fix missing include due to FFmpeg 5 changes
Since [1], avcodec/version.h is not included anymore in codec.h and
therefore is not included any more  in avformat.h.
As a result, LIBAVCODEC_VERSION_INT is no longer defined. This commit
fixes the include.
Since obviously we can't ifdef the avcodec include by referring to an
avcodec version, we ifdef it with the avformat version which was bumped
at the same time [2].

[1] libavcodec: Split version.h
f2da2e1458
[2] doc: Add an entry to APIchanges about changes to version.h and
 version_major.h
f3a0e2ee2b

Signed-off-by: pkv <pkv@obsproject.com>
2022-05-16 16:17:32 -04:00
Richard Stanway 377af35016
UI: Move scene import dialog to the stack
Changed for consistency as almost every other dialog in the application
is stack-allocated.
2022-05-16 21:51:01 +02:00
stopforumspam 035ac5e3b7 obs-ffmpeg: Allow setting FFmpeg options for media sources 2022-05-16 15:17:13 -04:00
stopforumspam 3215189c97 deps/media-playback: Add support for FFmpeg options for media playback 2022-05-16 15:17:13 -04:00
Grzegorz Godlewski b98ce32670 linux-v4l2: Fix camera reconnecting issue
Unable to add device after OBS start. Function device_added is never
called. HAVE_UDEV is not set correctly by cmake.
2022-05-16 13:29:52 -04:00
Kurt Kartaltepe 9b6d39299e linux-capture: Add EGL support for xcomposite
When running on EGL we can use the new create_texture_from_pixmap
functions to implement xcomposite capture.

This removes the texture indirection previously implemented for GLX due
to not using the spriting functionality in the built in shaders. Now
that we texture directly from the pixmap we can remove the red/blue swap
workarounds.
2022-05-15 09:08:53 -03:00
Kurt Kartaltepe d78b27961c libobs-opengl: Add create_texture_from_pixmap for EGL
create_texture_from_pixmap is only implemented for X11/EGL where it will
bind the provided X11 pixmap to a texture with glEGLImageTargetTexture2DOES
2022-05-15 09:08:53 -03:00
Kurt Kartaltepe f4a820a4ea deps/glad: update Glad for EGL with new extensions
This updates glad for EGL and adds in several extensions.

EGL_EXT_platform_base
EGL_EXT_platform_xcb
EGL_KHR_image_base
EGL_KHR_image_pixmap

The xcb platform extension is unused but good to include if we want to
try removing more Xlib dependencies. platform_base is included for good
measure as other platform extensions technically build on it. image_base
and image_pixmap are for upcoming xcomposite over EGL support.

It also drops the unused create_context_no_error extensions.
2022-05-15 09:08:53 -03:00
Norihiro Kamae d044231bfc libobs/media-io: Sleep to next audio time accurately
Prior to this change, the audio thread roughly waits the time of
`AUDIO_OUTPUT_FRAMES`, and consecutively processes twice or more if the
latency is accumulated. This behavior causes fluctuation of timing to
output audio packets. This change introduces `os_sleepto_ns_fast` so
that the audio packets will be periodically output.
2022-05-15 02:31:31 -07:00
Norihiro Kamae c491594a51 libobs/util: Add os_sleepto_ns_fast
The function `os_sleepto_ns` has a spin loop so it will consume CPU
resource. The new function has same interface but consumes less CPU
resource with a drawback of less precision.
2022-05-15 02:31:31 -07:00
jpark37 8909e44870 libobs: Cap HLG video at 1000 nits 2022-05-14 16:41:03 -07:00
jpark37 d7fb4361a5 libobs: Lock scene to video color space
Fixes studio mode preview on SDR monitor for HDR canvas rendering SDR
source into SDR swap chain. Needs to render SDR source into HDR render
target, and then tonemap into SDR swap chain for preview.
2022-05-14 16:40:28 -07:00
cg2121 8dc91ce5e1 UI: Add rename signal to adv audio dialog
The names wouldn't be updated in the advanced audio dialog
when the source is renamed.
2022-05-14 16:36:00 -07:00
gxalpha 252918a7c4 UI: Put program on top in vertical studio mode
Co-Authored-By: Elias Thompson <email@eliasthompson.com>
2022-05-14 16:15:04 -07:00
gxalpha 15874f9037 UI: Use Shift instead of Alt for Copy/Paste Transform
For Keyboard shortcuts with Ctrl as the primary modifier, the secondary
modifier should be Shift, not Alt. Alt could be used as a tertiary in
the future if really necessary, but generally it should be avoided.
2022-05-14 16:11:07 -07:00
PatTheMav 8d0131c519 obs-scripting: Fix macro redefinition warning
In Python 3.9+, `PyCFunction_New` and `PyCFunction_NewEx` are themselves
macros around `PyMethod_New`. To fix the warning, both macros need to
be untouched for those Python versions, instead the actual function
`PyMethod_New` needs to be imported and aliased.

This commit:

- Adds the import of the `PyCMethod_New` symbol
- Adds the function definition for `Import_PyCMethod_New`
- Adds the `PyCMethod_New` function alias
2022-05-14 16:10:11 -07:00
PatTheMav a0923c9b6e obs-scripting: Fix loading of scripting libraries with runtime lookup
macOS uses runtime lookup for symbols in obs-scripting. While this guard
fixes a compiler warning, it also leads to the `_PyCMethod_New` symbol
being undefined.

In turn any library linking with obs-scripting will then fail to load
because of that undefined symbol. Removing this guard fixes that issue.
2022-05-14 16:10:11 -07:00
Kurt Kartaltepe 1604400e48 linux-capture: Rewrite xcomposite
Generally moves all the plugin code into xcomposite-input.cpp and
removes all C++ dependencies.

Migrate as much as possible to xcb from Xlib to enable us to handle
errors and attribute them to the correct callers. This caused many other
knock on issues such as wrongly attributed errors and cleanup code
working incorrectly.

That allows us to use the xcursor-xcb implementation and delete the pure
Xlib implementation. We also add the missing functionality from the Xlib
implementation to the xcb implementation.

Capture glXCreatePixmap errors which occur most commonly on
nvidia+gnome due to nvidia's driver being unable to allocate more than 1
pixmap per window and gnome being the only compositor to read window
data via glx pixmaps.

Fix cleanup after failed glXCreatePixmap that might have leaked pixmaps
and prevented later captures on nvidia drivers for the same reason.
2022-05-14 17:01:08 -03:00
Jim f2ea473373
Merge pull request #6436 from jpark37/jxr-wic
libobs,image-source,UI: Add JXR support on Windows
2022-05-12 16:09:53 -07:00
Ryan Foster 069f35a75c UI: Find Qt WinExtras only in Qt 5
WinExtras does not exist in Qt 6. Only try to find it and link against
it if using Qt 5.
2022-05-11 23:37:41 -07:00
vfernandes-sympla f516b4c9d9 rtmp-services: Add sympla service 2022-05-11 23:37:13 -07:00
Norihiro Kamae dd43635e78 libobs: Fix reserved word in variable names
The use of the reserved name caused initialization failure on Linux.
2022-05-11 11:28:20 -04:00
jpark37 0f53dc28bb libobs: Reduce PQ shader math 2022-05-11 03:38:07 -07:00
jpark37 475d8432cb UI: Support JXR image dropEvent on Windows 2022-05-08 15:25:43 -07:00
jpark37 23f3b1da9f image-source: Support JXR on Windows 2022-05-08 15:25:43 -07:00
jpark37 4af20cf080 libobs/graphics: Add color space and WIC support
Only add support for PQ and CCCS JXR images, e.g. Xbox Series X, and
Xbox Game Bar screenshots on Windows.
2022-05-08 15:25:01 -07:00
jpark37 23396e21e5 libobs: Allow transitions to mix CCCS sources
Wasn't sure if CCCS sources should be allowed, but it fits image source.
2022-05-08 14:25:33 -07:00
jpark37 2a0d8d1c9c libobs: Add support for reading I420 PQ
Not normally a valid combination, but Xbox writes 8-bit HDR videos.
2022-05-08 14:12:41 -07:00