Currently, when adding a filter to a source and then right-clicking it
or using the menu bar edit menu, it's not possible to copy the source's
filters. This is because the edit menu does not update on filter
changes.
Listening to the new global filters add/remove signal and updating the
edit menu will enable the copy option if a filter get added or disable
the option if the last filter gets removed.
Copy-Pasting filters on a scene or on a source via the audio mixer
context menu would not add an undo/redo action. This commit factors the
undo/redo logic out into a generic paste filters function that can be
used for pasting filters everywhere.
As of 8dcfae9a39, indicating the base
style to the proxy is completely functional.
It also bypasses QT_STYLE_OVERRIDE and -style, but since the system
theme is no longer available on Linux this is a non-issue.
When clicking Grid Mode or List Mode from the context menu within the
Scenes list, whether or not Grid Mode is enabled persists between OBS
sessions. When clicking Grid or List from the View Menu, the setting
does not persist between OBS sessions. This seems to be a regression
from fc8c428521.
Previously, SceneTree's SetGridMode would set this config value. If the
intent is to not have SetGridMode directly set the config value, then
any function that calls SetGridMode other than the OBSBasic constructor
must instead set the config value.
The status bar doesn't currently own its references to outputs, which
can be a problem if streaming outputs are released soon after stream
stop. The Multitrack Video output does exactly that, so the status bar
will sometimes try to access an invalid pointer for updating its stats.
Keeping a weak reference around and upgrading it to collect stats,
similar to how the stats window behaves.
Currently, the spacing lines begin in the middle of the box and then are
their width wide towards one direction. This means that the larger they
are, the more off-center their middle is.
This commit changes them to start at half their width left/top of the
center and end half the width to the right/bottom of the center, putting
the middle in the center.
In 7931f2acb8 the classes have been
removed in favor of properties, but this styling change appears to have
been reverted by accident, likely by the theming overhaul.
In 22205d582c, the change to default to
Fragmented MP4/MOV on all platforms was reverted due to compatibility
issues with the default video player on Windows.
On macOS however, the default player (QuickTime Player) works fine with
fragmented formats, and instead is unable to play MKV files (which have
always been the default format for OBS). This change makes videos with
the default settings playable on macOS with the default player.
Currently, the paused indicator is never undone, instead relying on the
update timer to eventually erase it away when the recording duration is
updated. If the user spams pause fast enough, the indicator will stack
several times before it is erased - especially if the unpaused branch in
the update timer never has a chance to run.
Instead of mutating the recordTime text on pause and requiring an undo,
extract the UI update to a separate function which computes the full
text based on the current state. Call this function when pause is
toggled, thereby forcing an accurate UI update that either does or does
not incude the paused text.
An added benefit is that the paused indicator now disappears
immediately.
When this call was first introduced in eab10d48b2, it was at top of this
block, albeit after the calls to `pause`. Over time it has slowly
shifted lower and lower in the block.
In reality, it should be the first thing in the block to ensure that
further calls have accurate information about the pause state to update
themselves.
Support building AJA plugins with either the new libajantv2 library, or
the deprecated ntv2 library.
Finder scripts updated to search for libajantv2 and fall back to ntv2 if
not found. This allows this PR to be merged without requiring a
corresponding update to the pre-built obs-deps packages.
These comments do not actually match the color values here:
* (0xff, 0xff, 0xff) is white
* (0xcc, 0xcc, 0xcc) is light gray
Instead of just fixing the comments, use the values from the System
theme and also correct the comments.
QDialog::closeEvent() already calls the reject() function, the override
of the former function was actually allowing a first confirmation dialog
which once discarded gets re-openned by QDialog::closeEvent().
Removing most of the closeEvent() override code is enough to fix the issue
since reject() will be called showing the confirmation dialog.
Change size policy of "Start Virtual Camera" button to ensure the
minimum width of `Controls` panel is the same as "Start Virtual
Camera" button plus the gear (settings) icon, therefore to
eliminate text clipping when overflow.
This reverts commit 9488bb20b6.
This is currently a frequent support issue as Windows Media Player,
Movies & TV, and File Explorer all cannot seem to handle fMP4 files
correctly. Windows Media Player and Movies & TV will play the files
fine, but no duration is listed and the applications cannot seek the
file. File Explorer will simply not list the file's length/duration (the
field is shown as having no set value). This was somehow not caught
during a year's worth of beta and RC builds. The world just wasn't ready
for this. =(
We have reported these issues to Microsoft, and we will revisit this in
the future.
The Custom FFmpeg Output allows the user to configure it to output to a
URL instead of a file. In OBSBasic::StartRecording(), we unconditionally
call LowDiskSpace() to check for low disk space because we assume that a
"recording" will always be to disk. When os_get_free_disk_space() is
called on a non-existent path, it returns 0, which causes OBS to emit a
low disk space warning. Instead, only call DiskSpaceMessage() if not
"recording" to a URL.
The Auto-Configuration Wizard cannot progress when selecting a custom
service that does not require a stream key. Since we have no way to
validate if a custom service requires a stream key, we should just not
require a stream key is custom service is selected. To fix this, check
if a custom service has not been selected when checking if the stream
key is empty.
Co-authored-by: Ryan Foster <ryan@obsproject.com>
Unlike filesystem addresses, which are paths,
abstract addresses are blobs.
This means that the address wasn't "\0/com/obsproject 2413747 version",
but rather "\0/com/obsproject 2402613 version\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
this is reflected in both /proc/net/unix:
000000001bf56057: 00000002 00000000 00000000 0002 01 56719817
@/com/obsproject 2402613 version@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@
000000003e897b41: 00000002 00000000 00000000 0002 01 56730132
@/com/obsproject 2413747 version
and ss -l, extending the whole address column to the point of
unusability.
This size calculation follows trivially from the manual,
and naturally behaves correctly, as above.
- Rename from .appdata.xml to the modern .metainfo.xml
- Add a primary branding color (Yami blurple)
- Add "internet" to recommends and supports
- Update developer_id tag to developer name
- Shorten summary
- Remove obsoleted "kudos" tags
- Add a URL to the release tag
When OBS is closed and there is a floating dock, a Windows system
sound is emitted. This fixes that by not executing the close dock
dialog when OBS is closing.
The Elgato Stream Deck plugin older than 5.5.2.0 invokes undefined
behavior that results in application crashes. Let's block older versions
to prevent the crashes.
If the "Pause timer when recording is paused" option in the Output Timer
settings was enabled, even if an Output Timer was not being used, a
recording may stop when attempting to unpause it. This was due to the
check in the UnpauseRecordingTimer function being too loose and only
checking for if the recording timer was not active. Let's initialize the
recordingTimeLeft variable to -1 and check that it's greater than 0
before attempting to restart a recording timer.
This toggles audio multi track display in Output settings when:
1. When there is a signal that a stream service is changed to a non
custom one. Indeed multi-track audio is only available with Custom
service and only with SRT or RIST protocols.
2. When a Custom service is picked, and SRT or RIST are detected in the
server URL.
3. When Stream settings are saved when one hits Apply.
This is in addition to the toggling done when loading Stream Settings.
Signed-off-by: pkv <pkv@obsproject.com>
This removes the LoadOutputSettings() called in SaveStream1Settings.
It caused a bug when trying to save Output settings when both Stream
and Output settings have been changed but the changes have not been
applied by hitting the 'Apply' button in Settings.
Signed-off-by: pkv <pkv@obsproject.com>
The beginInsertRows/endInsertRows calls seem to signal that the rowCount
has changed, and that views should adjust accordingly. The isProcessing
boolean changes the returned value of RemuxQueueModel::rowCount, which
seems to cause the empty row in the table model to disappear
permanently. I still don't know why it used to work this way and no
longer does.
Since the widget is marked as opaque we need to draw each pixel or
else we may end up with unpainted pixels. On Wayland this will
result in artifacts in the audio meter as transparent pixels will
pick up colors from the underlaying desktop instead.
RTMP was not being recognized due to a case-sensitive comparison; this
changes to a case insensitive comparison to fix the issue.
Fixes a bug found in beta channel.
Signed-off-by: pkv <pkv@obsproject.com>
strcmp(obs_get_encoder_codec(option), "opus") causes the application to
segfault while loading service if find_encoder(id) returns NULL. Add a
null pointer check to prevent that from occurring.
This enables audio multi-track support in UI for mpegts streams (srt,
rist ...).
The UI changes were coded though to allow re-use by other protocols.
Signed-off-by: pkv <pkv@obsproject.com>
Fixes an issue where filters that resize a source, like "Crop/Pad" or
"Scaling/Aspect Ratio", change the texture but the new source size gets
ignored, effectively either cropping the screenshot or giving it black
borders.
Allows the customized UI elements used by OBS Studio to more cleanly
be integrated into consumers of the same elements, mainly frontend
plugins in the main source tree.
find_qt was necessary during the transitional period between Qt5 and
Qt6. With Qt6 being the only supported Qt version (for open source) for
the time being, code complexity can be reduced for easier maintenance.
Instead of a checkbox in the recording group that reveals the replay
buffer group when pressed, the replay buffer group now has its own
toggle that enables or disables the replay buffer.
When running an Output Timer multiple times, multiple signal-slot
connections would be made with the corresponding output stop event
functions. This would cause later Output Timers to terminate
unexpectedly early, due to the stop functions having been called
repeatedly on previous Output Timer runs while outputs were stopping.
There may still be an underlying bug with calling stop on outputs
repeatedly, but this change at least ensures that Output Timers only
call their stop functions once.
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
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.
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.
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).
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.
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.
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>
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.
ExpandCheckBox was introduced in 88b6c63, but the seemingly replaced by
SourceTreeSubItemCheckBox during development. This means that it became
completely unused.
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.
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.
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.
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.
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.
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>
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`.
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.
CEF apparently doesn't like it and is unable to handle when you
destroy/recreate CEF instances very quickly, so... let's just put a
timer on this insanely terrible function. I guess. Whatever.
If you're using an encoder from a plugin, and you remove that plugin,
this value will be null, causing a crash. (Lain note: I realize that
this isn't the best solution to this problem, though there really isn't
any way to infer what type of encoder the prior encoder was. Should also
save the encoder type as additional setting metadata in future
versions.)
After commit 8955338624, 'UI/update/models/whatsnew.hpp' is included
unconditionally, even with 'ENABLE_WHATSNEW=OFF', which breaks
building OBS Studio without nlohmann JSON.
The use of GetCurrentSceneItem can lead to a race condition between
the graphics thread (where this function will be run) and the main UI
thread, as both access the scene list model and iterate through its
members which can change during iteration (as there is no lock around
its access).
Firstly, removes the UpdateTransformShortcuts() method introduced in
c33fa8b which was trying to re-implement the behavior of
UpdateEditMenu().
Secondly, updates UpdateEditMenu() to account for sources without video.
Sources without video shouldn't be able to have their transform edited,
copied, pasted, or changed in any other way (because they don't have
one).