Commit Graph

53 Commits

Author SHA1 Message Date
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 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 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 8aa8745a3a gfx/util: Move draw_fullscreen_triangle here for consistency 2023-04-05 18:58:56 +02:00
Michael Fabian 'Xaymar' Dirks 1c7350edf7 code: Fix initialization order for constructors
Prevents some out-of-order events from occurring.
2023-04-05 18:58:40 +02:00
Michael Fabian 'Xaymar' Dirks 08544b4116 cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
Michael Fabian 'Xaymar' Dirks 0fe5c7e654 code: Don't use try-catch as function definition
This breaks MSVC and results in leaked exceptions.
2023-04-05 18:58:37 +02:00
lainon 6e1566386e project: Apply more C++ paradigms to the code
- Use auto in places where code clarity is improved or identical.
- Replace trivial constructors and destructors with default.
- Use true random for random generation.
- Use std::string_view where it is valid to do so.
- Apply const where it is valid to do so.
- Use references where it is valid to do so.
- Manually optimize memory usage with std::move and std::copy.
- Opt for memory efficient containers where the size is known ahead of time.

Signed-off-by: lainon <GermanAizek@yandex.ru>
2023-04-05 18:58:32 +02:00
Michael Fabian 'Xaymar' Dirks e3c7b13d6f obs/source-factory: Add support for OBS Studio 27.x
Also improves the functionality logic slightly to be more in line with real behavior.
2023-04-05 18:58:21 +02:00
Michael Fabian 'Xaymar' Dirks d1fdab45fc filter/transform: Fix mip-map level calculation 2023-04-05 18:51:40 +02:00
Michael Fabian 'Xaymar' Dirks 50a23799b0 filter/transform: Swap parameter names in migration code 2023-04-05 18:51:39 +02:00
Michael Fabian 'Xaymar' Dirks 29bbe22bec obs/gs/effect: Preprocess shaders to improve platform compatibility
Improves cross-platform compatibility of Shaders written for StreamFX through the use of preprocessing to make things a bit more compatible. While we don't perform any proper parsing, this will be able to prevent basic issues.
2023-04-05 18:51:38 +02:00
Michael Fabian 'Xaymar' Dirks a7faa2e445 filter/transform: Enable Anisotropic Filtering with Mip-Mapping 2023-04-05 18:51:29 +02:00
Michael Fabian 'Xaymar' Dirks 150b728419 filter/transform: Implement 'Corner Pin' mode
'Perspective' and 'Orthographic' work great if you know what the parameters were to generate the exact object position, but what if you don't know them? That is where 'Corner Pin' comes in! With it you can specify the exact location of every corner down to the micro-pixel, instead of fiddling with parameters.

Fixes #565
2023-04-05 18:51:29 +02:00
Michael Fabian 'Xaymar' Dirks e0c6e55259 filter/transform: Modernize code base for future expansion 2023-04-05 18:51:29 +02:00
Michael Fabian 'Xaymar' Dirks a40021b17b filter/transform: Migrate a number of settings for future use 2023-04-05 18:51:29 +02:00
Michael Fabian 'Xaymar' Dirks b8f23fa8ab project: Don't leak exceptions if possible 2023-04-05 18:51:13 +02:00
Michael Fabian 'Xaymar' Dirks f3a1a85340 filters/transform: Apply coding guidelines 2023-04-05 18:50:59 +02:00
Michael Fabian 'Xaymar' Dirks c84c301d49 obs/gs: Apply coding guidelines 2023-04-05 18:50:59 +02:00
Michael Fabian 'Xaymar' Dirks d62da72ce5 util: Apply coding guidelines 2023-04-05 18:50:57 +02:00
Michael Fabian 'Xaymar' Dirks 1c067b3b5d project: Apply coding guidelines 2023-04-05 18:50:57 +02:00
Michael Fabian 'Xaymar' Dirks 5a65cf3525 plugin: Replace long descriptions with "Open Manual" button
While the long descriptions were useful, keeping the updated and translated is pretty much impossible. Technology moves fast and not everyone that translates the project knows a lot about technology.

Therefore the long descriptions have now been replaced with a button that opens the wiki page for the feature instead. This should drastically reduce the number of help cases, and improve the translation coverage at the same time.
2023-03-28 13:11:20 +02:00
Michael Fabian 'Xaymar' Dirks 63a5873413 project: Remove non-standard std:: prefix from types 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks dbb71cf801 project: Code cleanup and reapply formatting
Changes applied:

* Moved utility files to /util/.
* Removed unused #includes.
* Removed unused ::ffmpeg::tools function.
* Removed unused variables.
* Fixed missing parentheses in the version macro.
* Fixed missing override on virtual function overrides and removed unnecessary virtual keyword from them.
* Disabled additional warning for ATL headers on MSVC only.
* Replaced direct printf parameters with their macro equivalent.
* Replaced C-style casts with C++-style casts.
* Applied clang-format again after an earlier change to the CMake file broke the integration for it.
2023-03-28 12:52:20 +02:00
Michael Fabian 'Xaymar' Dirks 68a49498e6 common: Rename LOG_ to DLOG_ to avoid macro confusion 2023-03-28 12:52:17 +02:00
Michael Fabian 'Xaymar' Dirks ee0a69bbf0 project: Adjust object Ids and add proxies for compatibility 2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks 49f1cbc15e project: Improve performance profiling support
Adds a new CMake option "ENABLE_PROFILING" which enables all CPU and GPU performance profiling available in StreamFX for tracking what's actually causing things to be slow.
2023-03-28 12:40:41 +02:00
Michael Fabian 'Xaymar' Dirks 4947d46aa1 gs-mipmapper: Update API usage, remove broken options and optimize
The new libOBS API allows us to directly access the underlying API instead of having to mess around in memory. By using it we can avoid crashing in case the compiler for it is different, or in case the actual back end structure changes.

Additionally the mostly unimplemented and unused options have also been removed, which streamlines the use of this class even further and reduces both shader and code complexity.

Finally by optimizing the use of the internal render target we can achieve a speed up of up to 3000% over the old way, allowing for many more mipmapped filters.
2023-03-28 12:40:40 +02:00
Michael Fabian 'Xaymar' Dirks bb21d940bf project: Fix virtual overrides not using the correct type 2023-03-28 12:40:39 +02:00
Michael Fabian 'Xaymar' Dirks d0941895ad project: Refactor into namespace streamfx 2020-04-23 00:50:39 +02:00
Michael Fabian 'Xaymar' Dirks 908d1f0a20 project: Modernize code to proper C++ 2020-04-09 00:17:25 +02:00
Michael Fabian 'Xaymar' Dirks cd5acd42f4 obs-source-factory: Add settings migration code
Previously sources had to manually implement migration code, which resulted in unresolvable regression issues due to the lack of version and commit tagging. With the new migration code, all sources automatically have this version and commit tagging at all times, and as such can now have a temporary regression fixed without the user needing to change any values manually.
2020-04-05 07:28:10 +02:00
Michael Fabian 'Xaymar' Dirks a138f95126 cmake: Fix clang support in native OBS Studio build 2020-04-05 06:50:21 +02:00
Michael Fabian 'Xaymar' Dirks e66acbeb98 filter-transform: Fix function location 2020-03-28 16:24:26 +01:00
Michael Fabian 'Xaymar' Dirks 18b3cd30bf filter-transform: Migration code for earlier stable versions
This fixes #116 which was caused by a refactor in commit efb6b0b9be. This bug was left undiscovered until users started upgrading from the last stable version to the current pre-release.
2020-03-28 16:18:17 +01:00
Michael Fabian 'Xaymar' Dirks 0b3ce10aff filter-transform: Fix discoloration issue
Previously a wrong blend state caused a slight discoloration on transparent sources, which was caused by assuming them to always be fully solid without transparency. By instead relying on OBS to do the rendering we do not have to deal with blend states as much and instead can simply enjoy the result.

Fixes #104
2020-03-07 03:43:30 +01:00
Michael Fabian 'Xaymar' Dirks 0a16ce07dc project: Merged FFmpeg Encoders Step 2 2020-01-13 22:40:15 +01:00
Michael Fabian 'Xaymar' Dirks 16347beb87 filter-*, source-*: Fix rendering of filters and duplication of sources 2019-12-17 23:52:10 +01:00
Michael Fabian 'Xaymar' Dirks d8e1c7c779 filter-transform: Restore compatibility with 24.0.3 and earlier 2019-12-14 21:32:48 +01:00
Michael Fabian 'Xaymar' Dirks efb6b0b9be filter-transform: Further refactoring 2019-12-03 18:28:42 +01:00
Michael Fabian 'Xaymar' Dirks 9b0ea98243 filter-transform: Add GPU debug markers 2019-10-18 22:42:07 +02:00
Michael Fabian 'Xaymar' Dirks 141a5efd00 filter-transform: Refactor onto obs::source_factory 2019-10-18 22:32:54 +02:00
Michael Fabian 'Xaymar' Dirks 06d9a3d2f5 filter-transform: Catch and log exceptions 2019-10-13 07:08:02 +02:00
Michael Fabian 'Xaymar' Dirks d6f1979dee project: Fix missing returns 2019-09-07 21:28:54 +02:00
Michael Fabian 'Xaymar' Dirks 5a4d38d249 project: Fix a massive list of dangerous warnings
This is a massive improvement to stability and safety when using the plugin, as all exceptions should now no longer be leaked into C controlled code, which can't actually handle exceptions at all.

Warnings fixed:

* Potentially throwing exception during library load.
* Possibly throwing function passed to C.
* Statement does nothing.
* Variable is initialized but not referenced.
* Variable overloads variable in parent scope.
2019-09-05 18:42:28 +02:00
Michael Fabian 'Xaymar' Dirks 03c704de1a project: Correct usage of exceptions and include stdexcept 2019-09-04 02:59:04 +02:00
Michael Fabian 'Xaymar' Dirks f27320c6c9 project: Remove use of P_INITIALIZER
Does not support cross-platform very well and breaks on Apple for no apparent reason.

Add resolution scale to shader filter.
2019-09-04 02:47:27 +02:00
Michael Fabian 'Xaymar' Dirks 0e350415b3 project: Apply new coding guidelines 2019-08-04 16:20:26 +02:00
Michael Fabian 'Xaymar' Dirks aac52f736d project: Clang support
Lots and lots of errors and warnings fixed with this single commit, in the name of clang support.

Related #60, #47.
2019-04-19 09:42:15 +02:00
Michael Fabian 'Xaymar' Dirks 787409b2d9 filter-transform: Fix description for Position, Rotation, Scale & Shear
This would previously incorrectly reference descriptions that don't exist, and thus not translate correctly.
2019-04-06 18:19:35 +02:00