The initial DTS for non-fractional framerates was being incorrectly
calculated. It assumed that the time base was in frames when it was
not.
Closesobsproject/obs-studio#1857
The workarounds were made because of conflicts with running multiple UI
threads at once on macOS, which macOS can't do very well, and would be
susceptible to crashes. This would cause crashes not only on startup
but seemingly at random when using the browser source on macOS. The
original "fix" was a hack to try to minimize UI code and browser UI code
from executing at the same time. The macOS initial scene loading was
deferred until all Qt-related and main window initialization was
completed. Although this worked to some extent to prevent conflicts, it
made it so that there was an initial period on startup where the entire
UI seemed "blank" for users, and it was still possible for the main UI
thread and the browser UI thread to clash, causing crashes seemingly at
random for users.
The external message pump method of CEF is the solution to the problem,
which is the method which allows the main UI thread to share events with
CEF. To do this, all CEF operations need to be performed in the UI
thread (Qt's main thread), and CefDoMessageLoopWork() needs to be called
when CefApp::OnScheduleMessagePumpWork callback is triggered. A number
of other issues had to be solved as well, such as CefBrowser references
getting "stuck" in the Qt event queue.
With this, macOS no longer needs to do the "deferred load" hack, and
browsers are now much more stable and no longer as susceptible to
seemingly random crashes, improving overall program stability when
browsers are used.
Ensures that functions loaded by `os_dlsym()` come only from the
specified library that was loaded with `os_dlopen()` rather than the set
of libraries loaded by the specified library.
Instead of having ffmpeg-mux stored in a data directory, install it to
the primary binary directory. On windows, this fixes ffmpeg-mux
potentially accessing the wrong FFmpeg libraries (some programs install
them to system32, foolishly), and instead ensures that it uses the ones
that come with the program. On Linux, ensures that a binary is in its
appropriate directory (/usr/bin or /usr/local/bin rather than a subset
of /usr/share or /usr/local/share).
libobs: Add support for limited to full color range conversions when
using RGB or Y800 formats, and move RGB converison for Y800 formats to
the GPU.
decklink: Stop hiding color space/range properties for RGB formats, and
remove "YUV" from "YUV Color Space" and "YUV Color Range".
win-dshow: Remove "YUV" from "YUV Color Space" and "YUV Color Range".
UI: Remove "YUV" from "YUV Color Space" and "YUV Color Range".
Allows the ability to override and use partial range RGB with the
DirectShow and Decklink device sources when partial range RGB is
implemented. Fixes certain cases where devices could capture RGB in
limited range via HDMI (per the HDMI specs).
Fixes handling of the `obs_source_frame::full_range` member variable,
which is often set to false by default by many plugins even when using
RGB, which would cause RGB to be marked as "partial range". This change
is crucial for when partial range RBG support is implemented.
Adds `obs_source_frame2` structure that replaces the `full_range` member
variable with a `range` variable, which uses the `video_range_type` enum
to allow handling default range values. This member variable treats
VIDEO_RANGE_DEFAULT as full range if the format is RGB, and partial
range if the format is YUV.
Also adds `obs_source_output_video2` and `obs_source_preload_video2`
functions which use the `obs_source_frame2` structure instead of the
`obs_source_frame` structure.
When using the original `obs_source_frame`, `obs_source_output_video`,
and `obs_source_preload_video` functions, RGB will always be full range
by default for backward compatibility purposes.