Improve complicated Objective-C implementations in
mac-screen-capture implementation.
- Use `for` instead of overuse of block based iteration code.
- Use `YES` and `NO` for `BOOL` type instead of wrong `TRUE`, `FALSE`,
`true`, `false`.
- Use `length` to check empty string, omit unnecessary `nil` checks.
`screen_capture_build_content_list` or similar calls uses updated
`sc->show_hidden_windows` or similar flags, but these are not set
before calling these functions.
This software seems to be pre-installed on many Lenovo systems and has a
"Network Boost" feature that restricts data usage of background apps,
causing throughput issues when streaming with OBS.
Some options do not require a media source restart. Saving source
unchanged source settings should also not trigger a restart.
I tried to also make it so speed changes do not require a restart by
manipulating the elapsed timestamp for the source, but it sometimes
causes the first few milliseconds after saving settings to be rough or
slightly distorted. I am also unsure whether a/v frame buffers should be
cleared on a speed change (and how to) so I made it so restarts are
required for speed changes. Chiyo also mentioned that successive quick
speed changes will cause maximum audio buffering (which I was able to
reproduce once).
Nonlocal file playback is unaffected, and will cause the media source to
restart because I am not aware of the possible consequences and because
there's no restart button for it.
Changing "Apply alpha in linear space" is only visible after a few
milliseconds (when mp_media_next_video is called for new frames).
If `is_stinger` and `full_decode` are toggled during runtime, even
though it shouldn't be possible as they are not accessible in the UI,
a media restart will be triggered.
Notable changes:
* deps.qt: Remove Qt 5 builds
* deps.qt: Update Qt 6 build scripts
* deps.ffmpeg: Update dependencies for OBS CMake 3.0 upgrade
* deps.windows: Update dependencies for OBS CMake 3.0 upgrade
No dependency versions have changed.
This update is to unblock work on the Windows "CMake 3.0" upgrade and
dropping Qt 5 support.
When changing audio channels, sample rate, or audio buffering settings
multiple times by hitting `Apply` button, the internal `changed` state
got corrupted. To avoid this, set the changed state when changed
something, but do not clear the changed state.
Creation of Info.plist files through Xcode is more canonical and
future-proof, as it will automatically pick up changes/updates
introduced by Apple. Non-standard keys can still be added via a
template file, which will then be extended by Xcode with the default
keys.
Compiler extensions are disabled before the first `project` call to
force CMake into considering compilers to not support GNU extensions
(even though clang and gcc do).
Also sets common clang compiler options so they can be used across all
supported platforms.
`openmp-simd` support is enabled by default as there is no performance
penalty on x86_64 systems and intrinsics are enabled on arm64.
Also implements CMake's `CMAKE_COMPILE_WARNING_AS_ERROR` flag to
enable the desired behavior and configuration time.
Include guards ensure that bootstrap includes happen only once for the
entire project. Moving all policy changes into an included file without
its own policy scope ensures that the policy is applied to the project.
Also restores original order of compiler flags and more explicitly
splits up flags for the specific languages in which they take effect.
Notice that ObjC and ObjC++ follow a slightly stricter set of rules
than C and C++, which is reflected by this fix.
Frameworks should be archived and exported (where they will be
codesigned by Xcode) or shipped within an App bundle where Xcode will
also take care of it.
The FTL SDK is outdated and not actively maintained - the warnings are
known and acknowledged, so there is no need to further pollute the
build output with them.