9552 Commits

Author SHA1 Message Date
jp9000
c4c5b0d21d UI: Add Group/Ungroup Undo/Redo actions 2021-05-21 18:17:09 -07:00
jp9000
64cd451def UI: Do not allow new undo actions while undo disabled 2021-05-21 18:14:59 -07:00
jp9000
008a7372d3 UI: Add OBSBasic::BackupScene() with scene param
Just a little inline helper that automatically converts it to a source
so callers don't have to manually do this each time.
2021-05-21 18:13:19 -07:00
Ryan Foster
ac59d51724 cmake: Fix Detours package name CMake warning
Since CMake 3.17, find_package_handle_standard_args (FPHSA) will emit a
warning if the package name in the caller and in FPHSA do not match.
This normalizes the name "Detours" in CMake calls to prevent this
warning.
2021-05-20 16:54:01 -07:00
jpark37
0ffcb66526 graphics-hook: Add Detours include dir 2021-05-19 19:52:49 -07:00
PatTheMav
b24faf6b33 CI: Add check for code signing credentials used by notarization 2021-05-18 20:30:51 -07:00
jpark37
924d9a7d9c win-capture: Remove D3D12 fix toggle
The new D3D12 path seems stable enough. Remove the old path.
2021-05-18 12:47:25 -07:00
jp9000
7bdd384fd5 UI: Fix hide undo/redo not working with group items
Fixes obsproject/obs-studio#4702
2021-05-17 16:34:56 -07:00
jp9000
6b2c3f4845 libobs: Add obs_group_or_scene_from_source()
Makes it a little bit easier to get a scene from either a source or
group.
2021-05-17 16:34:09 -07:00
jpark37
a05b6f7280 win-capture: Bump graphics hook version to 1.5.0 2021-05-17 02:28:11 -07:00
jpark37
c6cee82c92 graphics-hook: Try multiple D3D12 queues
Keep trying queues until one of them passes D3D11On12CreateDevice.
2021-05-17 02:28:11 -07:00
jpark37
5290326b77 graphics-hook: Do not persist device unnecessarily 2021-05-17 02:28:11 -07:00
jpark37
7439e1c4b8 graphics-hook: More logging to help debugging 2021-05-17 02:28:11 -07:00
jpark37
d9d87e6502 graphics-hook: Kill early return 2021-05-17 02:28:11 -07:00
jpark37
c160a6ff3e graphics-hook: Give up on DXGI swap chain
If a swap chain hasn't been seen in a while, assume it no longer exists,
and reset the capture.
2021-05-17 02:28:11 -07:00
jpark37
3412f6fece graphics-hook: Reduce variable scopes 2021-05-17 02:28:11 -07:00
jpark37
32f9fc120a graphics-hook: Prevent recursive free
Make sure to set data.swap to null before calling data.free().
Otherwise, we may call data.free() again in the Release() hook.
2021-05-17 02:28:11 -07:00
jpark37
b899f06877 graphics-hook: Fix potential D3D12 device leak 2021-05-17 02:28:11 -07:00
jpark37
2e7b0e3340 graphics-hook: Use Detours for D3D12 hook
Will attempt to fully use Detours after 27 ships.
2021-05-17 02:28:11 -07:00
jpark37
4de5863d07 graphics-hook: Link Detours library 2021-05-17 02:28:11 -07:00
jpark37
0c25581cd3 cmake: Add module for Detours 2021-05-17 02:28:11 -07:00
jpark37
2a3174cf9e CI: Add versioning for dependencies zip file 2021-05-17 02:28:11 -07:00
jp9000
740ff34b65 obs-vst: Remove unused code 2021-05-16 19:24:38 -07:00
Clayton Groeneveld
f4c36460c8 decklink-output-ui: Stop outputs when unloading
When closing OBS, sometimes it would crash if the Decklink outputs
were active.
2021-05-15 14:08:49 -07:00
Clayton Groeneveld
b28f99d4cd decklink-output-ui: Render texrender once per frame
To prevent rendering the texrender more than necessary, only
render it once per frame in a tick callback.
2021-05-15 14:08:49 -07:00
Ryan Foster
0a3cd9021b UI: Add versioned sources to scene collection importer
Versioned sources were added in commit
b2302902a3b3e1cce140a6417f4c5e490869a3f2 after the scene collection
importer was added in commit 191165c7210f2b8adf8756cf121341075bf16b3d.
When a versioned source gets converted in TranslateOSStudio, it can end
up with a translated "id" but an untranslated "versioned_id". When OBS
loads the resulting JSON, it will rely on the versioned_id, and rewrite
the id to the corresponding value. Use obs_get_latest_input_type_id on
the translated source id to get the correct versioned_id when using
TranslateOSStudio.
2021-05-14 20:44:19 -07:00
Ryan Foster
183fb20dde UI: Fix scene collection importer OS translation
The OS translation in the Scene Collection Importer seems to have been
broken since the feature was added because the translated sources were
not added back to the output JSON object. Add the translated sources to
the output JSON object to get the feature to work.
2021-05-14 20:44:19 -07:00
Clayton Groeneveld
e1580d12fb obs-transitions: Make sure gs calls are in graphics context
This would cause a memory leak when toggling the track matte
transition.
2021-05-14 07:43:27 -07:00
jpark37
5fcffb066e obs-filters: Fix blend state for Scale filter
Was incorrectly using straight alpha blend instead of premultiplied.
2021-05-14 01:01:05 -07:00
jpark37
9e3dfa2409 obs-filters: Premultiply alpha for precision
For Apply LUT, and Luma Key, multiply alpha in shader instead of blend
unit for extra precision.
2021-05-14 01:01:05 -07:00
jpark37
df30e3aca6 libobs: Add srgb.h to CMakeLists.txt 2021-05-13 18:31:18 -07:00
jp9000
6698638450 obs-transitions: Fix memory leak
Fixes a memory leak with stinger texrender objects. These functions must
be called while the graphics context is locked. Caught via warnings
generated by the destroy functions.
2021-05-13 15:13:07 -07:00
jp9000
8bcb2c3d42 UI: Add paste source undo/redo actions 2021-05-12 22:07:40 -07:00
jp9000
1afe092c6e UI: Add disable push/pop to undo/redo stack
This allows disabling and re-enabling in certain situations where these
actions doing so might end up being used in recursion.
2021-05-12 21:35:11 -07:00
jp9000
edc82eb7cf UI: Use "enabled" instead of "disabled" variable name
Avoids double-negative naming.
2021-05-12 21:35:03 -07:00
jp9000
b86999e133 UI: Rename enable/disable funcs for undo/redo stack 2021-05-12 21:13:56 -07:00
Neal Gompa
ae60123f7f cmake: Fix FindJack to support finding PipeWire's libjack
FindJack was not using _INCLUDE_DIRS and _LIBRARY_DIRS set by
FindPkgConfig, which prevented it from locating the PipeWire
version of libjack when it is installed to a non-standard path.

In particular, this impacts Fedora Linux, which is the first
distribution to have made the change to have all audio routed
through PipeWire and eliminate the usage of PulseAudio and JACK
by default.

Reference: https://fedoraproject.org/wiki/Changes/DefaultPipeWire
2021-05-12 18:33:16 -07:00
tt2468
ca88ba8bbc decklink: Fix crash during shutdown when output is on
The actual crash is caused because obs_module_unload() is called before
the decklink outputs are stopped. In obs_module_unload(), the deviceEnum
pointer is freed. During decklink_output_stop(), the removed code tries
to retrieve a reference of the decklink device from the deviceEnum and
crashes because it has already been freed. This code appears to serve no
purpose anyway, so we remove it.
2021-05-11 21:09:22 -07:00
Jim
055bc1d1ea
Merge pull request #4686 from jpark37/fast-image-source
Premultiply image sources on load
2021-05-11 20:27:53 -07:00
jpark37
9e092bf28e obs-filters: Fix color key distance
Was incorrectly computing distance between linear color and nonlinear
key. Make color nonlinear to match previous behavior.
2021-05-11 20:23:19 -07:00
jpark37
a8f0a27a3a libobs: Remove DrawAlphaBlend technique 2021-05-11 13:12:39 -07:00
jpark37
3ee57878a3 image-source: Premultiply images on load
This ensures correct texture filtering, simplifies the render callback,
and allows us to remove the custom draw flag, restoring the direct
rendering optimization for filters against image sources.
2021-05-11 03:44:06 -07:00
jpark37
abe1cb1425 libobs: Support premultiplying images on load
Add gs_image_alpha_mode enum for requested alpha handling: straight,
premultiplied with SRGB conversion, and just premultiplied. Both
premultiplied settings behave the same if the image is not SRGB, linear
is assumed.

Add gs_image_file3_t to store the alpha mode.

Add srgb.h file with helper functions.

Clean up vec4.h to use helpers, and remove unused functionality.

Update FFmpeg image loader to perform premultiplication on load.
2021-05-11 03:44:02 -07:00
jpark37
c1948c16b0 libobs: Fix direct rendering test
Pass test if the filter wants SRGB, and the source supports SRGB.
2021-05-11 03:08:49 -07:00
jp9000
fa3d87b770 obs-transitions: Use texrender with stacked track mattes
When using a stacked track matte stinger transition with a visibility
transition, the matte portion of video would also be visible on the
right side or below the source. This fixes it by first rendering the
video to a texrender object in order to filter out the unwanted portion.

(Jim note: So basically, track matte stingers now use two texrenders.  I
really don't like this. Texrender objects can already cause stalling as
it is.)
2021-05-11 00:58:16 -07:00
jp9000
c4e0a68641 obs-transitions: Fix track matte rendering improper sizes
When using track matte stingers as visibility transitions, it would
render the matte portion at the incorrect size. This was due to the fact
that texrender render code blocks do not set the projection matrix.
You're supposed to do that manually. Thus, it was using whatever the
current projection matrix was, which was usually the canvas projection
matrix.

(Jim note: There were reasons why I didn't make texrender objects do
this automatically, mostly scaling and performance reasons, but I
realize now I should have at least provided an option for it instead to
prevent this "gotcha" situation from happening. Bad design on my part. I
do not blame Palakis for falling for this.)
2021-05-11 00:58:16 -07:00
jp9000
d4780e061c obs-transitions: Fix annoying log message
This would cause a null pointer check log message because matte_source
only exists when using an explicit separate video for track matte
stingers. Instead, explicitly set matte_ph to null if matt_source is
null to avoid the null pointer check logging.
2021-05-11 00:58:16 -07:00
jp9000
9867b9513f obs-transitions: Only check matte duration if matte exists
The code within this block was being called even when there is no matte
source present. Caught by null pointer checks in the log.
2021-05-11 00:58:16 -07:00
jp9000
279ca988cd obs-transitions: Free matte texrender when not in use
This prevents the texrender object from lingering if the user changes
the transition properties.
2021-05-11 00:58:16 -07:00
jp9000
84b12afa5f obs-transitions: Remove unnecessary matrix push/pop
texrender objects already push/pop the matrix internally, so doing this
within a texrender rendering code block isn't necessary.
2021-05-11 00:58:16 -07:00