Certain services have custom server lits handling which I had forgotten
about, so although it would have been nice to have this refactor, we'll
have to live with relying on the plugin properties object directly for a
while.
This also reverts obsproject/obs-studio#6530 and
obsproject/obs-studio#6683 because that change depended on this
problematic refactor code.
This reverts commits:
f2e6122881e6b8be3470d5574235afa32a4badc5,
bc80d0ca95a3c79cf1f4bc24df437f4ace125e30,
050a29da1a7ad620f05fbd2927786da2f36d85b9,
22ffc04f735830de19a654cd94839504313afb0a,
275e510aad8161bdcd101828f45584a0430ac65e,
2fa5ffe4dfdb50acaa7df4b7f4f80cf1d12cf913.
This commit accomplishes three different things:
- Makes it much less difficult to communicate service settings
between the UI and the plugin.
- Refactors some code and makes it cleaner and easier to modify to our
needs (although there is still a lot of work to do on that front
because of heavy code duplication issues between auto-config and the
stream settings pane).
- Significantly reatly reduces the number of times the json file has to
be opened and parsed.
This also kind of denotes a bit of a failure on the plugin communication
aspect. The properties system is too limited and jank for a lot of
things we would like to do at times.
If streaming and recording was selected in the Auto-Configuration
Wizard, a memory leak would occur. When obs_service_resolution appeared
elsewhere in C++ files, it used a BPtr. Use BPtr here too.
(This commit also modifies rtmp-services and UI)
Changes the maximum resolution size to a resolution list, and splits the
maximum FPS to its own function.
(Note: ABI has not been modified because the last changes still haven't
been released yet, so it's safe to modify this as long as the changes
haven't been officially released)
Adds a virtual camera button to the main user interface. If virtual
camera is not installed, it will not add the button. On Windows, it
detects whether the virtual camera filters are properly registered, and
will only add the button if the virtual camera filter is confirmed
registered.
Also adds a virtual camera option to the auto-configuration wizard,
which will just simply set the user's resolution/scale to 1920x1080 at
30 FPS.
As os_gettime_ns() gets large the current scaling methods, mostly by casting
to uint64_t, may lead to numerical overflows. Sweep the code and use
util_mul_div64() where applicable.
Signed-off-by: Hans Petter Selasky <hps@selasky.org>
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed. Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
NVENC has increased its quality to bitrate ratio over the years with
recent generations of hardware, so do not increase the minimum estimated
bitrate if NVENC is chosen in the auto-configuration dialog.
This reverts commit 2604db6e404cc1719ae779961ca12ed27fd06e89.
The API to get the closest server can be down occasionally, so instead
just revert to its previous behavior.
Allows an output to automatically specify which audio codec it requires
and use it instead of AAC. This change is intended to be
behind-the-scenes and seamless to the user.
Allows a service to specify the output it needs in order to function as
configured.
NOTE: This functionality should be considered temporary as a seamless
means of implementing support for different output types within the same
service. Ideally, different services should be used for this
functionality.
Prevents the output from hard-locking on itself when the stop call would
trigger the callback and then try to lock again. Probably could be
solved with a recursive mutex, but at that point it's not really
necessary.
The auto-configuration wizard is designed to allow first-time or
novice/uneducated users or to set up video and encoding settings in a
very quick and easy way. It'll automatically perform a bandwidth test,
and/or test the user's video settings to determine the most ideal
settings for streaming and recording (assuming a 1-pc setup).