0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00
OBS Studio - Free and open source software for live streaming and screen recording
Go to file
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
.github CI: Fix Steam prerelease detection for releases 2023-09-10 07:02:45 +02:00
additional_install_files Improve additional_install_files for debug/release 2014-07-18 22:41:11 -07:00
build-aux build-aux,CI: Bump Flatpak KDE Runtime to 6.5 2023-09-05 13:14:28 -04:00
CI CI: Delete legacy build and formatting check scripts 2023-07-17 20:10:12 +02:00
cmake cmake/libobs: Only set beta/rc increment 2023-10-06 17:21:51 -06:00
deps deps: Add license declaration files 2023-09-19 13:35:49 -04:00
docs/sphinx docs: Clarify strlist_split 2023-08-27 09:55:36 +10:00
libobs libobs: Use same ver. in obs-config.h for betas/RCs 2023-10-06 18:23:49 -06:00
libobs-d3d11 libobs: Add function to check fast clear capability 2023-07-29 16:34:47 -07:00
libobs-opengl libobs: Update CMake minimum to 3.22 2023-08-05 16:45:46 -07:00
libobs-winrt cmake: Add changes for CMake build framework 3.0 2023-06-29 10:11:32 -04:00
plugins linux-v4l2: Expand packed values to 4 bytes 2023-10-08 02:00:28 +02:00
test test-input: Update CMakeLists for updated CMake path 2023-07-06 18:26:28 +02:00
UI UI: Initialize YouTubeAppDock synchronously to fix Qt runloop issues 2023-10-08 02:00:38 +02:00
.cirrus.yml CI: Bump FreeBSD version to supported release: 13.2 2023-08-18 13:14:58 -04:00
.clang-format Update .clang-format rules for ObjC files for version 16 2023-08-10 17:12:30 -04:00
.cmake-format.json cmake: Add changes for CMake build framework 3.0 2023-03-26 18:20:38 -04:00
.editorconfig Add Qt UI form spacing in editorconfig 2023-09-16 16:16:43 -07:00
.git-blame-ignore-revs .git-blame-ignore-revs: Add clang-format 16 update 2023-08-10 19:12:26 -04:00
.gitattributes CI: Add Crowdin Synchronization 2021-11-25 20:59:11 +11:00
.gitignore CI: Add zsh-based build framework files for macOS 2023-07-17 19:49:18 +02:00
.gitmodules cmake,plugins,build-aux: Remove enc-amf 2023-07-22 18:06:26 -07:00
.mailmap Update copyrights/names 2023-05-20 01:31:18 -07:00
.swift-format cmake: Add Xcode component to CMake build framework 3.0 2023-03-26 18:20:38 -04:00
AUTHORS Update translations from Crowdin 2023-08-13 14:09:15 +00:00
buildspec.json CI: Update deps to 2023-09-28 release 2023-09-29 11:10:27 -04:00
CMakeLists.txt cmake: Update CMake minimum to 3.22 2023-08-05 16:45:46 -07:00
CMakePresets.json cmake: Remove Qt version selection and Qt 5 support 2023-07-19 11:56:54 -04:00
COC.rst Revert "docs: Rename Code of Conduct to fix GitHub detection" 2021-08-07 20:40:29 +10:00
COMMITMENT Add GPL Cooperation Commitment to base directory 2019-01-24 02:02:49 -05:00
CONTRIBUTING.rst CONTRIBUTING.rst: Update Crowdin guide url 2023-05-27 16:23:49 -07:00
COPYING COPYING: Use license file from gnu.org 2021-10-24 00:35:27 -07:00
INSTALL Update INSTALL 2018-07-14 08:21:00 +01:00
README.rst README.rst: Fix GitHub Actions status badge target link 2023-07-18 11:38:17 -04:00

OBS Studio <https://obsproject.com>
===================================

.. image:: https://github.com/obsproject/obs-studio/actions/workflows/push.yaml/badge.svg?branch=master
   :alt: OBS Studio Build Status - GitHub Actions
   :target: https://github.com/obsproject/obs-studio/actions/workflows/push.yaml?query=branch%3Amaster

.. image:: https://badges.crowdin.net/obs-studio/localized.svg
   :alt: OBS Studio Translation Project Progress
   :target: https://crowdin.com/project/obs-studio

.. image:: https://img.shields.io/discord/348973006581923840.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2
   :alt: OBS Studio Discord Server
   :target: https://obsproject.com/discord

What is OBS Studio?
-------------------

OBS Studio is software designed for capturing, compositing, encoding,
recording, and streaming video content, efficiently.

It's distributed under the GNU General Public License v2 (or any later
version) - see the accompanying COPYING file for more details.

Quick Links
-----------

- Website: https://obsproject.com

- Help/Documentation/Guides: https://github.com/obsproject/obs-studio/wiki

- Forums: https://obsproject.com/forum/

- Build Instructions: https://github.com/obsproject/obs-studio/wiki/Install-Instructions

- Developer/API Documentation: https://obsproject.com/docs

- Donating/backing/sponsoring: https://obsproject.com/contribute

- Bug Tracker: https://github.com/obsproject/obs-studio/issues

Contributing
------------

- If you would like to help fund or sponsor the project, you can do so
  via `Patreon <https://www.patreon.com/obsproject>`_, `OpenCollective
  <https://opencollective.com/obsproject>`_, or `PayPal
  <https://www.paypal.me/obsproject>`_.  See our `contribute page
  <https://obsproject.com/contribute>`_ for more information.

- If you wish to contribute code to the project, please make sure to
  read the coding and commit guidelines:
  https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.rst

- Developer/API documentation can be found here:
  https://obsproject.com/docs

- If you wish to contribute translations, do not submit pull requests.
  Instead, please use Crowdin.  For more information read this page:
  https://obsproject.com/wiki/How-To-Contribute-Translations-For-OBS

- Other ways to contribute are by helping people out with support on
  our forums or in our community chat.  Please limit support to topics
  you fully understand -- bad advice is worse than no advice.  When it
  comes to something that you don't fully know or understand, please
  defer to the official help or official channels.