Commit graph

9613 commits

Author SHA1 Message Date
Matt Gajownik 5485a91d4c UI: Log Show/Hide transitions on scene collection load 2021-07-04 08:25:33 -07:00
Richard Stanway a82bb12848 cmake: Enable full optimizations for RelWithDebInfo MSVC builds
Adds compiler flag:
/Ob2 (automatic inline expansion)

And linker flags:
/OPT:ICF (identical COMDAT folding)

Ref: https://gitlab.kitware.com/cmake/cmake/-/issues/20812
2021-07-04 05:26:38 -07:00
Rat c1deaf9c3f UI: Fix audio mixer UI not updating from threads
When changing a source's audio mixers/tracks or sync offset with
obs_source_set_audio_mixers or obs_source_set_sync_offset
from a non UI thread while the advanced audio properties panel is open
the UI fields will not update until closed and reopened.

It just shows an error on stderr for the failed invokeMethod calls
that would do the update. For mixers and sync offset respectively:
QMetaMethod::invoke: Unable to handle unregistered datatype 'uint32_t'
QMetaMethod::invoke: Unable to handle unregistered datatype 'int64_t'

Added needed Qt registrations in window-basic-main as that's where
all the needed ones for the frontend UI seem to be put.
2021-07-04 04:34:06 -07:00
Exeldro 93205e5729 libobs/callback: Fix signal_handler_disconnect_global 2021-07-04 04:32:45 -07:00
jp9000 16a49eb10d rtmp-services: Fix implicit function declaration 2021-07-02 07:26:37 -07:00
jp9000 84e6ad2b6d rtmp-services: Update Facebook recommended settings
Adds support for 1080p streams, adds support for 60 FPS streams,
implements bitrate matrix to restrict bitrates depending on the user's
resolution and framerate combination, and removes 480x360, as it was the
incorrect resolution (the correct resolution was supposed to be
640x360).
2021-07-02 07:07:26 -07:00
jp9000 0c8d19147e rtmp-services: Implement bitrate matrix
The bitrate matrix allows specifying maximum bitrate values based upon
resolution and framerate values. This allows more fine-tuned enforcement
of bitrate to prevent users from setting a bitrate that is less ideal
for their particular framerate and resolution combination.
2021-07-02 07:04:24 -07:00
gxalpha 7526bf76ff UI: Check if recording is paused when trying to pause
Adds a safety check to the pause-functions, double-checking that they
won't be called whether it is already in the desired state
2021-07-01 00:23:58 -07:00
Developer-Ecosystem-Engineering 0fd153f9e1 mac-capture: Update display names
Display names for captured displays should render human readable
2021-06-30 01:52:04 -07:00
Georges Basile Stavracas Neto fdce267a9a linux-capture: Use portal's D-Bus on PipeWire captures
Intead of creating one pair of GDBusConnection + GDBusProxy objects
for each PipeWire capture, be it window or desktop, use the global
ones managed by portal.c.

Even if g_bus_get_sync() ends up reusing the same object under the
hood, it's still a net gain, since it has to perform some thread
synchronization routines that aren't necessary here. Creating the
proxy object was a worse offender, because despite being asynchronous,
it would still incur in a few socket messages + a cancellable fd +
thread synchronization.

Reuse these objects from portal.c. The biggest code change here is
that create_proxy() and on_proxy_created_cb() were merged into
init_obs_pipewire().
2021-06-30 01:51:02 -07:00
Georges Basile Stavracas Neto e1c38a1f77 linux-capture: Add getters for portal's D-Bus connection and proxy
It'll be used by the next commit to reuse these objects instead of creating
one per capture.
2021-06-30 01:51:02 -07:00
Georges Basile Stavracas Neto c18f1ea7ed linux-capture: Conditionally register PipeWire captures
Right now we just assume that every compositor and portal implementation
exposes both window and monitor captures, but that's not true, and in fact
the Desktop portal provides a simple mechanism to check which source types
are available: a D-Bus property called "AvailableSourceTypes".

Read this D-Bus property, and use it to conditionally register the desktop
and the window captures.

Related: https://github.com/obsproject/obs-studio/issues/4815
2021-06-30 01:51:02 -07:00
jpark37 998884a8e6 obs-qsv11: Update Intel Media SDK to 2021 R1
Verified my Rocket Lake CPU works now.
2021-06-30 01:49:06 -07:00
Matt Gajownik cf9899bade UI: Handle HTTP errors for fetching remote files 2021-06-30 01:46:50 -07:00
Matt Gajownik 1517062251 UI: Handle & log HTTP errors for RemoteTextThread
This includes the Patreon fetcher & the log/crash report uploader
2021-06-30 01:46:50 -07:00
Ryan Foster 85ffdd57f4 win-capture: Return early in property callbacks if param is null
When obs_get_source_properties is called, it calls the property modified
callbacks without a source instantiation. The callbacks set in
.get_properties for display capture and window capture would then result
in exceptions when anything is dereferenced on the source, such as
wgc_supported or update_mutex, because the source itself is null. Let's
make the callbacks return early if the property param is null.
2021-06-30 01:45:42 -07:00
Ryan Foster 1da97fb0d0 win-capture: Check for WGC support on plugin load
We shouldn't have to check WGC support for every display capture or
window capture source. Either the system supports it or it doesn't.
Check when the plugin loads and use that result.
2021-06-30 01:45:42 -07:00
Ryan Foster 2f3c0911fa win-capture: Determine D3D11 usage once per run
The device type (OBS renderer) cannot change without restarting OBS, so
we should only have to check if we're using D3D11 once instead of
checking every time a new display capture or window capture source is
created.
2021-06-30 01:45:42 -07:00
Ryan Foster 1fa45e63a3 UI: Remove fractional scaling ifdefs
Among the systems we officially support, the oldest Qt version is Qt 5.9
on Ubuntu 18.04. Fractional scaling is supported in Qt 5.6 and newer. We
should be able to safely remove these ifdefs.
2021-06-30 01:42:01 -07:00
Ryan Foster b496f43d45 UI: Make projector display resolutions DPI-aware
Follow up to PR #3988 and commit
5cdd084c7f.
Without this change, displays listed as projector targets on systems
using a fractional scaling factor (e.g., 125%, 150%, 175%) will show an
incorrect width and height for their size. For a display with 125%
scaling, OBS would show 1536x864 instead of 1920x1080. With this change,
it will show 1920x1080.
2021-06-30 01:24:02 -07:00
jpark37 4002995b86 libobs-winrt: Use better Windows SDK version check
Latest Windows SDK has a macro for borderless window capture support.
2021-06-30 01:23:03 -07:00
Exeldro 62d0661f98 obs-ffmpeg: Don't purge packets when there are none 2021-06-29 08:40:13 -07:00
Georges Basile Stavracas Neto 6942bb814d pipewire: Properly account for cursor hotspot
The cursor bitmap is centered on the hotspot, so not accounting
for it means PipeWire captures were positioning the cursor sprite
slightly off.

Properly account for the hotspot by subtracting it from the cursor
position.

Related: https://github.com/obsproject/obs-studio/issues/4766
2021-06-22 19:36:15 -07:00
jp9000 f7dcb6afd6 UI: Fix win uninstall not deleting desktop shortcut
The Windows uninstaller was not deleting the desktop shortcut because
the shell context was incorrectly set to "current" for it, causing it to
try to delete in the incorrect location.
2021-06-22 19:05:43 -07:00
Matt Gajownik 3cc4feb8dd UI: Fix code indentation for Edit Undo/Redo 2021-06-13 15:36:22 +10:00
Matt Gajownik dcd491541e UI/installer: Silently install Visual C++ Redist
Requires redistributables in the install build directory.
2021-06-11 23:12:30 -07:00
jpark37 cd5873e9bc UI: Fix unused parameter warning 2021-06-11 07:20:50 -07:00
Translation ef2b1eb1c6 Update translations from Crowdin 2021-06-11 07:18:15 -07:00
jpark37 c021338ceb libobs,deps/media-playback: Avoid bitfields
Use unused padding of obs_source_frame/obs_source_frame2 instead.
2021-06-11 07:02:37 -07:00
jp9000 2d524580fe UI: Fix context bar crash
This crash was caused by the fact that the SourceToolbar::oldData member
variable was not being released correctly. To release an OBSData object,
it must be either destructed, set to a new value, or set to a null
value.
2021-06-10 14:33:32 -07:00
jp9000 3887c09066 libobs: Update version to 27.0.1 2021-06-10 08:50:41 -07:00
Ryan Foster e0edd753ad UI: Handle mac-vth264 encoder ID change
Before OBS Studio 27, we used our own hard-coded internal encoder IDs on
for the mac-vth264 plugin: vt_h264_hw and vt_h264_sw. As of OBS Studio
27, we changed to using the encoder IDs that Apple's API reports.
Specifically, this behavior occurs due to PR #4105 and commit
6a9f25c8ea.

Unfortunately, this change in encoder IDs failed to take into account
existing user configurations, resulting in users with broken encoder
settings. This change attempts to gracefully upgrade user configurations
to handle the changed encoder IDs.

Fixes #4799.
2021-06-09 17:14:32 -07:00
Exeldro 5998f4cc4d UI: Optimize backup scene for undo/redo 2021-06-08 23:29:17 -07:00
jpark37 ba3eb46bf9 obs-ffmpeg: Add missing return statement 2021-06-07 22:14:38 -07:00
Ford Smith 2ae593860d UI: Fix filters changes not properly being added to undo stack 2021-06-07 21:47:03 -07:00
jpark37 a8414a09cc obs-ffmpeg: NVENC usage fixes
Only use lossless encode if the capability is supported.

Set qpPrimeYZeroTransformBypassFlag to 1 for lossless.

Do not set profileGUID for lossless.

For both NVENC implementations, retry with a heavier reset because both
are unable to recover from failure lightly.
2021-06-07 21:43:58 -07:00
Matt Gajownik 4d647d8d15 UI: Translate Undo action "Delete Scene" and include scene name 2021-06-06 11:05:47 -07:00
jpark37 07084de805 obs-ffmpeg: Support lack of Psycho Visual Tuning
For new NVENC, warn if PVT is requested, but unsupported by the GPU.
Also retry without PVT on failure to try to catch bad cominbations.

For old NVENC, if PVT is enabled when FFmpeg failure occurs, retry
without PVT.
2021-06-06 11:05:04 -07:00
Matt Gajownik 94404a4d28 UI: Don't execute or track empty SceneItem move actions
This would appear as "Undo Move '' in 'Scene Name'"
2021-06-05 20:07:57 -07:00
jp9000 2b69adf3bc Revert "UI: Cleanup on_scenes_currentItemChanged function"
This reverts commit c497342fd6.

Fixes a bug where the sources list would not update after 5b25dec714.
2021-06-04 20:44:20 -07:00
jpark37 15e37f96d1 obs-ffmpeg: Add linear alpha setting
Allow proper linear treatment of alpha for authoring sanity.
2021-06-04 19:04:08 -07:00
jpark37 ce6f233e2d deps/media-playback: Plumb linear alpha flag 2021-06-04 19:04:08 -07:00
jpark37 1fa152092c libobs: Plumb linear alpha flag
Use union for backwards compatibility.
2021-06-04 19:04:08 -07:00
jp9000 5b25dec714 Revert "UI: Fix spamming of log when setting current scene"
This reverts commit 9ca7e1cb0f.

Fixes obsproject/obs-studio#4801
2021-06-04 18:56:28 -07:00
Matt Gajownik 38bb4dcc99 CI: Bump dmgbuild to 1.5.2 to fix detach error 2021-06-03 00:43:13 +10:00
Ryan Foster 5517db5122 UI: Disable Copy Filters in scene list for scene with no filters
When you right-click on a source in the Sources list that does not have
any filters, the "Copy Filters" item is disabled. When you right-click
on a scene in the Scenes list that does not have any filters, the "Copy
Filters" item is enabled. This fixes the Scenes context menu to behave
like the Sources context menu.
2021-06-02 03:39:26 -07:00
Ryan Foster efb2dc70b9 UI: Disable Copy Filters in Audio Mixer for source with no filters
When you right-click on a source in the Sources list that does not have
any filters, the "Copy Filters" item is disabled. When you right-click
on an audio source in the Audio Mixer that does not have any filters,
the "Copy Filters" item is enabled. This fixes the Audio Mixer context
menu to behave like the Sources context menu.

Fixes #4790.
2021-06-02 03:39:26 -07:00
jpark37 08c5f02010 obs-filters: Fix swapped chroma distance values 2021-06-02 03:37:46 -07:00
jpark37 c6937eb559 libobs: Assume sRGB instead of linear for 64 bpp
Should fix regression for 16-bit PNGs.
2021-06-01 19:08:07 -07:00
jpark37 35c07bb7e6 libobs: Restrict direct filtering to SRGB match
Fixes issue where color-correction filter v1 changes from v26 to v27.
2021-05-31 12:33:55 -07:00