0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

13563 Commits

Author SHA1 Message Date
derrod
731da1be6b libobs: Fix hotkeys when reordering sceneitems into/out of groups 2023-10-08 02:00:46 +02:00
derrod
763dddbbaf libobs: Distinguish sceneitem hotkeys by id 2023-10-08 02:00:46 +02:00
derrod
4bb2365a62 libobs: Specify scene item IDs on creation 2023-10-08 02:00:46 +02:00
PatTheMav
2226292adc UI: Initialize YouTubeAppDock synchronously to fix Qt runloop issues
The YouTubeAppDock uses its own cookie manager and thus requires a
running CEF instance before creating the dock. Unfortunately creation
of the dock itself and launching the associated browser instance are
coupled in the code.

The UI code to restore browser dock states runs _after_ this code and
unfortunately this is also the only way to ensure that if the user
has closed the YouTubeAppDock before that it stays closed on app
launch (the dock needs to exist in the Widget hierarchy for its state
to be restored).

Alas, outside of Windows, InitBrowserPanelSafeBlock uses a separate
local QEventLoop to block the main thread while still allowing UI
events to be processed to launch a CEF instance.

By this point in the code execution, the primary event loop has not
been started yet, so the event loop launched by
InitBrowserPanelSafeBlock temporarily becomes the main application
event loop, which initializes all Widgets, finds no active window
state for the widgets, and thus treats them as "visible", calls the
showEvent method on every browser dock, which thus loads the associated
websites.

The dock state is restored after all that, which leads to each browser
dock being "shown" (even though the main QApplication hasn't even
started yet), the associated sites are running (including audio and
video output) but then hidden again, which leads to surprising audio
output seemingly coming from "nowhere".

All browser docks call the browser initialization methods synchronously,
which has the benefit of not spinning up a premature event loop, and does
not trigger Qt view state changes before all Widgets have been
initialized. Having the YouTubeAppDock behave the same does thus not
negatively impact UX.
2023-10-08 02:00:38 +02:00
Kurt Kartaltepe
728cd56583 linux-v4l2: Expand packed values to 4 bytes
These days you might capture card a 175Hz monitor with a framerate
defined as 10000000/57143 that doesnt fit in a short. And reporting a
negative FPS in that case isnt very helpful.
2023-10-08 02:00:28 +02:00
artemmdev
5f8eff7ec1 rtmp-services: Update OnlyFans streaming service 2023-10-08 02:00:01 +02:00
Lain
64e26b2969 libobs: Use same ver. in obs-config.h for betas/RCs 2023-10-06 18:23:49 -06:00
derrod
e4587ae9bd UI: Cleanup remaining uses of old version macros 2023-10-06 17:21:51 -06:00
derrod
9f37258298 UI: Refactor Windows update check to always use LIBOBS_API_VER 2023-10-06 17:21:51 -06:00
derrod
d78a05e124 cmake: Fix OBS_COMMIT not being set (Windows only) 2023-10-06 17:21:51 -06:00
derrod
e11ffeccb0 cmake/libobs: Only set beta/rc increment 2023-10-06 17:21:51 -06:00
Exeldro
82864559f2 libobs: Fix errors for gs_effect_create 2023-10-06 10:51:15 -06:00
derrod
5dde70ccff obs-ffmpeg: Readd OBS_ENCODER_CAP_DYN_BITRATE to AMF texture encoders 2023-10-05 16:55:21 -04:00
jpark37
e11e2133e2 libobs,obs-filters: Fix NAN when tonemapping
Can happen when colors are wider than Rec. 2020.
2023-10-04 19:33:54 -04:00
Ryan Foster
02478d4939 UI: Use std::shared_ptr instead of QSharedPointer
Also use std::weak_ptr instead of QWeakPointer as needed.

Qt has been porting QSharedPointer and QWeakPointer to std::shared_ptr
and std::weak_ptr respectively. QSharedPointer is apparently 2x slower
than std::shared_ptr.

References:
 * https://bugreports.qt.io/browse/QTBUG-109570
 * https://codereview.qt-project.org/c/qt/qtbase/+/359678
 * https://codereview.qt-project.org/c/qt/qtgrpc/+/447780
 * https://codereview.qt-project.org/c/qt/qtbase/+/450134
 * https://codereview.qt-project.org/c/qt/qttools/+/450776
 * https://codereview.qt-project.org/c/qt/qttools/+/450777
 * https://codereview.qt-project.org/q/QSharedPointer
2023-10-04 18:36:20 -04:00
Ryan Foster
3d05d681b7 UI: Use C++11 ranged-for instead of Q_FOREACH
Qt has been porting uses of Q_FOREACH/foreach to C++11's ranged-for.
Let's do the same.

References:
 * https://doc.qt.io/qt-6/foreach-keyword.html
 * https://codereview.qt-project.org/q/Q_FOREACH
2023-10-04 17:58:02 -04:00
Ryan Foster
0866688953 obs-qsv11: Use translatable strings for target usage
For Target Usage, instead of doing string comparisons against long
descriptive strings, use translatable strings for descriptive UI text
and simple designations for values used for comparisons and storage.
This is similar to what we do for NVENC Presets.
2023-10-04 16:22:24 -04:00
Ryan Foster
9b1d6032e3 obs-qsv11: Remove D3D9 fallback
On Windows 10 and up, D3D11 should never fail, so the D3D9 code should
no longer be possible to hit. As far as I can tell, this code was mostly
for Windows 7/8/8.1 and it was part of the initial implementation. It
should no longer be needed.
2023-10-04 15:24:56 -04:00
Ryan Foster
53dee8f990 obs-qsv11: Remove D3D9 allocator
On Windows 10 and up, D3D11 should never fail, so the D3D9 code should
no longer be possible to hit and should no longer be needed.

Revert "obs-qsv11: Use d3d9 allocator on Win7"

This reverts commit b276b1633e.
2023-10-04 15:24:56 -04:00
derrod
5dda04ad5e Revert "UI: Add workaround for Qt tooltip stylesheet bug"
No longer required as this was fixed in Qt 6.5.3.

This reverts commit d97950445e.
2023-09-29 18:00:04 +02:00
Kurt Kartaltepe
9d4b916248 obs-qsv11: Redo session data releasing for Linux
This reverts the changes to Windows where Release() was called every
time, since we need share a single DX context across multiple encoders.

Instead introduce a ReleaseSessionData() function and some platform
specific session data that will be passed to it. We use this to track
the VA-API display and fd to release them at the right time. Leaking
displays will also lead to cache pollution in the intel-media-driver
crashing users so we cannot do that.

fixes #9611
2023-09-29 11:56:53 -04:00
Ryan Foster
97b404fda0 CI: Update deps to 2023-09-28 release
Notable changes:
 * deps.ffmpeg: Fix libdatachannel packaging for macOS
 * deps.qt: Update Qt6 to 6.5.3 for Windows
 * deps.qt: Update Qt6 to 6.5.3 for macOS
2023-09-29 11:10:27 -04:00
gxalpha
23bfb625ce mac-capture: Don't crash when migrating unknown display IDs
The current code assumes that a display UUID can be created with the
stored ID, but that's not always the case, e.g. when the user doesn't
have the display connected. As such, we need to null check this, and
fall back to the invalid ID (0) when the ID cannot be migrated.

The current code also only migrates on source creation, which yields
weird behaviour where if the user opens properties and then cancels it
would still show the first display, but only for the session. This is
why the code was factored out of the creation function and now is always
used when an ID needs to be acquired from OBS Data settings, including
when the source is updated.
2023-09-28 14:25:55 -04:00
Matt Gajownik
857c42aaba obs-browser: Fix invalid comparison of integer types 2023-09-28 23:00:48 +10:00
Matt Gajownik
22cef2b8c4 obs-browser: Update version to 2.22.1
fc57db4 - More consistently return JSON types in browser client
8407dcc - Use CefParseJSON instead of V8 context for JS responses
2023-09-28 21:04:29 +10:00
PatTheMav
b3949e6aef cmake: Update qrcodegen finder to match target names of CMake package
qrcodegen is built on obs-deps for macOS and Windows, with the
generated CMake package calling the dependency qrcodegen (not
libqrcoden) and associated target qrcodegen::qrcodegen.

This change updates the finder (required for Linux) to create the same
targets so consumers do not need to differentiate between different
variations of the same dependency on Linux.

Also updates obs-websocket to 5.3.1 to bring in associated CMake
changes.
2023-09-27 18:05:02 -04:00
PatTheMav
aaca2b6e73 libobs: Fix duplicate symbol resolution for obs plugins
By default duplicate non-static symbols loaded by dynamic libraries are
de-duplicated by the dynamic library loader. This can lead to issues
with statically linked libraries inside obs plugins if the symbols
share their signature: Whichever plugin is loaded first gets to "set"
the symbol (which can become problematic especially for C++ template
functions).

Using RTLD_LOCAL ensures that all symbols are hidden and can only be
explicitly loaded using dlsym() which avoids this issue.

Unfortunately due to the way scripting works in obs-studio, Python
still needs to be loaded with RTLD_GLOBAL, hence the branch in the fix.
2023-09-23 16:31:14 -07:00
Sean DuBois
2308414bcc obs-webrtc: Move libdatachannel code to C++ from C
libdatachannel is now built with MSVC instead of MinGW so we are able to
use C++ API instead.

The C++ is preferred by upstream and what the project is written in. The
C API provides a subset of features and has a performance penalty.
2023-09-19 15:03:11 -04:00
Neal Gompa
63f3b0d46c obs-qsv11: Add license declaration file 2023-09-19 13:35:49 -04:00
Neal Gompa
dc50e11bc6 decklink: Add license declaration files 2023-09-19 13:35:49 -04:00
Neal Gompa
491d7c0e98 libobs: Add license declaration files 2023-09-19 13:35:49 -04:00
Neal Gompa
bc14a25b15 deps: Add license declaration files 2023-09-19 13:35:49 -04:00
Ryan Foster
2e76e54bd3 CI: Update deps to 2023-09-18 release
Notable changes:
 * deps.ffmpeg: Apply fixups for libdatachannel
 * deps.macos: Update qrcodengen CMake project to fix CMake packages
 * deps.windows: Update qrcodengen CMake project to fix CMake packages
 * deps.windows: Add qrcodegencpp debug build
 * deps.windows: Update FreeType to 2.13.1 to align with macOS version
2023-09-18 19:09:26 -04:00
Ryan Foster
03b70f0672 obs-qsv11: Fix unusual CBR bitrate issues
For some reason, using MFX_SCENARIO_GAME_STREAMING causes the keyframe
quants to be higher than other frames, which is not desirable. In turn,
this causes bitrate to be higher than the target bitrate for a sustained
period of time after each keyframe.

Not setting the scenario removes this behavior and returns CBR to
somewhat reasonable levels of consistency.

Co-authored by: Chris (Flaeri) <flaeri@otterbro.com>
2023-09-18 13:04:04 -04:00
derrod
62500b5129 libobs: Do not skip async frames unless one has been selected 2023-09-16 22:19:07 -07:00
tytan652
7a695dd634 Add Qt UI form spacing in editorconfig 2023-09-16 16:16:43 -07:00
tytan652
46fc409843 UI: Fix IP settings order 2023-09-16 16:16:43 -07:00
gxalpha
e46c68726e obs-qsv11: Fix target usage migration string comparisons
Fixes problems with the astrcmpi logic, as well as a typo that said
"vertfast" instead "veryfast".
Also makes the method a void because it always returns true and isn't
checked anyways.
2023-09-16 14:33:09 -07:00
Lain
107416193c win-wasapi: Fix arithmetic for WAVEFORMATEX::cbSize
This arithmetic used the incorrect size for WAVEFORMATEX::cbSize, which
is supposed to be sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX).
2023-09-15 10:14:10 -07:00
Richard Stanway
c71bbcf4d9 UI: Avoid using newlines in error messages
Some errors include HTML links directing users to e.g. driver updates
or further information. Using a raw newline instead of <br> causes Qt to
skip parsing the HTML, resulting in an ugly mess of HTML displayed to
the user instead of the intended links.
2023-09-12 17:54:42 -07:00
gxalpha
839461dc9b UI: Don't show native popup for YouTube auth message box
The native popup has the problem that it doesn't work for links, leaving
us with an unclickable text where a link should be. Qt 6.6 has an option
to disable the native dialog, so let's add this to make the link
clickable again.

Co-authored-by: derrod <dennis@obsproject.com>
2023-09-11 10:07:16 -07:00
Richard Stanway
e5472c775c UI: Standardize spelling of closable, fix typo 2023-09-11 09:56:27 -07:00
Richard Stanway
d8bf21de2f UI: Add cleanup of stats callback on window close
Moving the cleanup to OBS_FRONTEND_EVENT_EXIT in #8735 only handled the
cleanup from the dockable window, as the regular stats window is deleted
on close when the UI is shut down. This caused an event handler leak
each time the window is manually closed, resulting in crashes. This code
looks a bit wrong since we delete the same handler in multiple places,
but this is due to the code being used by both the dock (non-closable)
and the window (closable). The OBS_FRONTEND_EVENT_EXIT handler handles
cleanup from the dockable stats window, and the window close handler now
handles cleanup from the non-dockable stats window.
2023-09-11 09:19:54 -07:00
PatTheMav
9f3f07dd56 CI: Fix Steam prerelease detection for releases 2023-09-10 07:02:45 +02:00
PatTheMav
00d6f0b26e cmake: Fix regular expression for beta and RC version detection 2023-09-10 10:12:13 +10:00
gxalpha
af7d8482e5 UI: Remove unused ExpandCheckBox
ExpandCheckBox was introduced in 88b6c63, but the seemingly replaced by
SourceTreeSubItemCheckBox during development. This means that it became
completely unused.
2023-09-09 09:38:42 -07:00
PatTheMav
af2136d51c
CI: Fix condition for annotations in nightly runs 2023-09-08 23:46:31 +02:00
Laurin Müller
3ac08303b5 rtmp-services: Rebranding Utreon to Playeur 2023-09-07 15:58:43 -07:00
Norihiro Kamae
2036de8ec3 libobs: Fix obs_output_video and obs_output_audio for encoded output
The API `obs_output_video` and `obs_output_audio` returned valid
pointers until the commit fb57eff21 and 645e31fa1.
The API `obs_output_video` is used by some plugins such as obs-websocket
and obs-midi to calculate the duration of streaming and recording.
To have a similar behavior, return the media (video and audio,
respectively) from the encoder.
2023-09-06 23:36:06 -07:00
derrod
eb89f7c3ab UI: Create/Delete YouTube Dock when switching profiles 2023-09-06 21:50:12 -07:00