Commit graph

9671 commits

Author SHA1 Message Date
Matt Gajownik 725fce78ba Revert "docs: Rename Code of Conduct to fix GitHub detection"
This reverts commit 50d28de10b.

Unfortunately, it seems GitHub requires the code of conduct to:
1. be named CODE_OF_CONDUCT
2. have a .md file extension

This commit restores external links to the CoC for now.
2021-08-07 20:40:29 +10:00
Matt Gajownik 50d28de10b docs: Rename Code of Conduct to fix GitHub detection 2021-08-07 20:09:21 +10:00
Ben Torell a9352985c7
docs: Add link to CoC to contributing guidelines 2021-08-03 21:14:53 -04:00
Ryan Foster 835ac0a556 obs-filters: Correct log prefix for noise suppression filter 2021-07-31 15:32:35 -07:00
Ryan Foster 41b3913793 obs-filters: Use correct NVIDIA capitalization 2021-07-31 15:32:35 -07:00
Norihiro Kamae 04b0d632aa UI: Fix da_push_back taking a wrong type of item
A pointer to `OBSSource` was passed to an argument that expect a pointer
to `obs_source_t *`.
Since the current implementation of a class `OBSSource` has a member
`obs_source_t *obj` at first and the class does not have any virtual
member functions, most implementation should work correctly.
2021-07-31 15:29:26 -07:00
Norihiro Kamae 7b4ae8611c libobs: Fix da_push_back taking a wrong type of item
Since the darray `sys_include_dirs` is an array of `char *`, it is
required to take a pointer to `char *`, that is `char **`. However,
`char *` was passed.
Since this function never called, another fix is removing entire
function `cf_preprocessor_add_sys_include_dir`.
2021-07-31 15:29:26 -07:00
Lovecast Neil 60753fbfaf rtmp-services: Add "Lovecast" 2021-07-31 15:25:52 -07:00
Exeldro 08d9069201 UI: Fix undo delete scene that is used as source 2021-07-31 15:25:00 -07:00
Joel Bethke 95b92f6de3 Add Code of Conduct 2021-07-31 17:23:22 -05:00
Matt Gajownik a5878e1caa obs-ffmpeg: Translate VAAPI property names 2021-07-31 15:09:29 -07:00
jpark37 ffac4c3733 obs-filters: Sample mask/blend texture linearly
Makes behavior of blend addition more reasonable.
2021-07-30 23:39:02 -07:00
Georges Basile Stavracas Neto 4c07ba6886 Revert "UI: Disable drag/drop on Linux scenes/sources (for now)"
This reverts commit 457adcedd3.

Requires https://github.com/obsproject/obs-browser/pull/304
2021-07-28 10:28:49 +10:00
Matt Gajownik f2cae6195b obs-browser: Update version to 2.15.0
- Simplify JS function registration/definition
 - Enable Ctrl+R on Linux and Cmd+R on macOS for Browser Panels
 - Fix keyboard support in Interact dialog on macOS
 - Remove fractional scaling ifdefs
 - Remove unused variable definition
 - Remap semi-transparent colors for linear blend
 - Set user_agent_product in CEF >=91
 - browser-panel: Manually unset XdndProxy
2021-07-28 10:16:16 +10:00
Richard Stanway ff0350b515 win-capture: Fix formatting 2021-07-24 23:21:02 +02:00
Richard Stanway 5d54cc36a7 obs-filters: Minor NVAFX cleanup
Remove some unused variables, fix incorrect mutex initializer, fix
exporting NVAFX functions via dllexport.
2021-07-24 23:15:45 +02:00
Richard Stanway f0e3cd1f91 UI: Simplify expressions in GetMonitorName 2021-07-24 23:15:45 +02:00
Richard Stanway 320177926d win-capture: Use better defaults in thread_is_suspended
On my system with ~250 processes running, this loop has to run over 500
times before allocating enough memory. Use better initial and increment
values to avoid thrashing the heap.
2021-07-24 23:15:45 +02:00
Richard Stanway b2e30c955d win-capture: Move NT functions to shared file
Having them declared statically in a header included by multiple
compilation units results in duplicate functions being created.
2021-07-24 23:15:45 +02:00
Richard Stanway 2727dd96bd UI: Handle prefixes when using paths in recording format
The replay buffer and screenshot functions add a prefix to the output
filename. The code in GetFormatString assumed the format string was the
entire filename, and inserted the prefix at the beginning. This caused
illegal paths such as "Screenshot /2021/05/22-35.mkv" to be created if
the user had specified a path in the format string, resulting in lost
files.

This commit inserts the prefix before the last / character to ensure it
only affects the filename portion of the format string.

Fixes #4707
2021-07-24 22:34:44 +02:00
Richard Stanway 3dbfa4919a libobs: Add stop_audio function, change shutdown order
This fixes a crash that could occur during freeing of sources, as the
audio subsystem was destroyed before sources were released. If a source
had monitoring enabled, it would try to lock a mutex that has been
destroyed, resulting in a crash.

Freeing audio after obs_free_data was also not a solution, as the main
view is freed in obs_free_data, and the audio subsystem is still running
and trying to lock the main view channel mutex which has been freed.

This seems to be the best middle ground, making sure the audio subsystem
is stopped so it no longer tries to access the main view channel, then
freed after obs_free_data.

Fixes https://github.com/obsproject/obs-studio/issues/4409
2021-07-24 22:34:44 +02:00
Richard Stanway 8b50ad5e2a UI: Initialize Studio mode after loading scenes
Switching to Studio mode tries to duplicate the current scene, which is
null until scenes are loaded, generating various errors.
2021-07-24 22:34:44 +02:00
Richard Stanway e7df070438 decklink: Add destructor for OBSVideoFrame, initialize flags
Fixes a memory leak and potential access to undefined variable.
Detected by Coverity Scan.
2021-07-24 22:34:44 +02:00
Richard Stanway 4c8b209bf0 UI: Use larger buffer for scene collection filename
Though the maximum size of a scene name is 170 characters, after
worst-case UTF-8 expansion this could overflow the buffer, resulting
in the scene collection being "lost" as the .json extension was
truncated.

Fixes #2560
2021-07-24 22:34:43 +02:00
jpark37 31c488f0d0 decklink: Fix truncation warnings
Also simplify DeckLinkDeviceMode::IsEqualFrameRate using cross-multiply.
2021-07-23 21:37:43 -07:00
jpark37 8440a53da3 libobs: Round up chroma sizes for odd resolutions
When playing video, OBS can overflow and crash, or render video edges
incorrectly if the video resolution does not divide into 2 for trivial
chroma subsampling. This is fixed by rounding chroma plane sizes up
instead of down, and maintaining that through the video pipeline.
2021-07-23 12:02:06 -07:00
liu.haibin d6c77964c0 libobs: Fix stack buffer overflow in build_current_order_info 2021-07-20 08:46:53 -07:00
VodBox 394eab050c UI: Fix ambiguous conversion error 2021-07-20 17:34:42 +12:00
VodBox 1102e0b1ee UI: Fix formatting on window-basic-settings.cpp
A requested change on PR #4455 resulted in a formatting error that was
missed before being merged. My bad.
2021-07-20 17:24:16 +12:00
Delta a64328da56
UI: Add "18 Scenes" multiview option
Adds a "18 Scenes" multiview option. The 18 scene view leaves the
preview and program sized to the upper half of the window

Settings index in combobox may not match up with enum index. Settings
in the dropdown can now be ordered separately from the enum order.
2021-07-20 17:16:44 +12:00
Georges Basile Stavracas Neto 21a9c5b7d9 flatpak: Remove D-Bus permissions to talk to session managers
They were used to implement session inhibition, but with the new
portal-based implementation in place, they aren't necessary anymore.
2021-07-18 14:04:44 -07:00
Georges Basile Stavracas Neto 99559aab5a libobs: Add portal inhibitor
XDG Portals provide a plethora of features meant to be used inside and
outside sandboxed environments. OBS Studio currently uses portals to
implement Wayland-compatible monitor and window captures.

However, OBS Studio performs another action that can be done through
portals: inhibit the screensaver. Under the Desktop portal (the same
used by the captures mentioned above), there is an "Inhibit" portal
that provides session inhibition.

Add a new portal-based inhibitor. This inhibitor is only used when the
Desktop portal is available and running; the previous D-Bus implementation
is used in the absence of the portal. Because it's basically another set
of D-Bus operations, wrap the new portal inhibitor under the HAVE_DBUS
call too.
2021-07-18 14:04:44 -07:00
tt2468 0698eeda94 decklink: Don't show incompatible formats
Changes the formats dropdown for decklink output to only show formats
using the same framerate as OBS does. OBS cannot perform framerate
conversions, meaning that if OBS's framerate is set to 45fps, and
decklink output is set to 60fps, the output will either lag heavily
or simply not function.
2021-07-15 07:29:13 -07:00
Jim 4fad39cdc4
Merge pull request #4950 from jpark37/manual-srgb-filtering
Manual SRGB filtering
2021-07-11 09:34:45 -07:00
jpark37 bf27941f5f libobs-winrt, win-capture: Linear SRGB support
Update window, display, and game capture to always bilinear filter in
linear space, even if the source texture is not SRGB typed. This helps
resolve confusion in situations where we were filtering in nonlinear
space vs. linear space, like when toggling an empty crop filter.
2021-07-11 08:26:30 -07:00
jpark37 ebfbe1a78e libobs-opengl: Fix GS_R10G10B10A2 format 2021-07-11 08:26:29 -07:00
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