9503 Commits

Author SHA1 Message Date
jp9000
d7e4945eab UI: Add Undo/Redo for pasting multiple filters
Closes obsproject/obs-studio#4616
2021-04-30 00:14:28 -07:00
jp9000
0fd1238d45 libobs: Add functions to backup/restore filters
Adds functions to backup and restore filters (along with their order) on
a specified source. Useful for undo/redo operations.
2021-04-30 00:11:52 -07:00
jpark37
8c513ab84c obs-filters: Fix bad math in Color Key v1
Do not treat incoming color uniform as premultiplied.
2021-04-29 13:35:50 -07:00
jp9000
6372f51bda UI: Fix missing files dialog starting hidden (macOS)
An annoying hack to fix the dialog being hidden behind the main window
when the program starts up on macOS.
2021-04-29 01:33:40 -07:00
Ford Smith
eb4dbb72c7 UI: Fix audio filter changes not being added to undo
When a change to an audio filter was done, it would create a timer and
wait for no more inputs before saving and adding to undo (this is to
prevent spam from sliders). For some reason, the timer would get
destroyed before the information is saved, preventing it from going on
the undo stack.
2021-04-29 00:14:28 -07:00
Ford Smith
92745a1009 UI: Fix audio filters being deleted not getting added to undo 2021-04-29 00:14:28 -07:00
Ford Smith
732c2c7e9e UI: Fix undo/redo enabling redo with no items in redo 2021-04-29 00:14:28 -07:00
jpark37
607ee098c5 obs-filters: Handle premultiplied alpha input
Mostly by converting to straight alpha in shader when necessary.
2021-04-28 18:09:52 -07:00
jpark37
a44e09f2e4 libobs: Don't force premultiplied alpha on filters
Many filters need to remultiply alpha on output.
2021-04-28 18:09:52 -07:00
Bilal Elmoussaoui
2d315331d6 CI: Use a stable version of the Flatpak action 2021-04-28 20:40:16 -04:00
jp9000
0d482be14a UI: Use std::bind for visibility undo/redo action
This is better and slightly more optimal code over what it was before.
2021-04-27 21:31:07 -07:00
jp9000
20bbc9794d UI: Add Undo/Redo for volume change/mute via main fader 2021-04-27 21:09:41 -07:00
jp9000
cec8061d83 UI: Add Undo/Redo items for adv. audio properties
Rather than forcing the user to close the advanced audio properties
window in order to obtain an undo/redo action, use explicit undo/redo
actions for each widget change in the advanced audio properties dialog.
2021-04-27 21:08:08 -07:00
jp9000
ae5ac8fa82 UI: Add repeat protection for Undo/Redo
This allows the ability to mark an action as repeatable, which when set,
makes it so that it will change only the redo value for the last undo
item in the undo stack within the last three seconds. This allows the
ability to, for example, scroll a spinbox or change a slider value
without creating many unnecessarily duplicated undo/redo actions.
2021-04-27 20:45:43 -07:00
jp9000
78f1983f7d UI: Remove unnecessary Undo/Redo cleanup func
Since fixing the reference holding issue with scene/source deletion, the
undo/redo cleanup function (last param of add_action) is no longer
required.
2021-04-27 20:45:43 -07:00
Ryan Foster
8946f02270 obs-filters: Use correct branding for NVIDIA Noise Removal
The feature name is "Noise Removal" with that exact capitalization.
"NVIDIA Noise Removal" or "Noise Removal, powered by NVIDIA Broadcast"
are the two valid options for displaying this feature name in the UI.
2021-04-27 15:29:08 -04:00
Clayton Groeneveld
c497342fd6 UI: Cleanup on_scenes_currentItemChanged function
Removed unnecessary lines from the function. Also if the source happened to be
null, the SetCurrentScene function would be called anyway. Finally, the
UpdateContextBar and api lines were removed, as they are also being called with
SetCurrentScene.
2021-04-27 01:24:50 -07:00
jp9000
387a2c5f3e UI: Add undo/redo actions for move up/down/top/bottom
Fixes obsproject/obs-studio#4567
2021-04-26 10:52:28 -07:00
Jim
81e9ad818f
Merge pull request #4587 from jpark37/alpha-hack
Apply alpha in nonlinear space for images and async video
2021-04-25 11:26:21 -07:00
jpark37
1f972a066c text-freetype2: Render in nonlinear space
Colors not working properly. Don't want to alter gradients (yet).
2021-04-25 11:10:33 -07:00
Jim
9b38bac480
Merge pull request #4573 from jpark37/nonlinear-transitions
Switch transition interpolation back to nonlinear SRGB
2021-04-25 11:09:57 -07:00
Richard Stanway
61964d519c obs-filters: Check NVAFX is enabled before using mutexes
Fixes a crash on destroy if NVAFX wasn't actually available.
2021-04-25 19:51:20 +02:00
tt2468
cb6a381823 libobs: Fix crash in missingfiles when source is invalid 2021-04-25 09:36:50 -07:00
pkv
a5fab92d6f obs-filters: Better describe denoiser methods in menu
The description of the noise suppression methods was updated to
reflect cpu usage and quality in a more accurate manner.
2021-04-25 09:34:45 -07:00
pkv
535f4765ff obs-filters: RTX denoiser, initialize only output channels
This reduces the initialization from 8 to the actual number of output
channels.
2021-04-25 09:24:07 -07:00
Richard Stanway
64c353c019 obs-filters: Initialize NVIDIA AFX in a thread
Initializing NVAFX is slow as it has to load large models and can cause
significant impact to OBS' startup time. This moves NVAFX initialization
into a separate thread. NVAFX does not appear to be reentrant across
threads, hence a global mutex is also used to avoid reentrancy issues.

The downside of this change is that the first few seconds of audio after
adding the filter or starting OBS will not be filtered, but this is
unlikely to cause any real-world issues.
2021-04-25 09:24:07 -07:00
jpark37
b911e9b0cc image-source: Use DrawNonlinearAlpha
Match previous OBS alpha behavior.

DrawNonlinearAlpha requires premultiplied alpha blend state.
2021-04-25 02:13:34 -07:00
jpark37
aed52412d4 libobs: Render async video with DrawNonlinearAlpha
Match previous OBS alpha behavior.

DrawNonlinearAlpha requires premultiplied alpha blend state.
2021-04-25 02:13:01 -07:00
jpark37
50dfa566e6 libobs: Filter using premultiplied alpha
Convert incoming straight alpha color to premultiplied at filter begin,
and process premultiplied value at filter end.

If direct rendering is allowed, we assume the input source outputs
premultiiplied alpha. If not, that source will need to be updated.
2021-04-25 01:27:19 -07:00
jp9000
2a63d60d23 docs: Fix erroneous code example 2021-04-24 23:17:58 -07:00
jpark37
840e2b3d43 libobs: Add DrawNonlinearAlpha technique
This allows OBS to mimic other programs that incorrectly use alpha.

Requires premultiplied blend state.
2021-04-24 17:18:42 -07:00
jp9000
59603f47ad UI: Use scene backup/undo/redo funcs for reordering
Fixes a bug where groups would not be backed up properly
2021-04-23 12:40:33 -07:00
jp9000
f1c120df2e UI: Refactor scene action undo/redo
Allows this code to be used for other actions where the scene data needs
to be backed up
2021-04-23 12:39:32 -07:00
jp9000
74c2379eba libobs: Add obs_data_get_last_json()
Helper function to return the last generated json string for this
object.
2021-04-23 12:38:50 -07:00
jpark37
a5cef2513b obs-transitions: Nonlinear SRGB, swipe
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37
8c826f5bc3 obs-transitions: Nonlinear SRGB, slide
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37
62bd3854f8 obs-transitions: Nonlinear SRGB, luma wipe
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37
8e2096f621 obs-transitions: Nonlinear SRGB, fade
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37
6124a373f6 obs-transitions: Nonlinear SRGB, fade to color
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jp9000
00fdec2493 UI: Add missing locale text for reorder undo/redo 2021-04-21 00:13:21 -07:00
jp9000
4188899194 UI: Add undo/redo for source reordering 2021-04-20 19:38:53 -07:00
jp9000
dde4d57d72 UI: Fix imported scene collection names duplicating
If an imported scene collection has a name that already exists, it will
instead be given a name plus an increment (e.g. "name 2", or "name 3",
etc)

Fixes obsproject/obs-studio#4442
2021-04-20 00:17:34 -07:00
VodBox
b5596cbf61 rtmp-services: Update Twitter.com 2021-04-20 13:47:27 +12:00
Joe Flateau
e9b80235b4 rtmp-services: Add Luzento.com 2021-04-20 13:34:05 +12:00
Stéphane Lepin
dc2b00a4dd obs-transitions: Crop output of stinger media player
This fixes an issue with Track Matte Stingers applied as visibility
transitions, where the side-by-side or stacked matte file mode would
result in the matte part of the video to "overflow" outside of the
transition's zone
2021-04-18 18:05:07 -07:00
Stéphane Lepin
661256e6de obs-transitions: Remove scaling of track matte texture 2021-04-18 18:05:07 -07:00
SCG82
d3ee5dfb9f UI: Delete unimplemented declaration, LoadProfile() 2021-04-18 17:46:20 -07:00
Bilal Elmoussaoui
757f917ed1 CI: Use flatpak-builder subaction
The Flatpak action now contains two subactions:

- flatpak-builder: for building and uploading a bundle
- flat-manager: for deploying the bundle to a remote repository

Use the right action (flatpak-builder) for the Flatpak workflow.
This won't affect existing pull requests, except the ones that
have the "Seeking Testers" label applied - in which case, they
simply need to rebase against the master branch.
2021-04-18 17:37:05 -07:00
gxalpha
3efc3dbb0f CI,cmake: Fix macOS version information
Fixes an issue where on macOS the app’s Info window in Finder would say
"Version: OBS - Free and Open Source Streaming/Recording Software"
instead of the version set in CFBundleShortVersionString.

Since CFBundleGetInfoString is deprecated anyways, it can safely be
removed.
2021-04-18 17:30:31 -07:00
Georges Basile Stavracas Neto
7a87777225 linux-v4l2: Use flatpak-spawn when inside a Flatpak sandbox
It is not possible to run host system executables like modinfo, pkexec,
and modprobe inside a Flatpak sandbox. However, Flatpak provides a way
to run command on the host system: the flatpak-spawn executable.

flatpak-spawn is a tiny helper that, when executed with the '--host'
parameter, talks to the org.freedesktop.Flatpak D-Bus interface to run
and retrieve the return value of the executable. This provides OBS Studio
a way to escape this sandbox limitation without opening large holes in
the sandbox.

Make v4l2's implementation of VirtualCam run system commands using
flatpak-spawn when inside a Flatpak sandbox. The detection of the sandbox
is done by checking the existence of the /.flatpak-info file, which is
created by Flatpak itself, and only exists inside the sandbox. If OBS
Studio is not running inside a Flatpak sandbox, run the exact same command
it used to run before this commit.

Add the permission to talk to the org.freedesktop.Flatpak D-Bus interface
to the Flatpak manifest, so we can run flatpak-spawn with the '--host'
parameter.

Notice that the same constraints apply with and without Flatpak: the host
system needs to have the v4l2loopback kernel module available for the v4l2
implementation of VirtualCam to work.
2021-04-18 17:27:33 -07:00