obs-studio/UI
Lain cececf4e55 UI: Wait for full vcam deactivation to destroy its view
A bug which was technically introduced in df446c3f6e: the author
assigned video mixes to the virtual camera and did not realize you have
to wait for full capture stop with the "deactivate" signal rather than
the "stop" signal. This situation is understandable because these
signals are likely confusing and need more documentation.

The way an output works when it stops is it has three stages:
- "stopping", which is the moment the user themselves stop the output
- "stop", when the output's implementation has stopped and returns
  success or an error code
- "deactivate", when the output inself (not the implementation) has
  fully stopped capturing encoded or raw frame data after the
  implementation has stopped. This is done in a separate thread,
  end_data_capture_thread(), for performance and data race reasons, and
  is when it's "actually fully stopped for real this time"

(Lain note: I sincerely apologize for this confusing signal design)

The author of df446c3f6e was likely confused as to why they could not
destroy the video mix in the "stop" signal without triggering a race
condition in end_data_capture_thread(), and instead decided to make a
workaround to clear the video mix set to the output before destroying
the video mix. Unsetting the video mix I'm guessing *seemed* to fix the
problem for them at the time, and destroying the video mix separately
after that automatically stops capture, so it *technically* worked
because the deactivate thread cannot be called until the
implementation's stop signal has executed. However, it was still the
incorrect way to handle the problem, because it circumvents the output's
mechanism for deactivating the frame data capture by destroying the view
instead.

The reason this was the incorrect way to handle the problem became
exposed in 7cd7ca80f8, when tytan made it so it uses the main video mix
under certain circumstances. The main view is special and cannot be
destroyed, so the mechanism to stop frame data capture that the
virtualcam was using before failed, and raw frame data capture continued
perpetually until the end of the program erroneously.

This fix solves the bug by using the "deactivate" signal rather than the
"stop" signal, thus allowing the output to fully end its data capture
and *then* destroy the video mix.

Fixes obsproject/obs-studio#9153
2023-07-06 15:37:28 -07:00
..
cmake cmake: Add support for unobfuscated OAuth secrets 2023-06-30 12:22:42 -04:00
data UI: Change surround sound warning to signal YouTube support 2023-06-24 17:11:01 -07:00
forms UI: Fix icon paths of transition buttons 2023-06-25 09:25:36 +10:00
frontend-plugins cmake: Update Framework link definition for macOS builds 2023-06-17 12:23:33 -04:00
importers UI: Remove UNUSED_PARAMETER where unnecessary 2023-04-01 16:54:02 -07:00
obs-frontend-api obs-frontend-api,UI,docs: Add API to add custom docks with no toggle 2023-06-03 16:47:01 -07:00
update UI: Fix utf-8 paths in shared updater components 2023-07-02 05:09:17 +02:00
win-update/updater cmake: Add changes for CMake build framework 3.0 2023-06-29 10:11:32 -04:00
xdg-data build-aux,CI: Split Flatpak manifest in multiple files 2023-05-13 18:26:17 -07:00
adv-audio-control.cpp UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
adv-audio-control.hpp UI: Fix typo with SetSourceName function 2022-07-10 14:00:35 +10:00
api-interface.cpp obs-frontend-api,UI,docs: Add API to add custom docks with no toggle 2023-06-03 16:47:01 -07:00
audio-encoders.cpp UI: Fix advanced audio encoder bitrate always set to 192 2023-04-23 23:47:32 -07:00
audio-encoders.hpp UI: Add Opus bitrate map and per encoder bitrate list 2023-03-19 17:27:43 +01:00
auth-base.cpp UI: Rework YouTube broadcast setup flow 2021-09-12 13:45:51 +02:00
auth-base.hpp UI: Rework YouTube broadcast setup flow 2021-09-12 13:45:51 +02:00
auth-listener.cpp UI: Fix AuthListener error HTTP response body 2021-09-16 15:03:28 +02:00
auth-listener.hpp UI: Properly verify state parameter for YouTube auth 2021-09-15 06:16:29 -07:00
auth-oauth.cpp UI: Fix crash on macOS when closing OAUTH browser panel 2023-05-08 18:22:27 -04:00
auth-oauth.hpp UI: Fix crash on macOS when closing OAUTH browser panel 2023-05-08 18:22:27 -04:00
auth-restream.cpp UI: Avoid registering CEF OAuth integrations on Wayland 2023-05-07 13:51:52 -07:00
auth-restream.hpp UI: Refactor integration and browser docks 2023-03-17 20:21:08 +11:00
auth-twitch.cpp UI: Avoid registering CEF OAuth integrations on Wayland 2023-05-07 13:51:52 -07:00
auth-twitch.hpp UI: Refactor integration and browser docks 2023-03-17 20:21:08 +11:00
auth-youtube.cpp UI: Refactor integration and browser docks 2023-03-17 20:21:08 +11:00
auth-youtube.hpp UI: Refactor integration and browser docks 2023-03-17 20:21:08 +11:00
balance-slider.hpp UI: Add ability to reset sliders when double clicked 2018-09-07 09:27:20 -05:00
clickable-label.hpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
CMakeLists.txt cmake: Add changes for CMake build framework 3.0 2023-06-29 10:11:32 -04:00
context-bar-controls.cpp UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
context-bar-controls.hpp UI: Add application audio capture to toolbar 2022-07-23 17:41:34 -07:00
display-helpers.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
double-slider.cpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
double-slider.hpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
expand-checkbox.hpp UI, libobs, text-freetype2: Add missing pragma once in header files 2019-04-01 02:48:28 -05:00
focus-list.cpp UI: Add ability to reorder filters by drag & drop 2023-06-21 15:33:48 -07:00
focus-list.hpp UI: Add ability to reorder filters by drag & drop 2023-06-21 15:33:48 -07:00
horizontal-scroll-area.cpp UI: Add Vertical Mixer option 2018-05-19 00:17:58 -03:00
horizontal-scroll-area.hpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
hotkey-edit.cpp UI: Make hotkey edit layout margins symmetrical 2023-04-15 16:38:18 -07:00
hotkey-edit.hpp UI: Defer creation of hotkey dupe icon until needed 2023-02-25 15:21:29 -08:00
item-widget-helpers.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
item-widget-helpers.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
lineedit-autoresize.cpp UI: Don't hardcode margins in lineedit-autoresize 2022-08-06 10:22:25 +10:00
lineedit-autoresize.hpp UI: Add vertically expanding LineEdit Widget 2022-06-27 14:35:01 -04:00
locked-checkbox.cpp UI: Source Toolbar 2020-08-17 07:18:18 -07:00
locked-checkbox.hpp UI: Source Toolbar 2020-08-17 07:18:18 -07:00
log-viewer.cpp UI: Force fixed font in plain text edits 2022-08-22 17:26:50 -07:00
log-viewer.hpp UI: Create Log Viewer window XML file, migrate code 2022-04-10 11:52:11 +10:00
media-controls.cpp UI: Fix media controls shortcuts being global 2023-03-18 15:51:05 -07:00
media-controls.hpp UI, image-source: Add slide counter to slideshow toolbar 2022-11-20 03:07:27 -05:00
media-slider.cpp UI: Fix Qt 6 position deprecations 2022-07-22 09:37:17 -04:00
media-slider.hpp UI: Add eventFilter to media slider 2022-06-11 16:28:57 -07:00
menu-button.cpp UI: Fix Qt 6 position deprecations 2022-07-22 09:37:17 -04:00
menu-button.hpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
multiview.cpp UI: Remove number from multiview labels 2022-11-12 18:36:35 -05:00
multiview.hpp UI: Move multiview render into a new class 2022-07-10 13:45:43 +10:00
mute-checkbox.hpp UI: Add unassigned indicator and warning to mixer 2023-03-25 16:08:25 -07:00
obf.c clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
obf.h UI: Add obfuscation func 2019-02-07 14:47:15 -08:00
obs-app.cpp UI: Remove move_to_xdg 2023-06-09 04:51:10 -07:00
obs-app.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
obs-proxy-style.cpp UI: Use native combobox popup on macOS 2023-01-31 18:50:56 +01:00
obs-proxy-style.hpp UI: Use native combobox popup on macOS 2023-01-31 18:50:56 +01:00
obs.manifest UI: Remove unsupported Windows versions from manifest 2023-02-01 23:00:50 +01:00
obs.rc.in Update copyrights/names 2023-05-20 01:31:18 -07:00
plain-text-edit.cpp UI: Force fixed font in plain text edits 2022-08-22 17:26:50 -07:00
plain-text-edit.hpp UI: Force fixed font in plain text edits 2022-08-22 17:26:50 -07:00
platform-osx.mm clang-format: Update formatting of all ObjC and ObjC++ files 2023-06-11 14:56:45 +02:00
platform-windows.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
platform-x11.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
platform.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
properties-view.cpp UI: Don't create combobox for radio buttons in properties view 2023-06-10 16:13:57 -07:00
properties-view.hpp UI: Recalculate scroll position after resize 2023-04-05 21:26:10 +00:00
properties-view.moc.hpp UI: Fix missing includes 2020-04-08 17:20:52 -07:00
qt-display.cpp UI: Fix close display before native surfaces 2022-07-30 16:21:36 -07:00
qt-display.hpp UI: Close display before native surfaces 2022-05-28 16:54:37 -07:00
qt-wrappers.cpp UI: Add QDataStream opreators for OBSSource 2023-06-21 15:33:48 -07:00
qt-wrappers.hpp UI: Add QDataStream opreators for OBSSource 2023-06-21 15:33:48 -07:00
record-button.cpp UI: Don't try to make OBSBasic parent of ControlsSplitButton 2023-03-11 09:38:46 +11:00
record-button.hpp UI: Add Virtual Camera source selector dialog 2022-07-31 15:39:18 -07:00
remote-text.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
remote-text.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
scene-tree.cpp UI: Move saving of scene tree grid mode 2023-05-21 01:48:13 -07:00
scene-tree.hpp UI: Remove workaround for current scene being deselectable on Qt 6.4.3+ 2023-02-11 16:01:27 -08:00
screenshot-obj.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
slider-absoluteset-style.cpp UI: Use Qt::MiddleButton instead of deprecated Qt::MidButton 2020-12-01 10:54:21 -05:00
slider-absoluteset-style.hpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
slider-ignorewheel.cpp UI: Make T-Bar unclickable 2023-03-07 13:47:51 -05:00
slider-ignorewheel.hpp UI: Make T-Bar unclickable 2023-03-07 13:47:51 -05:00
source-label.cpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
source-label.hpp UI: Fix warnings for Qt 5.15 2020-06-21 18:23:05 -07:00
source-tree.cpp UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
source-tree.hpp UI: Fix source tree hovering being inconsistent 2022-08-30 18:49:23 +10:00
spinbox-ignorewheel.cpp UI: Rename UI files for consistency 2019-04-21 04:10:46 -07:00
spinbox-ignorewheel.hpp UI: Rename UI files for consistency 2019-04-21 04:10:46 -07:00
ui-config.h.in cmake: Add changes for CMake build framework 3.0 2023-03-26 18:20:38 -04:00
ui-validation.cpp UI: Use connect infos check in before stream check 2023-03-19 18:27:44 +01:00
ui-validation.hpp UI: Add Start Streaming settings check on start 2019-12-11 01:50:41 -08:00
undo-stack-obs.cpp UI: Optimize undo/redo functions with constant references 2022-01-19 21:39:43 +01:00
undo-stack-obs.hpp UI: Optimize undo/redo functions with constant references 2022-01-19 21:39:43 +01:00
url-push-button.cpp UI: Upgrade stream link hotlink to a button 2019-10-30 12:09:07 -07:00
url-push-button.hpp UI: Upgrade stream link hotlink to a button 2019-10-30 12:09:07 -07:00
vertical-scroll-area.cpp UI: Rename 'obs' dir to 'UI' 2016-08-27 20:19:45 -07:00
vertical-scroll-area.hpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
visibility-checkbox.cpp UI: Source Toolbar 2020-08-17 07:18:18 -07:00
visibility-checkbox.hpp UI: Source Toolbar 2020-08-17 07:18:18 -07:00
visibility-item-widget.cpp UI: Adjust list style of filters dialog 2022-08-02 09:27:00 -03:00
visibility-item-widget.hpp UI: Fix crash when pressing tab key in rename 2022-05-31 09:53:14 -04:00
volume-control.cpp UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
volume-control.hpp UI: Do not show unassigned icon for monitored sources 2023-05-05 17:38:34 -04:00
win-dll-blocklist.c UI: Relax mc_trans_video_imagescaler.dll DLL block 2023-05-03 19:16:18 -04:00
window-basic-about.cpp libobs: Use static library for version string information 2023-05-27 16:48:24 -07:00
window-basic-about.hpp UI: Add Patreon contributors to About dialog 2019-05-05 20:00:26 -07:00
window-basic-adv-audio.cpp UI: Cleanup advanced audio window 2022-06-18 23:13:13 +10:00
window-basic-adv-audio.hpp UI: Cleanup advanced audio window 2022-06-18 23:13:13 +10:00
window-basic-auto-config-test.cpp UI: Fix translation key 2023-03-25 18:29:07 -07:00
window-basic-auto-config.cpp UI: Add Apple Hardware Encoder to AutoConfig 2022-11-19 17:38:22 -05:00
window-basic-auto-config.hpp UI: Add Apple Hardware Encoder to AutoConfig 2022-11-19 17:38:22 -05:00
window-basic-filters.cpp UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
window-basic-filters.hpp UI: Add ability to reorder filters by drag & drop 2023-06-21 15:33:48 -07:00
window-basic-interaction.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-basic-interaction.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-basic-main-browser.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-basic-main-dropfiles.cpp UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
window-basic-main-icons.cpp libobs, UI: Add OBS_ICON_TYPE_PROCESS_AUDIO_OUTPUT 2022-07-23 17:41:34 -07:00
window-basic-main-outputs.cpp UI: Wait for full vcam deactivation to destroy its view 2023-07-06 15:37:28 -07:00
window-basic-main-outputs.hpp UI: Wait for full vcam deactivation to destroy its view 2023-07-06 15:37:28 -07:00
window-basic-main-profiles.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-basic-main-scene-collections.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-basic-main-screenshot.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-basic-main-transitions.cpp UI: Add logging of Program scene changes in studio mode 2023-06-30 14:14:31 -07:00
window-basic-main.cpp UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
window-basic-main.hpp UI: Change name of ResetProxyStyleSliders function 2023-06-10 16:06:16 -07:00
window-basic-preview.cpp UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
window-basic-preview.hpp UI: Limit preview scrolling 2023-03-11 15:22:23 -08:00
window-basic-properties.cpp UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
window-basic-properties.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-basic-settings-a11y.cpp UI: Use native color dialog on macOS 2023-02-19 04:10:51 +01:00
window-basic-settings-stream.cpp UI: Move WHIP service to the bottom of the visible list 2023-06-15 12:38:11 -04:00
window-basic-settings.cpp UI: Fix changed state of audio settings 2023-06-17 16:42:14 -07:00
window-basic-settings.hpp UI: Enable WHIP service in UI 2023-06-09 20:20:49 -05:00
window-basic-source-select.cpp UI: Disable Ok button in Add Source dialog if no source is selected 2023-06-17 16:46:05 -07:00
window-basic-source-select.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-basic-stats.cpp UI,libobs,libobs-opengl,obs-ffmpeg: Remove unneeded cast in switches 2023-01-16 11:52:26 +01:00
window-basic-stats.hpp UI: Fix stats widget appearance on Yami themes 2022-10-19 15:02:25 -04:00
window-basic-status-bar.cpp UI: Remove UNUSED_PARAMETER where unnecessary 2023-04-01 16:54:02 -07:00
window-basic-status-bar.hpp UI: Add status icons for recording and streaming 2020-04-16 19:15:13 +02:00
window-basic-transform.cpp UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
window-basic-transform.hpp UI: Connect Reset button in Transform dialog with main window directly 2023-02-18 15:19:21 -08:00
window-basic-vcam-config.cpp UI: Reuse StudioMode.Preview translation for virtual camera config 2023-06-17 16:43:44 -07:00
window-basic-vcam-config.hpp UI: Use main video on the virtual camera if program 2023-05-30 16:16:07 -07:00
window-basic-vcam.hpp UI: Use main video on the virtual camera if program 2023-05-30 16:16:07 -07:00
window-dock-browser.cpp UI: Check for null pointer 2019-09-19 05:39:25 -07:00
window-dock-browser.hpp UI: Make BrowserDock native 2021-01-26 09:43:16 -08:00
window-dock.cpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
window-dock.hpp UI: Warn when closing dock widgets for first time 2019-03-05 14:39:24 -08:00
window-extra-browsers.cpp UI: Refactor integration and browser docks 2023-03-17 20:21:08 +11:00
window-extra-browsers.hpp UI: Remove UUID from ExtraBrowsersModel 2022-03-22 22:24:23 -07:00
window-importer.cpp UI: Fix imported scene collection names duplicating 2021-04-20 00:17:34 -07:00
window-importer.hpp UI: Add advanced scene collection importer 2020-02-16 17:56:06 +13:00
window-log-reply.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-log-reply.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-main.hpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
window-missing-files.cpp UI: Re-raise missing files dialog on macOS after file is selected 2023-05-18 18:07:12 -04:00
window-missing-files.hpp UI: Add missing files dialog 2021-01-17 10:31:59 +13:00
window-namedialog.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-namedialog.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-permissions.cpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-permissions.hpp Update copyrights/names 2023-05-20 01:31:18 -07:00
window-projector.cpp UI: Fix crash when double-clicking projector 2023-05-13 16:38:09 -07:00
window-projector.hpp UI: Use weak source for projectors 2022-11-17 18:41:23 -05:00
window-remux.cpp UI: Remux mp4/mov to mp4/mov with suffix 2023-03-29 19:17:08 +00:00
window-remux.hpp UI: Declare missing overrides 2019-07-21 20:53:30 -07:00
window-youtube-actions.cpp UI: Use bilinear scaling for YT thumbnail 2023-03-08 18:41:20 -05:00
window-youtube-actions.hpp UI: Mark YouTube window showEvent as override 2022-06-01 19:43:03 -04:00
youtube-api-wrappers.cpp UI: Add SendChatMessage to YouTube API wrappers 2022-06-27 14:35:01 -04:00
youtube-api-wrappers.hpp UI: Add SendChatMessage to YouTube API wrappers 2022-06-27 14:35:01 -04:00