Clang 19 has become more strict about mixing different enum types, which
resulted in an error building multimedia/obs-studio on FreeBSD:
/wrkdirs/usr/ports/multimedia/obs-studio/work/obs-studio-30.2.3/plugins
/obs-outputs/flv-mux.c:659:37: error: bitwise operation between
different enumeration types ('enum multitrack_type_t' and 'enum
packet_type_t') [-Werror,-Wenum-enum-conversion]
During development on FreeBSD I encountered an uncaught exception abort
from the copy in MigrateGlobalSettings. Catch the error and print a
user-facing message:
error: Unable to migrate global configuration - copy failed.
SetupNewProfile is used to create new profiles when OBS is already
running, which requires resetting program state for the new profile.
This function cannot be used to create a new profile as a fallback
for either a non-existing profile or for a fresh installation of OBS
Studio because by the point this is called from OBSBasic::OBSInit, the
runtime modules are not loaded yet and as such no services exist.
Activating the new profile without a profile reset fixes this issue
as the reset will be done explicitly by OBSBasic::OBSInit later.
cb026964b0 changed most instances of
MuteCheckBox as a selector for the button that mutes/unmutes a source in
the mixer to indicator-mute, but left a few instances of the old
selector, especially in variant themes while the base theme got changed.
This lead to competing selections where apparently indicator-mute won
which meant that the variant themes wouldn't override the base.
Changing all instances of MuteCheckBox to to indicator-mute fixes this
and hopefully prevents future uses of MuteCheckBox as a selector
anywhere.
When a starting scene collection or profile is provided, current code
would crash as the corresponding collections and management functions
do not exist yet (they are tied to OBSBasic, which is not initialized
that early in the program execution).
This change moves the checks for command line arguments into OBSBasic
into the parts responsible for initializing profiles and scene
collections and check for arguments provided via command line there.
When a scene collection is deleted, the generated backup files should
not automatically be deleted. This was new behavior introduced in OBS
30.0.0.
This change restores the prior behavior.
After a profile or scene collection is deleted, the last item in each
list would have been automatically activated as the new current profile
or scene collection.
This is opposite to prior behavior, which would always select the first
item in the list.
This code restores the prior behavior.
As outlined in c5965c8605, bmalloc(0) is
pretty much always a mistake, possibly hiding other bugs.
It's been two years since that commit introduced a warning announcing
that this will crash in a future version of OBS, let's make that happen.
Avoid creating the screensaver inhibitor thread when another method has
been applied.
Make inhibition unavailable in a Flatpak if portal is not available.
Unlock the full feature set of the YouTube Chat dock in OBS by removing
custom scripting/CSS logic. Enable the signed-in experience for live
streaming content creators while also sharing login credentials with the
YouTube Control panel dock.
This will allow OBS users to utilize features _already_ supported in the
YouTube Chat plugin, such as
* creating polls
* managing Q&A sessions
* a rich emoji set in the input panel
* emoji fountains
* moderation tools
and many more. These features are available to users who are logged-in
to YouTube Chat and/or the YouTube Control panel.
Use the cookie manager shared by service integration browser docks for
YouTube Control Panel.
This will enable users of the YouTube Chat panel have a better (creator
facing) experience for observed chat message latency, for those users
who sign-in to the YouTube Control Panel or YouTube Live Chat.
NOTE: This commit does not have any migration logic for existing
logged-in users of YTCP, they will need to sign-in again. Based on usage
stats, this is not going to affect a large fraction of OBS users.
BPM initialization occurs with the first call to the
`bpm_inject()` callback function. When Stream Delay is
active, there is a case where the first call might never
happen, specifically if a user stops the stream with the
discard delay option before streaming begins. In such a
case OBS will crash due to an uninitialized mutex being
referenced in `bpm_destroy()`.
Use `pthread_once()` in both the `bpm_inject()` callback
and `bpm_destroy()` to ensure BPM initialization has occurred.
Per the documentation of CFStringGetCString, the buffer provided must be
large enough not just for the string itself, but also for a NUL
terminator. This space for the NUL terminator is currently ignored, and
we just get lucky that CFStringGetMaximumSizeForEncoding often
dramatically overestimates the space required. However, it is possible
to actually hit the maximum with the string itself (for example by using
strings that contain exclusively Chinese characters such as "我"), in
which case the conversion fails. Adding the extra byte for the NUL
terminator fixes this.
At this point, we can also safely assert that our max_size is larger
than zero, silencing a clang analyzer warning that now is no longer
valid.