9060 Commits

Author SHA1 Message Date
jpark37
18184e0175 obs-transitions: Linear SRGB, fade to color 2021-01-21 07:42:57 -08:00
jpark37
33b744270a linux-capture: Support linear SRGB
Well, linear SRGB for screen capture. The window capture path failed to
copy between SRGB textures for some reason, so just force nonlinear
formats instead.
2021-01-21 07:42:57 -08:00
jpark37
ebc22dea78 mac-capture: Support linear SRGB 2021-01-21 07:42:57 -08:00
jpark37
a311299606 win-capture: Support linear SRGB
For game capture, neither GL nor D3D9 support SRGB shared textures, so
disable linear SRGB support if the texture format doesn't support it.

Similarly, DXGI display capture doesn't work with SRGB at the moment.
Unsure if it will with more work, but disable for now.

Also force linear SRGB off if using GDI-compatible textures.
2021-01-21 07:42:57 -08:00
jpark37
015ed39923 text-freetype2: Support linear SRGB 2021-01-21 07:42:57 -08:00
jpark37
a6fc46156d obs-text: Support linear SRGB 2021-01-21 07:42:57 -08:00
jpark37
6fe33df708 libobs-winrt: Support linear SRGB
Switch away from GDI-compatible texture for SRGB support. Never needed
GDI compatibility anyway.
2021-01-21 07:42:57 -08:00
jpark37
cc452e5eda image-source: Support linear SRGB
Both image and color sources have been updated.

Also added alpha support to the color source. Useful for users, and
serves as an easy alpha blending test case.
2021-01-21 07:42:57 -08:00
jpark37
e08ad9faf3 UI: Render previews in linear sRGB space
Necessary for correct alpha blending.
2021-01-21 07:42:57 -08:00
jpark37
71bd5860ce libobs: Final downsample with SRGB formats 2021-01-21 07:42:57 -08:00
jpark37
9e66a4d1ad libobs: Deinterlace as linear SRGB when needed 2021-01-21 07:42:57 -08:00
jpark37
72efe8b942 libobs: Update render_item to enable linear SRGB
Does nothing without linear-aware modifications to sources.
2021-01-21 07:42:56 -08:00
jpark37
edbad7e93d docs/sphinx: Document SRGB changes 2021-01-21 07:42:56 -08:00
jpark37
66259560e0 libobs: Add dormant SRGB format support
GS_RGBA, GS_BGRX, and GS_BGRA now use TYPELESS DXGI formats, so we can
alias them between UNORM and UNORM_SRGB as necessary. GS_RGBA_UNORM,
GS_BGRX_UNORM, and GS_BGRA_UNORM have been added to support straight
UNORM types, which Windows requires for sharing textures from D3D9 and
OpenGL. The D3D path aliases via views, and GL aliases via
GL_EXT_texture_sRGB_decode/GL_FRAMEBUFFER_SRGB.

A significant amount of code has changed in the D3D/GL backends, but the
concepts are simple. On the D3D side, we need separate SRVs and RTVs to
support nonlinear/linear reads and writes. On the GL side, we need to
set the proper GL parameters to emulate the same.

Add gs_enable_framebuffer_srgb/gs_framebuffer_srgb_enabled to set/get
the framebuffer as SRGB or not.

Add gs_linear_srgb_active/gs_set_linear_srgb to instruct sources that
they should render as SRGB. Legacy sources can ignore this setting
without regression.

Update obs_source_draw to use linear SRGB as needed.

Update render_filter_tex to use linear SRGB as needed.

Add gs_effect_set_texture_srgb next to gs_effect_set_texture to set
texture with SRGB view instead.

Add SRGB helpers for vec4 struct.

Create GDI-compatible textures without SRGB support. Doesn't seem to
work with SRGB formats.
2021-01-21 07:42:13 -08:00
jpark37
7427272062 libobs-opengl: SRGB-safe GLSL path for raw loads
texelFetch ignores SKIP_DECODE_EXT. Replace implementation with
textureSize and textureLod.
2021-01-19 12:24:36 -08:00
Ryan Foster
54207a0d60 UI: Replace deprecated QLayout->setMargin with setContentsMargin
QLayout->setMargin has been deprecated since Qt 5.13 (though marked
obsolete since at least Qt 4.8) and removed in Qt6. It was replaced by
QLayout->setContentsMargins, which is available in all versions of Qt5.
Building against Qt 5.13+ can produce compiler warnings when using
QLayout->setMargin, and warnings are bad.

https://doc.qt.io/archives/qt-4.8/qlayout-obsolete.html
https://doc.qt.io/qt-5/qlayout-obsolete.html
d6d33f0b80
https://github.com/qt/qtbase/blame/5.15.2/src/widgets/kernel/qlayout.h
2021-01-18 19:10:31 -08:00
Richard Stanway
900b5341eb libobs: Add os_is_obs_plugin function
This function determines if something is an OBS plugin before attempting
to load it. On Windows, many plugins ship their dependent DLLs alongside
the plugin DLL, so OBS would load things like libcef.dll on startup only
to immediately free it. For other platforms, this is less of a concern
so this function is a no-op for now.

This improves startup time and reduces risk from dependent DLLs
potentially running code with unwanted side effects in DllMain.
2021-01-18 19:05:41 -08:00
Georges Basile Stavracas Neto
44ca426483 ci: Add experimental Flatpak bundle
This is a simple, isolated workflow that generates Flatpak
bundles when running on the master branch, or when a pull
request has the "Seeking Testers" label.

Based on https://github.com/marketplace/actions/flatpak-builder
2021-01-18 15:33:54 -08:00
Georges Basile Stavracas Neto
036012d329 build-aux: Add Flatpak manifest
Add a new com.obsproject.Studio.json file containing the
dependencies and permissions required by OBS Studio.

RFC: https://github.com/obsproject/rfcs/pull/21
2021-01-18 15:33:54 -08:00
gxalpha
6d01d25117 .gitignore: Remove duplicated .DS_Store 2021-01-18 15:13:03 -08:00
Matt Gajownik
6650f090d8 CI: Enable service integration in GitHub Actions 2021-01-18 21:07:56 +11:00
Mike So
f79393a727 UI: fix unable to upload and view crash report in mac 2021-01-18 01:43:09 -08:00
Ryan Foster
81c2dac75e deps: Update cmake_minimum_required to 2.8.12 2021-01-18 01:37:45 -08:00
Sefa Eyeoglu
90244212f3 obs-outputs: Use system-wide FTL if present
To support FTL, it needed to be present in-tree to be compiled. This PR
adds support for system-wide installations of libftl. It uses
pkg-config to find the system-wide installation. If pkg-config can't
provide libftl we just fall back to using the in-tree submodule. If
that's also not available it won't be included at all like before.
2021-01-17 20:07:03 -08:00
Clayton Groeneveld
968a1a6ff0 UI: Add interact button to source toolbar
This adds a interact button to the source toolbar. It is only
shown when source is interactable.
2021-01-17 20:03:08 -08:00
Clayton Groeneveld
520f1158e1 UI: Fix color of filters icon
The filters icon color was #ffffff. This changes it to #d2d2d2, the
same as the other icons.
2021-01-17 19:55:21 -08:00
Matt Gajownik
f233222412 mac-virtualcam: Make DAL plugin filename case consistent
This caused issues on case sensitive filesystems
2021-01-18 08:57:26 +11:00
Matt Gajownik
95c4db3bc6 CI: Fix CEF version for both Linux & macOS 2021-01-17 23:55:18 +11:00
Matt Gajownik
bb6b1e53f8 obs-browser: Update to 2.11.0
- macOS Browser Docks
- Virtualcam Frontend Function/Events
- Manually set default font size
- Expose reload function for browser panels
2021-01-17 20:22:44 +11:00
Andrew Tropin
fb347c3c62 UI: Add support for OBS_PLUGINS*_PATH env variables
Allow to load obs plugins from arbitary directory, specified by
OBS_PLUGINS_PATH and OBS_PLUGINS_DATA_PATH environment variables.
2021-01-16 00:26:10 -08:00
Clayton Groeneveld
e38d8f10a6 UI: Add virtual camera to system tray
Adds ability to start and stop the virtual camera from the
system tray.
2021-01-15 18:16:41 -08:00
jpark37
2e82a6c7e8 libobs-winrt: Disable WGC border on insider SDK
Functionality is coming in a future Windows update to disable the yellow
border when using WGC. Add code now to opt in. Will require SDK upgrade
later for OBS build.

winrt::apartment_type::multi_threaded is necessary to dodge assert for
calling get() on RequestAccessAsync result. Don't think I will ever
fully understand COM apartments.
2021-01-15 18:16:23 -08:00
jpark37
71d5451670 libobs-winrt: Fix potential race crash
CreateForWindow can fail if the window is destroyed.
2021-01-15 18:16:23 -08:00
Andrew
7f5013cf37 UI: Use FileNameWithoutSpace for screenshot output 2021-01-15 18:16:03 -08:00
Matt Gajownik
84fb6fc744 rtmp-services: Use official Twitch endpoint to fetch ingests 2021-01-14 09:28:21 +11:00
Hernán
92a7c12909 rtmp-services: update Piczel.tv recommended 2021-01-13 09:47:18 -08:00
Clayton Groeneveld
3bc4e8ecba obs-frontend-api: Add frontend api functions for the virtual camera
This adds functions to the frontend api to start/stop the virtual
camera, to check if it is active and adds function to get the output
reference. It also adds api events for when the virtual camera is
started or stopped.
2021-01-13 09:46:04 -08:00
Hayden McAfee
96ef45cef5 UI: Support FTL URLs for custom streaming service
Custom streaming service URLs beginning with `ftl` are handled by the
`ftl_output` plugin.
2021-01-13 09:44:52 -08:00
Matt Gajownik
46118470ab UI: Only apply passthrough DPI scaling on Windows
Fixes #4031

It seems Qt on various flavours of Linux behaves erratically when scaled,
and for the moment macOS doesn't require fractional scaling support.

This commit can be reverted when Qt fixes issues on their side.
2021-01-13 20:26:35 +11:00
Meng Li
96c7790d80 obs-ffmpeg: Always fully restart remote media sources
When a media source is set to use a URL, always fully shut down the
media when stopped. This ensures that the media will do a full
reconnect after having been stopped.
2021-01-12 19:47:44 -08:00
Roman Sivriver
7029304b32 ftl-stream: Fix reconnect loop on FTL ingest disconnect
When connection to FTL ingest is lost, ftl_event() calls
obs_output_signal_stop() to trigger a reconnect. However, during the
reconnect delay, send_thread is still waiting on send_sem semaphore.
After the delay, ftl_stream_start() is called, which in turn resets
the semaphore and creates a new send_thread. Old send_thread now exits
the loop and triggers another reconnect and the whole process repeats
again. The fix resets the semaphore in ftl_event() so the old
send_thread exits immediately.
2021-01-12 18:28:41 -08:00
clone1018
64164a1523 rtmp-services: Add Glimesh service 2021-01-12 16:43:41 -08:00
Theodore Dubois
7852efcba6 libobs: Cleanup uses of objc_msgSend in Objective-C code
Also remove use of deprecated [NSProcessInfo operatingSystem]. It always
returns the NSMACHOperatingSystem.

Also stop parsing [NSProcessInfo operatingSystemVersionString]. The
documentation explicitly says "not for parsing".
2021-01-12 10:10:37 -08:00
Jimi Huotari
41367bb2b4 UI: Fix crash when no audio backends are available
This commit prevents a crash in, for example, Linux configurations
where PulseAudio is disabled, which leads into 'mod' being 'null',
which in turn leads into a segmentation fault when an ALSA source
is selected.

Closes https://github.com/obsproject/obs-studio/issues/3485
2021-01-12 09:33:48 -08:00
Piotr Esden-Tempski
bb264b2b33 linux-v4l2: Improve error and debug logging
The capture loop errors are now logged as such.
Increased the amount of information logged in debug mode, including
state of all buffers on timeout.
Add device name to all capture loop debug output, especially useful when
debugging issues with multiple v4l2 video streams.
2021-01-12 09:33:11 -08:00
gxalpha
f1c389c365 AUTHORS: Update authors from git
Updates the AUTHORS list to the state of b5348be70
2021-01-11 17:45:01 -08:00
gxalpha
8143a084c0 .mailmap: Disambiguate many more authors
Adds all authors that are in the git shortlog multiple times, as in with multiple names and / or emails, as well as those that were authors list
2021-01-11 17:45:01 -08:00
jp9000
c390bb950d cmake: Make mac vcam optional (enabled by default) 2021-01-11 16:16:25 -08:00
Ryan Foster
461a0c5484 UI: Refactor importer to use GetUnusedSceneCollectionFile 2021-01-11 14:49:59 -08:00
Ryan Foster
9b1d1c1b3d UI: Make GetUnusedSceneCollectionFile usable elsewhere 2021-01-11 14:49:59 -08:00