Commit graph

1005 commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks
17d25f1ef0 code: Migrate filter::blur to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
1059e5c027 code: Migrate filter::dynamic_mask to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
4d913c34f5 code: Migrate filter::transform to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
8bec18600f code: Migrate filter::shader to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
cfa2806e89 code: Migrate source::shader to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
765e663180 code: Migrate filter::color_grade to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
1363b14288 code: Migrate transition::shader to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
b4e6bb57e4 code: Migrate ui::handler to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
acf4dde783 code: Migrate encoder::ffmpeg to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
66698ef938 code: Migrate obs::source_tracker to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
2f362efa38 code: Migrate configuration to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
5ed2010015 code: Migrate util::threadpool to new dynamic loader 2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
49f763aa44 code: Add a proper dynamic loader for components
This loader model should have wider compatibility, as it relies on defined C++ behavior instead of undefined preprocessor behavior. We may even be able to implement a simple dependency system that automatically sorts components into the correct order.
2023-05-14 09:14:29 +02:00
Michael Fabian 'Xaymar' Dirks
65c45c4461 code: Fix version comparison logic
This is a lot more complex that I expected it to be.
2023-05-14 06:35:36 +02:00
Michael Fabian 'Xaymar' Dirks
fa8d66b951 code: Disable useless alignment styling and update standard 2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks
0476185a65 code: Fix support for libAVCodec 59.x and beyond 2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks
81ed7241ff cmake, code: Remove Displacement Filter completely 2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks
5b2e28a723 code: Disable profiling on MacOS
This may address a nullptr crash on MacOS with several features.
2023-04-05 19:21:13 +02:00
Michael Fabian 'Xaymar' Dirks
9735e1bcec ui/obs-browser-widget: Pull in browser-panel.hpp to fix MacOS
MacOS complains that QCefWidget is an undefined type, while all other compilers are fine.
2023-04-05 19:08:31 +02:00
Michael Fabian 'Xaymar' Dirks
0fa12f1029 ui/obs-browser-widget: Switch header order to fix Qt AutoMoc bug
Qt's CMake integration does not pass the C++ standard to AutoMoc, resulting in weird parsing issues (see https://bugreports.qt.io/browse/QTBUG-73263).
2023-04-05 19:08:30 +02:00
Michael Fabian 'Xaymar' Dirks
db23069eb6 ui/obs-browser-widget: Add missing includes for Unix compilers 2023-04-05 19:08:30 +02:00
Michael Fabian 'Xaymar' Dirks
ce19d25d71 ui/obs-browser-widget: Fix bad include path for standalone builds 2023-04-05 19:08:30 +02:00
Michael Fabian 'Xaymar' Dirks
5a58aa8a6b ui/obs-browser-widget: Fix strange layout issue in Qt6
When a QCefWidget is alone and all by itself, no layout updates are performed on the "window". This causes a problem where it just stays in place, instead of moving with the rest of the elements. The fix to this appears to be to just add a different Qt widget into the layout.

Looks stupid, is stupid, but works anyway. Qt is weird.
2023-04-05 19:08:30 +02:00
Michael Fabian 'Xaymar' Dirks
3187a165ba ui/obs-browser-widget: Allow directly modifying underlying widget 2023-04-05 19:08:30 +02:00
Michael Fabian 'Xaymar' Dirks
d073889126 ui/obs-browser-widget: Prevent unwanted crashes or corruptions on Wayland
The obs-browser module does not work well on Wayland, so removing it there appears to be the best option for now.
2023-04-05 19:08:29 +02:00
Michael Fabian 'Xaymar' Dirks
dadd56b31d ui/obs-browser-widget: Integrate OBS Browser Source as a Qt Widget
Provides us with an easy and clean way to use Browser Sources as a Qt enabled widget.
2023-04-05 19:08:29 +02:00
Michael Fabian 'Xaymar' Dirks
54859e9f14 util/library: Allow loading of obs_module_t
Allows us to pass an obs_module_t into util::library::load() for cleaner code. This requires an additional flag so we don't unload a module that is still in use by libOBS.
2023-04-05 19:08:29 +02:00
Michael Fabian 'Xaymar' Dirks
5a3954ae0e project: Fix License, License headers and Copyright information
Fixes several files incorrectly stated a different license from the actual project, as well as the copyright headers included in all files. This change has no effect on the licensing terms, it should clear up a bit of confusion by contributors. Plus the files get a bit smaller, and we have less duplicated information across the entire project.

Overall the project is GPLv2 if not built with Qt, and GPLv3 if it is built with Qt. There are no parts licensed under a different license, all have been adapted from other compatible licenses into GPLv2 or GPLv3.
2023-04-05 18:59:08 +02:00
Michael Fabian 'Xaymar' Dirks
7f3ab14128 cmake, code: Remove unused files
These files are not used, and serve no purpose.
2023-04-05 18:59:05 +02:00
Michael Fabian 'Xaymar' Dirks
e8ec23c4d4 obs/source-tracker: Fix leaked source references
This functionality broke at some point in the past without anyone noticing, resulting in most dropdowns that rely on this functionality being blank.

Fixes #1025
2023-04-05 18:59:03 +02:00
tt2468
20e1a94eba util/threadpool: Initialize worker count to 0
Many platforms (and/or kernels) don't zero memory before it is acquired, resulting in uninitialized memory being used to store critical content. This made the threadpool assume it had an infinite number of threads to work with, despite actually having spawned none.

Fixes #1017
2023-04-05 18:59:03 +02:00
Michael Fabian 'Xaymar' Dirks
ad422895fa updater: Compare all parts of the version number
This should fix the case where comparing '0.12.0b164' with '0.12.0a169' results in it claiming the former is newer. Also should fix the case where stable releases would always be treated as older.

Fixes #1015
2023-04-05 18:59:02 +02:00
Michael Fabian 'Xaymar' Dirks
bc7f949c7b filter/blur: Don't increment your own reference count
Fixes #818
2023-04-05 18:58:57 +02:00
Michael Fabian 'Xaymar' Dirks
0f4f6d0485 gfx/source-texture: Don't use weak_source for strong references 2023-04-05 18:58:57 +02:00
Michael Fabian 'Xaymar' Dirks
7226fe7046 gfx/blur/box: Initialize streamfx::gfx::util 2023-04-05 18:58:56 +02:00
Michael Fabian 'Xaymar' Dirks
52afca38aa gfx/mipmapper: Move gs-mipmapper into proper directory
This is not an obs feature, so it shouldn't be in the obs directory.
2023-04-05 18:58:56 +02:00
Michael Fabian 'Xaymar' Dirks
8aa8745a3a gfx/util: Move draw_fullscreen_triangle here for consistency 2023-04-05 18:58:56 +02:00
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
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
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
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
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
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