This changes cleans up some deprecated functions that were removed in
Qt6. Some are placed behind version ifdefs and others are replaced for
their non-deprecated Qt5 version.
When enumerating the list of encoders offered by VideoToolbox,
there's no reason we can't use the returned ID, which allows us to
remove the hardware/software encoder specific functions. At the
same time, this does add a slight complexity when localizing the
encoder name, so we can fall back to the OS-provided encoder name
if there's not a match.
Previous versions of LuaJIT required setting linker options
-pagezero_size and -image_base. This was accomplished in commit
c9224edbad, but as of LuaJIT 2.1, this is no longer necessary, and
doing so results in the application being killed when run natively
on macOS ARM targets.
The timestamp returned by mHostTime in the AudioTimeStamp structure
is the current timestamp equivalent to mach_absolute_time(), which
is relative to the machine's time base. In order to convert this
to milliseconds, it's necessary to get the host's timebase with
mach_timebase_info() and scale the timestamp accordingly, since
the rest of the timestamp synchronization code expects the timestamp
to be in milliseconds.
This is effectively equivalent to the code which was previously in
libobs/util/platform-coca.m, but must be applied here instead.
macOS should use the function clock_gettime_nsec_np() to get the
current clock in nanoseconds, instead of manually using
mach_absolute_time() and manually adjusting the timebase. This
greatly simplifies the platform-specific code to manage the
current time in nanoseconds.
When calling D-Bus methods, three fields are required:
* The bus name, which is what applications own when they
want to expose themselves to D-Bus;
* The object path, which represents a D-Bus object exported
under a bus name;
* The interface, which holds the methods and signals;
While out of pure coincidence all the D-Bus buses have a
matching interface name, it is technically incorrect to assume
that.
Add a new 'interface' field to service_info, and split the bus
name.
GDBus is more and better maintained than libdbus these days. In the
future, a potential Wayland-compatible capture plugin will need to
interact with D-Bus in a way that's way too complicated for libdbus,
and it won't be nice to have both libraries talking to the D-Bus
socket.
Replace the libdbus usage by GDBus. As it turns out, it results in less
code.
There are too many issues with 20.04 to successfully build with
VirtualCam - the azure kernel is missing videodev headers. For now,
use 18.04 LTS directly for main CI builds.
Both 18.04 and 20.04 include clang-format-10 without issue.
Fixes a bug where the output resolution wouldn't change when using a
service that uses the "supported resolutions" limitation. When switching
to a non-editable combo box, the signal used to detect whether the combo
box has had its value changed wouldn't work anymore because it was the
signal explicitly used for editable combos. So, to fix, just reapply the
normal combo box signal to detect when the value has been changed.
Fixesobsproject/obs-studio#4124
Previously the save callback would be called when the replay buffer
hotkey was pressed and not when the saving of the replay was finished.
When the 'get_last_replay' procedure was called after the saved callback
function, it would return the incorrect path, as the path would still
be the previous path.
Attempt to schedule shared texture copies against the command queue that
the game's swap chain uses to try to reduce artifacts. The heuristics
for obtaining the queue are not perfect, so provide a toggle to use the
previous behavior.
Implement device_texture_create_from_dmabuf for EGL/X11 and EGL/Wayland.
The code is shared between them, in a new gl-egl-common.c file.
This is currently limited to a few common RGB(A) formats for now, which
seems to cover most use cases.
DMA-BUF is a widespread Linux buffer sharing mechanism. It is what's
commonly used zero-copy screen sharing by Wayland compositors.
Add a new 'device_texture_create_from_dmabuf' vfunc to gs_exports,
and stub implementations to libobs-opengl. Add a new public method
gs_texture_create_from_dmabuf() that calls this vfunc.
In #3988, @RytoEx mentioned that the recent Qt upgrade to 5.15.2
introduced a regression in which Qt begins returning DPI/scaling
aware resolutions for each screen. While this was fixed for
new profiles, this was not reflected in the choice for the
Canvas (Base) Resolution in the Settings screen yet.
This commits fixes this issue, and calculates the correct
physical screen size again, respecting per-screen DPI scaling.
The Chromium sandbox is conflicting with the Flatpak sandbox in a non-trivial,
non-workaroundable way. Until Chromium / CEF provides a way to unconditionally
disable the entire sandbox, let's not degrade the Flatpak experience.
This reverts commit 36ab7b97cff3bad9f3056b2f3cb1fa6a7158f79b.
The fact that a transition is a composition of two scenes was not
factored into the merging of this PR. Thus, it would apply to the
underlying scenes when transitioning, making the effectiveness of this
feature cause inconsistent rendering of the underlying scenes when
transitions are activated versus when they're not.
This will be used by a new event filter, added only when running as a Wayland
client, to force creating the obs_display instance even when not exposed.
This is a dangerous operation on Wayland, and is crashing not only
OBS Studio but also the whole compositor. Let's disable it for now
when running as a native Wayland client.
Some compositors (GNOME Shell, Plasma) still allow setting this
option on the window menu.