3265 Commits
Author SHA1 Message Date
Translation UpdaterandRyan Foster 0820baaf50 Update translations from Crowdin
(cherry picked from commit f674d17168)
2023-12-05 18:53:38 -05:00
derrodandRyan Foster 08052b340e updater: Clear shader cache after updating
(cherry picked from commit cfd8d4c993)
2023-12-04 15:17:54 -05:00
derrodandRyan Foster 28d9f92f82 UI: Disable safe mode when --multi is used
(cherry picked from commit ba25bc65c9)
2023-12-04 15:17:54 -05:00
derrodandLain c523f11bcd UI: cancel session end request on commitDataRequest() signal 2023-12-02 17:29:44 -06:00
田七不甜andLain fa2719b0b1 UI: Fix UseStreamKeyAdv not display stream key and not hide button
(cherry picked from commit 5f512d5f25)
2023-11-08 22:35:58 -06:00
Ryan FosterandLain 0b56e8a323 UI: Fix typo in Virtual Camera logging functions
cvam -> vcam

(cherry picked from commit c0ee1e718d)
2023-11-08 22:35:58 -06:00
PenwywernandLain 2701144d30 UI: Log Virtual Camera output type
(cherry picked from commit a49b35c3de)
2023-11-08 22:35:58 -06:00
Zulleyy3 Zulleyy3andLain 0427bbf265 UI: Fix transform of sources in groups
Group resize is not deferred until adjustments are completed by a
mouseReleaseEvent in certain cases, resulting in unexpected movement of
sources that are part of a group as they are resized or stretched
beyond group bounds.

The bug can be described/reproduced as follow:

1. The user selects within a group in the sources dock
2. The user moves their mouse over the selected source such that the
   cursor would change.
   - This results in a cursor update and a call to GetStrechHandle()
   - as the source is part of a group, stretchGroup will be set to the
    group of the source

3. The user clicks on the canvas without touching a stretch/rotation
   handle
   - A mouseReleaseEvent is fired
   - obs_sceneitem_defer_group_resize_end is called on the group as
     stretchGroup is still defined from earlier
   - the defer_group_resize member of the group will become negative
   - The deferal check in resize_group (obs-scene.c) will always pass
     now
4. When scaling or rotating the source close to the group bounds, the
   group bounds will now dynamically update causing the source in to fly
   off the canvas.

Resolves: https://github.com/obsproject/obs-studio/issues/9754
(cherry picked from commit c76760bc1c)
2023-11-08 22:35:58 -06:00
PenwywernandRyan Foster a728de8444 UI: Fix AMF AV1 simple recording presets
(cherry picked from commit 1a88cdb00d)
2023-10-28 16:14:25 -04:00
Ryan Foster b1aff52ef9 UI: Remove iCCP data from PNGs
Loading these PNGs in libpng 1.6+ results in the warning:
libpng warning: iCCP: known incorrect sRGB profile

This is probably caused by saving an ICC Profile with the program used
to make the image, and that ICC Profile is considered invalid by libpng.

Removing the iCCP data resolves this.

(cherry picked from commit b4c36c0530)
2023-10-28 16:14:25 -04:00
jpark37andRyan Foster 16137fb346 decklink-output-ui: Decouple DeckLink output state
Didn't realize OBS could output both program and preview views at the
same time with multiple devices.

Also remove render callbacks earlier on stop to avoid use-after-free.

(cherry picked from commit 6aaf0358ca)
2023-10-26 16:24:51 -04:00
RodneyandRyan Foster 9f6f9109d9 UI: Add missing NULL check for skipUpdateVer
(cherry picked from commit 5ebd3ee6d3)
2023-10-26 16:24:51 -04:00
Norihiro KamaeandRyan Foster a78c88dd8a frontend-tools: Remove unused startAtLaunch variable
(cherry picked from commit 20b8deba2d)
2023-10-26 16:24:51 -04:00
gxalphaandRyan Foster 5c9cf1fba1 UI: Convert QTStr macro to inline function
Using inline functions improves IDE integration and avoids potential
pitfalls of that using macros has.

(cherry picked from commit 44f3f79296)
2023-10-26 16:24:51 -04:00
Paul HindtandRyan Foster 6a09698cdc UI: Fix compile error due to use of strlen in constexpr
(cherry picked from commit d8f533538f)
2023-10-26 16:24:51 -04:00
Translation UpdaterandRyan Foster 5dfc8d49f0 Update translations from Crowdin
(cherry picked from commit 0d450a34a0)
2023-10-26 16:24:51 -04:00
gxalphaandLain baa78b36ef UI: Enable "Paste Filters" after copying from scenes or mixer
Fixes an issue where if no filters had previously been copied and the
user copies a filter from either the scene tree or the audio mixer, the
"Paste Filters" action would not be available until the Edit menu
reloads (e.g., by selecting another source in the source tree).
2023-10-08 10:59:00 -06:00
PatTheMavandRodney 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
derrodandLain e4587ae9bd UI: Cleanup remaining uses of old version macros 2023-10-06 17:21:51 -06:00
derrodandLain 9f37258298 UI: Refactor Windows update check to always use LIBOBS_API_VER 2023-10-06 17:21:51 -06:00
derrodandLain d78a05e124 cmake: Fix OBS_COMMIT not being set (Windows only) 2023-10-06 17:21:51 -06: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
derrodandRodney 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
tytan652andLain 46fc409843 UI: Fix IP settings order 2023-09-16 16:16:43 -07:00
Richard StanwayandLain 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
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 StanwayandLain e5472c775c UI: Standardize spelling of closable, fix typo 2023-09-11 09:56:27 -07:00
Richard StanwayandLain 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
gxalphaandLain 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
derrodandLain eb89f7c3ab UI: Create/Delete YouTube Dock when switching profiles 2023-09-06 21:50:12 -07:00
gxalphaandLain 3ff7cd5625 UI: Untangle ifdef'd if-statement to un-confuse Xcode
Like many IDEs, Xcode has this feature where it shows the declaration of
the method currently being worked in. However it gets confused by scopes
starting inside of preprocessor guards and ending outside them,
resulting in the declaration of OBSBasic::ReceivedIntroJson always being
shown in window-basic-main.cpp from that method downwards. We can work
around that by starting and ending the if-scope outside of the ifdefs.
2023-09-06 21:48:52 -07:00
Ryan Foster 3239e2a1f2 UI: Restrict regex pattern for OAuth secrets
The current regex pattern will successfully match if the cache variable
contains the pattern anywhere inside the string. Let's restrict the
regex pattern such that it requires the pattern to be precisely between
the beginning and end of the string with no other characters in between
those anchor points.
2023-09-06 15:06:59 -04:00
derrodandRyan Foster d97950445e UI: Add workaround for Qt tooltip stylesheet bug 2023-09-06 13:08:37 -04:00
derrodandRyan Foster 391eb5fac5 UI: Fix settings Apply button always being enabled 2023-09-06 12:29:25 -04:00
derrodandRyan Foster aed8e2384d updater: Remove non-error logging from multithreaded code 2023-09-05 15:02:41 -04:00
derrodandRyan Foster ef45248e40 UI: Fix ifdef for YouTube dock integration 2023-09-05 12:06:46 -04:00
joelgerardandRyan Foster 83c4f5383e UI: Increase YouTube API timeout
The OBS client side timeout for the YouTube API is too short. New
changes proposed to the YouTube API will cause this to fail for
creating a broadcast. Increase to a minimum of 60.
2023-09-05 10:06:18 -04:00
Lain 112adb0a73 UI: Fix stream key UI not showing when using stream key
In the settings window, when the user chooses to use a stream key
instead of connecting their account, it switches widgets to show the
stream key UI. However, when opening the settings window again after
having done that, it's supposed to continue to show the stream key UI,
and that functionality was broken by obsproject/obs-studio#9272. It did
this because OBSBasicSettings::ServiceChanged() no longer called
reset_service_ui_fields() because the lastService member variable was no
longer set to empty in OBSBasicSettings::LoadStream1Settings().

This fixes it by just adding a parameter to
OBSBasicSettings::ServiceChanged() to make it forcibly reset the fields
when loading stream settings.
2023-08-31 23:39:26 -07:00
derrodandRodney 632f40c4d5 UI: Fix source enumeration in source select aborting prematurely
Hidden sources should be ignored, but the enumeration should continue.
2023-08-28 22:39:53 +02:00
derrodandLain 028b3c12cf updater: Static analysis cleanups 2023-08-26 16:53:14 -07:00
Norihiro KamaeandLain 1476033684 UI: Remove unused static functions
The function convert_14_2_encoder_setting was replaced by
convert_28_1_encoder_setting.
2023-08-26 16:52:35 -07:00
Ryan FosterandLain ece8df2ace UI: Increase minimum output resolution to 32x32
Some hardware encoders fail in indecipherable ways if you try to at
certain low resolutions such as 17x17 or 19x19, but works at 20x20.
However, there is no good way to determine what the minimum working
resolution is for every possible encoder. There isn't that much
difference between 8x8 and 32x32, except that the latter will reduce or
eliminate such odd failure cases, so let's increase the minimum required
output resolution by just a little bit.
2023-08-26 16:32:24 -07:00
田七不甜andLain 2dbd7bf7ff UI: Add stream key tooltip in the auto-config wizard 2023-08-26 16:15:11 -07:00
田七不甜andLain 01ecdd989c UI: Fix stream key tooltip in the settings page 2023-08-26 16:15:11 -07:00
08f5a7bd4d UI: Fix crash in YoutubeAuth
YoutubeAuth::chat is a raw pointer that is uninitialized. Most of the
time it doesn't matter, since the object it points to is created at the
application start. However, in case of Wayland (Linux), CEF is not
initialized (because it's not supported) and the chat object will never
get created.

This patch fixes crash on Wayland by initializing `chat` to `nullptr`.

Co-authored-by: Roman Podoliaka <roman.podoliaka@gmail.com>
2023-08-25 19:10:06 -04:00
Norihiro KamaeandRyan Foster cdced774e8 Revert "UI: Support DnD overlay in linuxbrowser"
This reverts commit aeed4a3aa1.
The source type `browser_source` is now available for all supported
platforms so we don't need to fallback to `linuxbrowser-source`.
2023-08-24 15:20:36 -04:00
tytan652andRyan Foster a4bef329c2 UI: Replace remaining enc-amf reference
Since enc-amf was removed, this reference causes issue by flagging H264
AMF as unsupported forcing a fallback to x264.
2023-08-22 14:24:46 -04:00
cg2121andGeorges Basile Stavracas Neto b19f922747 UI: Fix alignment of status bar message
The status bar message was not vertically aligned properly to
other widgets in the status bar. We have to implement our own
message system here, as the default status bar in Qt has hardcoded
paddings.
2023-08-21 17:46:25 -03:00
cg2121andGeorges Basile Stavracas Neto 610990270f UI: Center vertical volume control buttons
The mute and config buttons were not vertically centered.
2023-08-21 17:38:31 -03:00