This enables a new logger function introduced in SDK >= 0.7.5, which
gives much more details about what is going on during the effect
processing.
Signed-off-by: pkv <pkv@obsproject.com>
The audio filters are now disabled if an issue is detected;
the filter is no longer destroyed.
This avoids a call to destroy function within the filter.
Signed-off-by: pkv <pkv@obsproject.com>
SIMD Everywhere finder needs to be installed alongside libobs CMake
package since its headers depends on it.
C++ cmath header is included on Windows on ARM to ensure that all math
functions are correctly defined when included in C++ code.
https://github.com/simd-everywhere/simde/issues/1304
macOS intrinsics is included to make sure that no redefinition error
happens.
Create a specific "out of memory" variant of os_breakpoint to facilitate
troubleshooting and to differentiate an "out of memory" crash from a
more generic crash.
The interleaver requires packets with sufficiently high timestamps from
all encoders to be available to send out before it outputs a packet.
This means that if one encoder stalls and does not submit packets for
a while the interleaver can end up with a permanent increase to its
delay due to multiple packets being received from the other encoders
without being able to send any.
This change introduces a recovery mechanism that relies on an upper
bound for the amount of packets that may become "streamable" at a time
being calculated, and flushing additional packets if that bound is
violated.
The upper bound is based on the largest expected interval between
packets and how many packets for each encoder could arrive within
double that interval (to give us a bit of wiggle room since not
all encoders will deliver frames 100% consistently).
This ensures that we still send data at a steady rate but allow the
buffer to drain if it becomes larger than it needs to be.
Adds more error handling to macOS code and also updates the code to
use more ObjC-appropriate code styling.
Variable names have been changed to be more expressive and platform-
specific constants are used instead of custom FourCharCodes.
OpenGL swapchain code has been the subject of obscure crashes on macOS
for quite some time, mainly because updates to the swapchain need to
take place on the main thread (because the operations involve the
NSView instances of the application), which introduces possible race
conditions.
This commit adds more error checking to the related functions and makes
OpenGL-related code use copies of data from the graphics thread
(instead of accessing that data as nested data within a global heap
object) and limit "deep" access to a swap-and-delete update of the
texture pointer for the associated frame buffer object.
A boolean comparison that involves at least one vector type will
result in a boolean vector (not a boolean scalar) for Direct3D and
Metal, whereas OpenGL returns a scalar boolean.
To avoid unnecessary code complexity, use the "distance" function
instead, which treats the color values as vectors and returns a
non-zero value if they are any different, achieving the same result.
The OpenGL frontend is implemented in Metal for Apple Silicon Macs.
Metal does not provide a direct "clear" command (neither do D3D12 or
Vulkan) and instead a clear is a load command for a render target of a
render pass.
All writes (and color calculations) in Metal happen in linear space,
with appropriate gamma encoding and decoding happening automatically
depending on the pixel format of the the textures attached to the
pipeline.
Thus setting a clear color with linear gamma is the correct approach to
avoid the SRGB gamma curve being applied twice for both scenarios.
Ideally CMAKE_OSX_ARCHITECTURES should not be set automatically within
the project but should exclusively be a cache or environment variable
provided by the developer.
This would also match the requirement mentioned by the CMake
documentation that the value should be set before the first project()
call.
If this variable is not set, the Xcode generator would default to the
native platform of the host, but the buildspec system as well as the
"add_obs_plugin" function need a local "architecture" to work, so
use "CMAKE_HOST_SYSTEM_PROCESSOR" instead if CMAKE_OSX_ARCHITECTURES
was not provided.
Recent styling changes mean read-only QLineEdits no longer visually take
focus. There are better ways to remove the input cursor, and if we do
that that should probably be all operating systems anyways.
Splits the IconLabel widget header into a header and source file. The
source uses the moc_icon-label include to prevent the moc from being
included in the global mocs_compilation (as described in 5eb04cd).
Commit [1] originally made a differentiation between the operating
systems for the window icon. However, on macOS the window icon is only
respected for the main window (and used for the entire app, as windows
themselves don't have icons), and that got removed in [2]. This means
that this code doesn't actually do anything anymore, and thus should be
removed.
[1] 9ac92f61be
[2] 4afafaac6d
This fixes a change in PR 11605 that breaks Decklink video outputs.
get_mix_for_video() returns NULL for those outputs, causing
start_raw_video() to return before connecting the output.