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

9635 Commits

Author SHA1 Message Date
jpark37
993c46c8a2 libobs-d3d11: Relax texture format copy check
SRGB and non-SRGB formats are compatible for copy.
2021-07-11 08:26:29 -07:00
jpark37
6d59cf19e9 libobs-d3d11: Use typeless texture for duplicator
This allows us to use an SRGB SRV for automatic decompression.
2021-07-11 08:26:29 -07:00
jpark37
7c72fd1d4c libobs: Plumb texcoord hint to reduce GPU cost
In order to do linear-correct filtering cheaply when scale filtering is
disabled, we need to know whether or not texture coordinates will always
sample from texel centers. This can be computed at the scene item level
relatively easily, and passed along to sources when rendering. Scene
items will use obs_source_set_texcoords_centered to set hint status, and
sources will use obs_source_get_texcoords_centered to retrieve it.
2021-07-11 08:26:29 -07:00
jpark37
da3375d5a4 libobs: Add gs_generalize_format helper 2021-07-11 08:26:29 -07:00
jpark37
c9766d8e28 libobs: Add DrawSrgbDecompress default technique
Useful when the texture does not support SRGB conversion on load.
2021-07-11 08:26:05 -07:00
jpark37
05b507d900 libobs: DrawSrgbDecompressPremultiplied technique
Necessary for an upcoming fix to browser source.
2021-07-11 08:11:12 -07:00
gxalpha
09865c2ad4 UI: Fix displayed autoremux file name 2021-07-09 19:52:21 +12:00
SCG82
88cc691afa UI: Add obs-frontend-api functions to create/delete profiles 2021-07-09 19:32:18 +12:00
tt2468
502bc3bf0a UI: Add startup flag to disable missing files window
Adds a startup flag (--disable-missing-files-check) to disable the
missing files dialog from appearing on load. For some users, the
missing files dialog may interfere with automation of OBS, or the
user may also purposefully have missing files in their scene
collection which they do not want to be warned about.
2021-07-09 18:32:56 +12:00
tt2468
9ca70f4470 UI: Add obs_frontend_get_current_profile_path()
Returns the path of the current profile's location on the filesystem.
2021-07-09 17:39:40 +12:00
tt2468
53a8a326da libobs: Add obs_enum_all_sources()
There is currently no way to enumerate *all* sources in OBS. Only
inputs and scenes have a way to be enumerated. Some applications
like obs-websocket have features that need to take advantage
of enumerating all sources in order to function properly.
2021-07-09 17:33:17 +12:00
Matt Gajownik
74c3781554 libobs, UI: Add support for button properties as links
This adds support for a button property that opens a URL, after showing
a confirmation dialog to the user. Both the Type and URL must be set.
2021-07-09 17:32:09 +12:00
Georges Basile Stavracas Neto
712478f48c libobs/nix: List Flatpak search paths
The proposed way to handle plugin distribution
through Flatpak depends on these directories to
be read. It goes as follows:

 1. Flatpak's extension point merges the 'lib'
    and 'share' directories at /app/plugin

 2. Plugins prefix their install paths in the
    Flatpak manifest to /app/plugins/<plugin name>

 3. OBS Studio lists /app/plugin as one of the
    search paths in OBS Studio code

This commit implements the third step of this
process, which is the only one that actually
involves OBS Studio itself.

With that, it is possible to distribute plugins
as Flatpak extensions, which in turn allows them
to be listed at app stores such as GNOME Software,
elementary's app store, and KDE's Discover.

Related: https://github.com/flathub/com.obsproject.Studio/issues/135
2021-07-08 10:53:15 -07:00
Bruce Zhang
7baf08e917 rtmp-services: add bilibili live 2021-07-08 09:44:28 -07:00
Georges Basile Stavracas Neto
ec3e8146b2 pipewire: Properly pass sizes to gs_draw_sprite_subregion
The gs_draw_sprite_subregion() function is used when a cropping
rectangle is received from PipeWire. It is usually used by
compositors to implement window screencast - where a large and
mostly empty frame is sent, the window contents are only a small
part of it, and the crop rectangle tells us that.

Recently the wlroots implementation of portals started to use it
to implement cropping, and it exposed a bug in the PipeWire code
in OBS Studio. The gs_draw_sprite_subregion() function takes a pair
of integers representing position (x, y) and a pair of integers
representing size (width, height). The PipeWire code, however,
passes a second pair of positions (x2, y2) instead of sizes, and
it causes overrendering the crop area.

This bug wasn't hit yet because both GNOME and KDE implementations
always send (0, 0) as position, which practically never trigger
this condition.

Pass only width and height to gs_draw_sprite_subregion(), instead
of adding x and y to them.

Fixes https://github.com/obsproject/obs-studio/issues/4982
2021-07-08 08:32:55 -07:00
jpark37
4d9d7b7070 obs-filters: Fix comparison type mismatch 2021-07-06 14:08:28 -07:00
jpark37
880eac5b24 obs-ffmpeg: Fix comparison type mismatch 2021-07-06 14:08:28 -07:00
jpark37
b94fbac7ef libobs: Fix warnings
Cast away truncation, and widen type before multiplication.
2021-07-06 14:08:28 -07:00
Norihiro Kamae
ed76a3032b text-freetype2: Add alpha channel property
Use obs_properties_add_color_alpha to set alpha for text colors.
2021-07-04 12:16:09 -07:00
jpark37
49cfd2426f mac-syphon: Use DrawOpaque as necessary
Treat "Allow Transparency" to mean alpha should be 1.0. Skipping alpha
writes can cause alpha to stay 0.0, which is not desired.
2021-07-04 10:35:54 -07:00
jpark37
b70161bc67 libobs: Add DrawOpaque for rect effect
Needed by Syphon Client.
2021-07-04 10:35:54 -07:00
Norihiro Kamae
5e44e6412a libobs: Fix memory overrun if libobs version mismatches
When size of source_info_t is larger then current structure, memcpy
overruns. Size check is moved before the memcpy.

HANDLE_ERROR macro copies info to data but data is not used. When
calling free_type_data and type_data, the member of data should be used
to ensure the free_type_data is not out of bounds.
2021-07-04 08:49:42 -07:00
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