Due to a bug in shader parsing, it thinks that because the token
"multiplier" is used here, that the "multiplier" uniform is being used.
This is a workaround for the issue because fixing the parser is probably
going to be much more annoying than just working around the issue for
now.
In bb6787968, we changed the default behaviour to be strict modifiers
and we consider this to be the correct way. There is no need to change
this from code either, since if someone really needs non-strict
modifiers, they can work around it by setting multiple hotkeys.
Having this option in code just means a bigger maintenance cost, so
we'll deprecate the function and remove it in the future.
This adds a circular buffer to ffmpeg-mux when writing to a file.
Output from ffmpeg is buffered so that slow disk I/O does not block
ffmpeg writes, as this causes the pipe to become full and OBS stops
sending frames with a misleading "Encoding overloaded!" warning. The
buffer may grow to 256 MB depending on the rate of data coming in and
out, if the buffer is full OBS will start waiting in ffmpeg writes.
A separate I/O thread is responsible for processing the contents of
the buffer and writing them to the output file. It tries to process 1 MB
at a time to minimize small I/O.
Complicating things considerably, some formats in ffmpeg require seeking
on the output, so we can't just treat everything as a stream of bytes.
To handle this, we record offsets of each write and try to buffer as
many contiguous writes as possible. This unfortunately makes the code
quite complicated, but hopefully well commented.
CMake config files are required for building OBS plugins with the
Flatpak as a runtime.
Add a post-install command that installs the `obs_libraries`
component, which provides the config files.
This limits the length of the name label in the advanced audio
dialog to 80 characters, so the dialog doesn't get too wide. If the
name is truncated, "..." are added at the end of the label, and the
label's tooltip is set to the full name of the source.
If obs_core_hotkeys.strict_modifiers is true (new default),
hotkey is triggered only if current key modifiers exactly match
the hotkey definition. If false, legacy behavior is selected.
This hooks the platform specific events in order to close the obs
display more accurately. Earlier attempts on hooking visiblity, but Qt
does not ensure that visibility is changed before the surface is
destroyed. So we ended up racing with the EGL driver and on some
drivers if you lose the race they hang.
Also only force display creation if the display is actually visible.
When a source type is not video/drawable (or is missing) this would
force the display to be created for the blank window and also hang.
Finally force closure of the preview displays during scene cleanup to
avoid similar ordering issues in Qt. Qt has even less order guarentees
during close and we are sure that displays are no longer needed at this
point in the UI.
The obspython.i file requires `ENABLE_UI` to be defined for the swig
compiler to pull in the actual obs-frontend-api header. If this is not
the case, swig will not discover the required methods and ENUMs and
in turn will not make those available in the scripting environment.
The obslua.i file requires `ENABLE_UI` to be defined for the swig
compiler to pull in the actual obs-frontend-api header. If this is not
the case, swig will not discover the required methods and ENUMs and
in turn will not make those available in the scripting environment.
Adds %s which replaces the keyword with the current unix epoch time.
The %s keyword is common in languages like PHP and Python, and even
some C implementations, but it is not standard so this is a fallback.
The original PR missed assigning the `idx` variable in unregister. When
compiled without asserts this would silently not delete sources. Instead
correctly assign idx and skip unregistration if the source doesnt appear
registered.
fixes#6532
Some webcams, or other AVCaptureDevices like connected iOS devices which
are supported since 162450c, have an audio output which so far got
ignored.
Now, if supported, the audio will be captured alongside the video. For
existing sources, the properties have a button enabling this; while new
sources have it enabled by default.
However the hotkeys can be configured with right-side modifiers in UI,
the right modifiers did not work when hitting the hot keys.
This is because `query_hotkeys` in `obs-hotkey.c` was querying states of
only left modifiers.
This option regularly confuses users, who accidentally select it and
then ask why they have hundreds of 2-4 second video clips in their
output folder. HLS output format to file is a pretty niche use case,
so let's keep it in advanced mode only.
Fixes an issue where when "Duplicate Scenes" and "Switch Preview/Program
after Transitioning" were disabled and preview and program were the same
scene, pressing "Transition" would just disable the menus without
anything happening. This is because a transition is initiated, but never
actually starts transitioning (since both scenes are the same). The
check for this already exists, but was only triggered in swapScenesMode.
Also renames the newScene variable to lastScene to make it more obvious
what it actually is (especially since now, it's not only the new scene
anymore).
Only warn when the pointer provided to obs_source_release() is
non-NULL. In some custom usages of libobs, libobs may be freed before
OBS* smart pointers (like OBSSource) are destructed, leading to a
misleading warning if the pointers have already been cleared with
nullptr.
Previous behavior is basically:
- Clear OBS* pointers with nullptr
- Unload libobs
- Those smart pointers that were cleared will still call
obs_source_release() on destruct
- Warning appears