Fixes an issue where if you auth to twitch, then close the program
without unhiding the twitch stream stats panel, the next time that panel
was unhidden it would be at position 0,0 on your screen. This
explicitly sets its position to be center of the window beforehand to
ensure that won't occur.
Because the new NVENC implementation requires texture sharing, if the
user chooses to use a secondary GPU, fall back to the old implementation
instead.
Fixes the Profile Level problem with integrated AMD Vega GPUs.
(Jim: Also fixes an issue where the amf-test executable would not build)
Closesobsproject/obs-studio#1619
Adds a texture-based NVENC implementation which passes OBS NV12 output
textures directly to NVENC without downloading them off of the GPU,
increasing NVENC performance by a significant margin.
If NV12 textures are unavailable or the new encoder fails to initialize
for whatever reason, it will fall back to the FFmpeg NVENC
implementation safely.
Adds VBR rate control mode, adds a lookahead option, adds psycho visual
tuning option, removes level property (now always set to 'auto'),
removes "2pass" option (replaced by new "Max Quality" preset which uses
2pass by default), modifies a few defaults, and updates their locale
text.
The post-output rescale option in advanced output mode cannot currently
be used with texture-based encoders, so disable the option when a
texture-based encoder is selected.
Allows the ability to encode by passing NV12 textures. This uses a
separate thread for texture-based encoders with a small queue of
textures. An output texture with a keyed mutex shared texture is locked
between OBS and each encoder. A new encoder callback and capability
flag is used to encode with textures.
This splits the "do_encode" function in to "do_encode" and
"send_off_encoder_packet", the latter of which allows the ability for
texture-based encoders to manage their own encoding and just simply send
off a packet to the outputs.
Normally, the total and skipped frame count for the encoder is performed
in the video-io thread. However, because a new thread is being
introduced for texture-based encoding, the frontend has no way of being
able to query that. So, instead of making the frontend query that data
separately, just make the texture encoder thread increment the values of
video-io. That way, the frontend doesn't need to change any code, and
can continue using the same functions for determining the total/skipped
frame count.
This can cause the frame count to be doubled if both a texture-based
encoder and a raw data encoder is active at the same time, but it's an
acceptable alternative.
This implements a blacklist of devices that ship with NVENC libraries,
but do not support NVENC, which would cause the plugin to mistakenly
think that NVENC was available when it was not. If these devices are
the only NVIDIA devices on the system, consider NVENC unavailable.
This is much more efficient than spawning an encoder on startup to see
if NVENC is available, which would incur a ~500 millisecond hit on
startup. Additionally, also much less crash-prone.
Allows the ability for one encoder to defer to another in case of
failure or unsupported feature. Okay, fine, it's mostly a hack so the
new NVENC encoder can fall back to the FFmpeg encoder if NV12 textures
aren't in use, that way it does not have to implement raw fallback
support itself. The settings and properties are pretty much the same,
so there's no reason not to utilize it in order to save time that could
otherwise be spent more productively.
Returns the current version number of windows. The lowest byte is the
minor version number, then the next lowest byte is the major version
number. E.g. 0x601 for Windows 7, 0x602 for Windows 8, 0x603 for
Windows 8.1, and 0xA00 for Windows 10.
(This commit also modifies UI)
Adds a universal function for determining whether video output is
currently active, rather than having to use video_output_active() on the
value returned by obs_get_video().
The signal mutex can be locked within other signal mutexes, causing a
potential hard cross-lock when releasing certain sources. Instead,
defer the Disconnect() call to the UI thread.
This fixes a potential freeze on exit.
Adds the ability to connect/login to an account via the settings and
auto-configuration dialogs. Checks registered Auth objects, and if the
Auth object matches the currently selected service in the settings
window or auto-configuration dialog, will display "connect account"
buttons for the user to be able to click (which are optional, they can
still use stream keys if they'd prefer).
Adds a function for initializing browser and cookies in a separate
thread while, and while waiting for it to complete, show a dialog
stating that the browser is currently being loaded. Allows the ability
to safely prevent the user from taking any action without actually
freezing up the UI thread.
Allows the ability to switch cookies between profiles. Allows the
ability to, for example, switch streaming service accounts between
profiles for proper access to the pages displayed by the browser panels
(such as chat windows).
Makes it so that services can have custom handling on a per-service
basis. The bottom part of the service pane is now a stacked widget
which can now be customized for different types of services
(particularly OAuth services).
Adds functions for executing functions within separate threads without
blocking the user interface, or by blocking the user interface with a
dialog box.
Allows creating a QThread via an std::function. A backward-compatible
alternative to QThread::create for Qt versions older than 5.10 (when it
became available in Qt).
Currently, browser panel is only supported on windows. So rather than
have to check for _WIN32 in the code everywhere, just move the WIN32
check to cmake, that way we don't have to have _WIN32 checks in the code
everywhere the browser panel code is used, and do not have to remove a
whole bunch of unnecessary _WIN32 #ifdefs for other operating systems
when browser panel support is added for them.
The "Custom" service has been moved, and is now an item called "Custom"
in the "Services" combo box. This simplifies the stream page of
auto-configuration and removes an unnecessary widget. Overall a minor
but nice slimline/improvement on user experience.