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.
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.
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.
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.
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
Add comparison check so that NaN is caught.
Comparisons with NaN always result in false.
NaNs cause problems later in audio encoder.
Note: may break with -ffast-math compiler flag.
Fixes#4885.
Since [1], avcodec/version.h is not included anymore in codec.h and
therefore is not included any more in avformat.h.
As a result, LIBAVCODEC_VERSION_INT is no longer defined. This commit
fixes the include.
Since obviously we can't ifdef the avcodec include by referring to an
avcodec version, we ifdef it with the avformat version which was bumped
at the same time [2].
[1] libavcodec: Split version.h
f2da2e1458
[2] doc: Add an entry to APIchanges about changes to version.h and
version_major.h
f3a0e2ee2b
Signed-off-by: pkv <pkv@obsproject.com>
Prior to this change, the audio thread roughly waits the time of
`AUDIO_OUTPUT_FRAMES`, and consecutively processes twice or more if the
latency is accumulated. This behavior causes fluctuation of timing to
output audio packets. This change introduces `os_sleepto_ns_fast` so
that the audio packets will be periodically output.
The function `os_sleepto_ns` has a spin loop so it will consume CPU
resource. The new function has same interface but consumes less CPU
resource with a drawback of less precision.
Fixes studio mode preview on SDR monitor for HDR canvas rendering SDR
source into SDR swap chain. Needs to render SDR source into HDR render
target, and then tonemap into SDR swap chain for preview.
To simplify logic in source files, `LINUX_PORTABLE` is only defined
if the associated build flag is enabled. Thus straight-forward `ifdef`
checks suffice.
Details in #6226, basically this fixes an issue where OBS links
to the system-installed librtmp1, which is incompatible with our
librtmp.
Co-authored-by: ewhac <ewhac@ewhac.org>
Due to the way the frontend works, the logic for inserting the row for
the group in the UI was dropped since the new item_add message will
insert one automatically since it forces a refresh of the scene items.
The reliance on that implicit row insertion when grouping items is a
bit of a code smell, although the alternative would be to add logic to
disable handling the signal for that instant, which is probably a
worse choice.
Allows a frontend the ability to set the maximum audio buffering
latency, and specify whether that audio buffering is either fixed (to
the maximum audio buffering latency), or dynamically increasing from 0.
This will be useful if the user wishes to output audio to devices or
through a virtual audio device at a guaranteed minimal latency.
When audio buffering is maxed, certain sources will always repeat the
same debug logging message of "render audio source [name] has gone
backwards", which shouldn't apply if the audio timestamp is 0 rather
than a valid audio value.
This is in anticipation to adding low audio latency mode, will cause
audio buffering to be fixed rather than dynamically increasing. Having
fixed audio buffering means that audio latency always stays the same
rather than dynamically increasing.