Commit graph

1633 commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks
9b8ef5ac74 gfx/util: Rename debug to util(ity)
They may be useful for debugging, but they are still utilities.
2023-04-05 18:58:55 +02:00
Michael Fabian 'Xaymar' Dirks
c18c5e457a project: Improve templates and UX 2023-04-05 18:58:55 +02:00
Michael Fabian 'Xaymar' Dirks
6f742da524 plugin: Only initialize GLAD on OpenGL graphics backend 2023-04-05 18:58:54 +02:00
Michael Fabian 'Xaymar' Dirks
2577622dbe filter/dynamic-mask: Replace rendering code and optimize storage
The rendering code here was one of the older code bases, which was riddled with bugs and leaks. The new code doesn't look pretty, but it works for the time being until a better solution is found or made. It should be able to handle HDR inputs now, but it may not be completely correct yet. This also fixes the double-free bug.

As an additional improvement, I've moved the allocation of the effect to a shared class which should reduce the memory usage slightly when multiple effects are in play. And now selecting nothing selects the filter target itself without infinitely adding references to the filter. Good enough in my eyes.

Fixes #819
2023-04-05 18:58:54 +02:00
Michael Fabian 'Xaymar' Dirks
5b978a20e0 obs/source-factory: Add support for color spaces 2023-04-05 18:58:54 +02:00
Michael Fabian 'Xaymar' Dirks
15eaec2e09 obs/gs/rendertarget: Add support for color spaces 2023-04-05 18:58:53 +02:00
Xaymar
596841e6f8 locale: New Crowdin updates (#932)
* New translations en-US.ini (Danish)

* New translations en-US.ini (Spanish)

* New translations en-US.ini (Korean)

* New translations en-US.ini (Korean)

* New translations en-US.ini (Japanese)
2023-04-05 18:58:53 +02:00
Michael Fabian 'Xaymar' Dirks
c0967e9252 encoder/ffmpeg: Remove usage of avcodec_close
This functionality has been deprecated by FFmpeg.
2023-04-05 18:58:53 +02:00
Michael Fabian 'Xaymar' Dirks
4236c28c58 ffmpeg/hwapi/d3d11: Only Release() the immediate ID3D11DeviceContext once
While this had no actual effect due to the immediate ID3D11DeviceContext being tied to the ID3D11Device itself, it shouldn't have occured at all. With this there should now only be a single Release() call for every AddRef() call.
2023-04-05 18:58:53 +02:00
Michael Fabian 'Xaymar' Dirks
0b23d28164 ffmpeg/hwapi/d3d11: Remove double unref 2023-04-05 18:58:52 +02:00
Michael Fabian 'Xaymar' Dirks
79bd387972 templates/windows/installer: Don't offer path selection for System & User mode
The location for System-wide and User-only installation depend on Windows-managed locations, which means that they will never require a user to select the correct location. Therefore it is best to hide the page in all modes except for Portable, which should still offer a path to extract to.
2023-04-05 18:58:52 +02:00
Michael Fabian 'Xaymar' Dirks
0390fbb05f templates/windows/installer: Default to appending default directory name 2023-04-05 18:58:52 +02:00
Michael Fabian 'Xaymar' Dirks
79e736bc75 templates/windows/installer: Opt for built-in Registry functions 2023-04-05 18:58:51 +02:00
Michael Fabian 'Xaymar' Dirks
53ceddd784 cmake, templates: Remove code signing integration
Time has unfortunately broken this integration beyond the point of usefulness.
2023-04-05 18:58:51 +02:00
Michael Fabian 'Xaymar' Dirks
df12d2fb80 templates/windows/installer: Add command line flag for portable installation
Users of the Installer can now specify the `/Portable` flag in addition to other flags to install as Portable.
2023-04-05 18:58:51 +02:00
Michael Fabian 'Xaymar' Dirks
761f741c56 templates/windows/installer: Don't create Icons in Portable mode 2023-04-05 18:58:50 +02:00
Michael Fabian 'Xaymar' Dirks
39dc1fa5e1 configuration: Save after some time has passed
Prevents data loss after 100ms have passed, which should improve the saving situation.

Fixes #805
2023-04-05 18:58:50 +02:00
Michael Fabian 'Xaymar' Dirks
589f6c4018 plugin: Finalize threadpool after configuration 2023-04-05 18:58:50 +02:00
Michael Fabian 'Xaymar' Dirks
825f93fb24 cmake: Disable pointless structure padding warning 2023-04-05 18:58:49 +02:00
Michael Fabian 'Xaymar' Dirks
fddf21b8de util/threadpool: Optimize for dynamic thread pooling
While the previous approach of a static thread pool worked, it was sub-optimal in its resource usage. Many of the threads would never see a single task, and simply permanently sleep. This seems like a good idea, except that sleeping threads still end up in the scheduler, and thus waste a tiny amount of resources.

It is better to instead dynamically spawn threads when needed and only keeping the bare minimum around all the time. These dynamically spawned threads are also explicitly set to background priority which further reduces scheduling overhead. Finally optimizing the memory layout to prevent unwanted false sharing should also keep sporadic wake ups at a minimum.

This new model should be able to handle many more tasks than ever before, but is still not as optimal as it could be.
2023-04-05 18:58:49 +02:00
Xaymar
a7d15c7e60 locale: New Crowdin updates (#928)
* New translations en-US.ini (Russian)

* New translations en-US.ini (Italian)

* New translations en-US.ini (Russian)

* New translations en-US.ini (Danish)

* New translations en-US.ini (Polish)

* New translations en-US.ini (Portuguese, Brazilian)

* New translations en-US.ini (Portuguese, Brazilian)
2023-04-05 18:58:49 +02:00
Michael Fabian 'Xaymar' Dirks
6701263e10 templates/windows/installer: Add current user installation method
Thanks to the PR by @abcdw (https://github.com/obsproject/obs-studio/pull/4067) we can support 'local user' installations. These will allow end users to install StreamFX without requiring Administrator rights, or learning how to use OBS Studio in portable mode.
2023-04-05 18:58:48 +02:00
Michael Fabian 'Xaymar' Dirks
3ce695bccc templates/windows/installer: Install System-wide installations to ProgramData
With OBS Studio 0.15.0 came a better location for plugins to install to, which solves many of the current issues. While this location still requires Administrator rights to write to, it is a much safer location than writing directly into the OBS Studio installation directory.
2023-04-05 18:58:48 +02:00
Michael Fabian 'Xaymar' Dirks
12c9fe51fb templates/windows/installer: Enable split binary and data installation
This is not something InnoSetup is designed for, but hey, it does work!
2023-04-05 18:58:48 +02:00
Michael Fabian 'Xaymar' Dirks
63540faf3d templates/windows/installer: Formatting 2023-04-05 18:58:48 +02:00
Michael Fabian 'Xaymar' Dirks
c9239405e2 templates/windows/installer: Don't warn about existing directories
Also don't append default directory name if possible.
2023-04-05 18:58:48 +02:00
Michael Fabian 'Xaymar' Dirks
a15d2d3c89 templates/windows/installer: Always show install directory selection 2023-04-05 18:58:48 +02:00
Michael Fabian 'Xaymar' Dirks
242a5dcac2 templates/windows/installer: Extract uninstaller to portable installations
It is now possible to properly uninstall StreamFX from portable installations, without any registry being necessary.
2023-04-05 18:58:47 +02:00
Michael Fabian 'Xaymar' Dirks
454f8eff83 templates/windows/installer: Check for the correct Mutexes 2023-04-05 18:58:47 +02:00
Xaymar
588316e3f1 locale: New Crowdin updates (#915)
* New translations en-US.ini (Danish)

* New translations en-US.ini (Chinese Simplified)

* New translations en-US.ini (Chinese Simplified)
2023-04-05 18:58:47 +02:00
Michael Fabian 'Xaymar' Dirks
a0d60e751b encoder/handler/dnxhd: Use endian-independent formats 2023-04-05 18:58:46 +02:00
Michael Fabian 'Xaymar' Dirks
50919e1a49 encoder/handler/prores_aw: Don't enable Key-Frame options 2023-04-05 18:58:46 +02:00
Michael Fabian 'Xaymar' Dirks
b46e771a81 ffmpeg/tools: Add support for HDR formats
This allows for HDR formats to be encoded by FFmpeg encoders.
2023-04-05 18:58:46 +02:00
Michael Fabian 'Xaymar' Dirks
7296bbc16b encoder/ffmpeg: Improve software scaling quality
Might be better to allow end-users to choose swscale quality, if they deem it necessary.
2023-04-05 18:58:46 +02:00
Michael Fabian 'Xaymar' Dirks
b55e4b283b encoder/ffmpeg: Add split framerate with integer fractions
It seems to be possible to encode with a different framerate than what libOBS is configured for. While technically any framerate appears to be possible, it is currently limited to integer fractions only in order to make the implementation much easier. Integer fractions only require skipping N frames and multiplying the denominator by N, where N is the configured integer. For sanity reasons, the limit of N is currently 10.

This allows power users to split their streaming and recording framerates with relative ease, and opt for things such as:
- 30 FPS (1/4) streaming with 120 FPS (1/1) recording.
- 30 FPS (1/10) streaming with 300 FPS (1/1) recording.
- 30 FPS (1/10) streaming with 100 FPS (1/3) recording.
- and so on.
While some of these combinations are just stupid, they are now available to power users.
2023-04-05 18:58:45 +02:00
Michael Fabian 'Xaymar' Dirks
bbac990644 encoder/ffmpeg: Assume extra data and sei are present on first frame
While this may break some unusual encoders that require additional frames for extra data or sei data to be present, it fixes the problem where encoders would never record at all. May need to look into a different solution in the future.

Fixes #911
2023-04-05 18:58:45 +02:00
Romain Vigier
3d293bac6a cmake: Require nlohmann-json when building the front-end
Nlohmann-json is used in the about dialog, yet wasn't required when building the front-end, leading to failing compilation. This ensures that it is correctly required.
2023-04-05 18:58:45 +02:00
Michael Fabian 'Xaymar' Dirks
bfd8155ddc templates: Prefer per-user installations on MacOSX
With OBS Studio 28.0 comes another restriction: Per-User Plugins. This is currently only enforced on ARM64, but may soon be enforced on all architectures. Adjusting the Packages installer to generate the correct files is relatively easy.

Unfortunately the MacOS Package Installer has some problems figuring out if it should show the user the correct step or not, and may even ignore our settings entirely. This bug has been first reported in 2010, and has since then been re-reported in 2016, 2017, 2018, 2019, and 2020 where it was finally turned into a community wiki on StackOverflow.
2023-04-05 18:58:45 +02:00
Michael Fabian 'Xaymar' Dirks
2451c8418e templates: Add error message if MacOSX is below 10.15 2023-04-05 18:58:44 +02:00
Michael Fabian 'Xaymar' Dirks
d4ef043043 cmake: Export Loadable Bundles on MacOS
With OBS Studio 28.0.0 a new requirement was added to MacOS plugin: Loadable Bundles. These bundles are similar to Application Bundles, and have many of the same features, but are designed to be loaded by Applications instead of being the Application. This allows for almost all of the advantages to persist, with some minimal drawbacks.
2023-04-05 18:58:44 +02:00
Michael Fabian 'Xaymar' Dirks
e3d0cabb09 cmake: Always show templates for all architectures 2023-04-05 18:58:43 +02:00
Michael Fabian 'Xaymar' Dirks
c750fa9a5c cmake: Use @rpath on MacOS
This removes the additional patch steps after building, and are more stable across architectures.
2023-04-05 18:58:43 +02:00
Michael Fabian 'Xaymar' Dirks
9adc49b164 templates: Move MacOS-only files into dedicated folder 2023-04-05 18:58:43 +02:00
Michael Fabian 'Xaymar' Dirks
4382ad469f templates: Move Windows-only files into dedicated folder 2023-04-05 18:58:42 +02:00
Michael Fabian 'Xaymar' Dirks
7f1ae7f9f1 cmake: Require MacOSX 10.15 or newer 2023-04-05 18:58:42 +02:00
Michael Fabian 'Xaymar' Dirks
f40c7a9906 cmake: Automatically discover data files
Prevents missing data due to it not being in the PROJECT_DATA variable. Bit of a hacky solution, but you gotta do what you gotta do to fix it.
2023-04-05 18:58:42 +02:00
Michael Fabian 'Xaymar' Dirks
a66b46965e cmake: Add media files to IDE projects
These files should be ignored as they have the HEADER_FILE_ONLY flag set.
2023-04-05 18:58:42 +02:00
Xaymar
630600fd96 locale: New Crowdin updates (#907)
* New translations en-US.ini (Portuguese)

* New translations en-US.ini (Portuguese)

* New translations en-US.ini (Italian)

* New translations en-US.ini (Chinese Simplified)

* New translations en-US.ini (Swedish)

* New translations en-US.ini (Turkish)

* New translations en-US.ini (Indonesian)

* New translations en-US.ini (Portuguese)

* New translations en-US.ini (Estonian)

* New translations en-US.ini (Polish)

* New translations en-US.ini (Portuguese, Brazilian)

* New translations en-US.ini (Greek)

* New translations en-US.ini (Romanian)

* New translations en-US.ini (French)

* New translations en-US.ini (Spanish)

* New translations en-US.ini (Bulgarian)

* New translations en-US.ini (Czech)

* New translations en-US.ini (Danish)

* New translations en-US.ini (German)

* New translations en-US.ini (Finnish)

* New translations en-US.ini (Hungarian)

* New translations en-US.ini (Japanese)

* New translations en-US.ini (Dutch)
2023-04-05 18:58:41 +02:00
Xaymar
e59660a18f locale: New Crowdin updates (#897)
* New translations en-US.ini (Chinese Simplified)

* New translations en-US.ini (Chinese Simplified)

* New translations en-US.ini (Japanese)
2023-04-05 18:58:41 +02:00
Michael Fabian 'Xaymar' Dirks
78e5c10a74 code: Fix GCC warning diagnostic pragmas 2023-04-05 18:58:41 +02:00