0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

6177 Commits

Author SHA1 Message Date
jp9000
79613b6696 UI: Use new NVENC by default in simple output mode
If the new texture-based NVENC implementation is available, uses it by
default when a user is using simple output mode.
2019-02-07 17:00:47 -08:00
jp9000
ed0c7bcd6a obs-ffmpeg: Add texture-based NVENC encoder implementation
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.
2019-02-07 17:00:47 -08:00
jp9000
8b566f3352 obs-ffmpeg: Update NVENC properties and property defaults
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.
2019-02-07 17:00:47 -08:00
jp9000
9c11772682 obs-ffmpeg: Update display name of FFmpeg NVENC encoder 2019-02-07 17:00:47 -08:00
jp9000
c3f3aa7f25 obs-ffmpeg: Update nvEncodeAPI.h to latest version 2019-02-07 17:00:47 -08:00
jp9000
f5ad8b5d67 UI: If hardware encoder selected, disable post rescale
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.
2019-02-07 17:00:47 -08:00
jp9000
9fee895359 UI: Use hardware encoding by default if available
If the user doesn't use the auto-configuration on first use, set the
default encoders used in simple output mode to hardware encoders.
2019-02-07 17:00:46 -08:00
jp9000
93ba6e7128 libobs: Add texture-based encoding support
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.
2019-02-07 17:00:46 -08:00
jp9000
cd1607ca6e libobs: Split do_encode in to two funcs
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.
2019-02-07 17:00:46 -08:00
jp9000
36ffa65b68 libobs/media-io: Add frame funcs for separate GPU thread
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.
2019-02-07 17:00:46 -08:00
jp9000
0be02564cb obs-ffmpeg: Implement NVENC video card blacklist
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.
2019-02-07 17:00:46 -08:00
jp9000
8134b8afda libobs/util: Fix bug with get_winver
get_winver is supposed to return a 16bit value in a format equivalent to
0xMMmm (Major minor).  It was returning 0xMM00mm incorrectly instead.
2019-02-07 17:00:46 -08:00
jp9000
e6c719a1dd libobs/util: Fix bug with circlebuf_data
If the index specified is equal to the size of the data, return NULL.
2019-02-07 17:00:46 -08:00
jp9000
9b8bc22ffa libobs: Add ability to reroute encoders
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.
2019-02-07 17:00:46 -08:00
jp9000
2e1a19456a libobs/util: Add get_win_ver_int() func (windows)
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.
2019-02-07 17:00:46 -08:00
jp9000
28d0cc8b97 libobs: Use NV12 textures when available 2019-02-07 17:00:46 -08:00
jp9000
82848d513e libobs: Add obs_video_active() function
(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().
2019-02-07 17:00:46 -08:00
jp9000
93fc61fa82 libobs/graphics: Add NV12 texture support 2019-02-07 17:00:46 -08:00
jp9000
b64d7d71d0 libobs/graphics: Add texture sharing functions 2019-02-07 17:00:46 -08:00
jp9000
0a202ab77b UI: Fix potential race condition
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.
2019-02-07 17:00:46 -08:00
jp9000
a88b440290 UI: Add Twitch integration 2019-02-07 16:28:19 -08:00
jp9000
4710c04204 UI: Add Mixer integration 2019-02-07 16:28:19 -08:00
jp9000
67bb8d7028 UI: Add auth. support to settings/autoconfig
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).
2019-02-07 14:47:16 -08:00
jp9000
ccc64df371 UI: Add obfuscation func
You could also say..  obs-fuscation.
2019-02-07 14:47:15 -08:00
jp9000
08fb29a035 UI: Add Auth and OAuth classes
Allows the ability to authenticate to a specific service.  Typically via
OAuth.
2019-02-07 14:47:15 -08:00
jp9000
1b8bc55f6a UI: Add func to load browser/cookies, but show dialog
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.
2019-02-07 14:47:15 -08:00
jp9000
fe043f2b2a UI: Add per-profile browser panel cookie management
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).
2019-02-07 14:47:15 -08:00
jp9000
940fd23cb4 UI: Switch to new browser panel code 2019-02-07 14:47:14 -08:00
jp9000
24bcfacea5 UI: Improve/refactor autoconfig/settings service UI
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).
2019-02-07 14:47:02 -08:00
jp9000
dcf48e8ffc UI: Add function for adding extra docks to main window 2019-02-07 14:47:02 -08:00
jp9000
412520c5d0 UI: Make assignDockToggle an actual function
Allows using it outside of the constructor.
2019-02-07 14:47:02 -08:00
jp9000
b89c2b76d3 UI: Add function to get main window more easily
Adds OBSBasic::Get() to just quickly return the main window.
2019-02-07 14:47:01 -08:00
jp9000
a0eab1a2ad UI: Add functions for executing funcs without blocking
Adds functions for executing functions within separate threads without
blocking the user interface, or by blocking the user interface with a
dialog box.
2019-02-07 14:47:01 -08:00
jp9000
74cda9a2cc UI: Add CreateQThread helper function
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).
2019-02-07 14:47:01 -08:00
jp9000
58f4a6390f UI: Unlock UI by default 2019-02-07 14:47:01 -08:00
jp9000
08e6dcd516 UI: Add alternate constructor for RemoteTextThread
Allows specifying extra headers.
2019-02-07 14:47:00 -08:00
jp9000
44834bbf04 UI: Add timeout parameter to RemoteTextThread
Allows specifying a timeout for the operation.
2019-02-07 14:47:00 -08:00
jp9000
4ba48484ae UI: Only def. BROWSER_AVAILABLE for WIN32 (for now)
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.
2019-02-05 19:20:59 -08:00
jp9000
c482f463e0 UI: Remove "service type" from auto-config stream page
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.
2019-02-05 18:45:05 -08:00
Jim
1f79fc1295
Merge pull request #1624 from richardfontana/add_gplcc
Add GPL Cooperation Commitment to base directory
2019-02-05 15:30:26 -08:00
Colin Edwards
d1f9a15e6a
Merge pull request #1647 from Dmitry-Me/fixUnusedParametersWarnings
obs-filters: Fix unused parameter warnings
2019-02-05 10:44:56 -06:00
Dmitry-Me
7be8269145 obs-filters: Fix unused parameter warnings 2019-02-05 18:20:26 +03:00
Colin Edwards
09f9ed0659 obs-vst: Fix resizing on windows (submodule update) 2019-02-04 21:57:44 -06:00
Kevin Ross
a5fac7d78c UI: Enable high DPI scaling, for Qt >= 5.11
Closes obsproject/obs-studio#1602
2019-02-04 21:36:17 -06:00
Luke Granger-Brown
0c69f457a1 UI: Use Next button for GPL license page in windows installer
The GPL is not an EULA and thus it doesn't need to be agreed to.

See also:
https://github.com/HandBrake/HandBrake/pull/1776
c07d721462

Closes obsproject/obs-studio#1597
2019-02-04 21:21:17 -06:00
Colin Edwards
17524a9691
Merge pull request #1638 from WizardCM/offset-monitor-count
win-capture: Start user-facing monitor count at 1
2019-02-04 21:00:05 -06:00
Colin Edwards
1bc1fa8f40
Merge pull request #1644 from Dmitry-Me/fixScanfQualifiers
libobs: Fix scanf type specifiers
2019-02-04 20:48:51 -06:00
jp9000
a4e8b93653 win-capture: Add a few more blacklisted capture exes 2019-02-04 18:16:43 -08:00
jp9000
da1f84133e win-capture: Do not capture "explorer.exe" with null titles 2019-02-04 18:16:43 -08:00
Dmitry-Me
8df42cda8a libobs: Fix scanf type specifiers 2019-02-04 16:02:49 +03:00