Skip to content

Conversation

@avoitenko-logitech
Copy link

No description provided.

WizardCM and others added 30 commits July 30, 2024 08:55
At some point between 5563 and 5938, the parameter's type changed.
This allows compiling OBS Browser with Chromium 124-based CEF versions.

This also enables basic support for the new, official, shared texture
API, purely because building without it would be *more* difficult.

Sources:
 - https://bitbucket.org/chromiumembedded/cef/commits/260dd0ca2
Chromium 128 removes the `persist_user_preferences` setting entirely.

Chrome runtime is used by default, so to disable 'Cast..' and more,
explicitly use the Alloy runtime.

DevTools popups can no longer be windowless.
This fix addresses an issue occurring on some pages where the response header includes
`content-security-policy: require-trusted-types-for 'script'`.
This fixes issues cause by building CEF with use_gtk=true which is the default.
Forcing CEF to use the right Ozone platform allows to avoid having a
dependency on XWayland (a X11 socket) under Wayland.
Temporary solution to allow a CEF upgrade.
Ideally we should track open docks & count `OnBeforeClose` calls.
Need >= 3.11 for *_WITH_DEFAULT macros
Turns out the reason our Dev Tools windows have a blank title when not
wrapped in a custom window is due to older code that performed an early
return on Title Change.

This moves the setting of the window title to the correct location.
Apparently, the find_package signature is incorrect. The [version]
component must come before the [REQUIRED] component. I mistakenly placed
them in the reverse order when originally adding the minimum version.

https://cmake.org/cmake/help/v3.28/command/find_package.html#basic-signature
Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
This is so we can update clang-format to 17 or newer.

Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
Also port clang-format settings from obs-studio. Use these settings for
consistency with obs-studio code style.
The original solution works fine when not using the Qt event loop,
however any method of waiting with the Qt event loop causes all
CEF events to go on hold too, resulting in a hang or crash.

Instead, wait for CEF to announce it's ready, then delete the widget.
Chromium 117 and above uses Windows.Gaming.Input, which states
> A Windows application must have focus to receive input from a controller.

This is not useful, as users will have the game focused, not OBS.

https://issues.chromium.org/issues/392661398
https://chromiumdash.appspot.com/commit/aeb76145fe766a359f2e2b7432c207cc135113b6
WizardCM and others added 27 commits February 7, 2025 15:40
CEF provides no method to reroute logging, but without FATAL logging
it is impossible to track down some crashes.
So it turns out CefInitialize is a boolean return... Anyway, let's log
failures so that we can at least begin to track them down. This change
also returns early, but that does not make any of what we're doing any
safer. Returning early currently only has the effect of safely
disabling browser panels.

More work should be done to fully lock out the plugin if CefInitialize
fails. Such behavior is required according to the CEF documentation.

See the CEF cef_resultcode_t enum for the definition of the exit codes.
If the `manager_thread` exits early, there will be no message loop to
post the task to, and a permanent deadlock would occur. Rather than
guaranteeing a deadlock, this at least lowers the odds of one.

A future implementation might be more aware of the run state of the
manager thread and handle these exit scenarios more explicitly.
Testers have reported that CEF and NVIDIA driver does not seem to work
well together.
OnBeforePopup gained a popup_id. No other changes required.
The cef_version_info function was moved out into its own file in 6943
in preparation for official CEF API versioning.
https://bitbucket.org/chromiumembedded/cef/wiki/ApiVersioning

Additionally, a new VType was added on non-Windows platforms, and
while it'll never be returned the build will error if it's unhandled.
Fixes audio distortion when using the "Control audio via OBS" setting.

According to the SetProcessInformation API documentation:
"By default in Windows 11 if a window owning process becomes fully occluded,
minimized, or otherwise non-visible to the end user, and non-audible,
Windows may automatically ignore the timer resolution request and thus does
not guarantee a higher resolution than the default system resolution."

Opt out of this behavior.

Fixes obsproject#406
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.