Commit Graph

17 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks 01895c1ccc filter-dynamic-mask: Restore compatibility with 24.0.3 and earlier 2019-12-14 21:33:25 +01:00
Michael Fabian 'Xaymar' Dirks 59878b62d0 filter-dynamic-mask: Fix nonstandard use of va_start 2019-12-03 20:38:14 +01:00
Michael Fabian 'Xaymar' Dirks 4e1dcb533c filter-dynamic-mask: Rebase onto obs::source_factory 2019-12-03 20:11:27 +01:00
Michael Fabian 'Xaymar' Dirks ef5e6ac896 filter-dynamic-mask: Catch const exceptions 2019-10-13 07:08:56 +02:00
Michael Fabian 'Xaymar' Dirks b5d3131203 filter-dynamic-mask: Fix some crashy locations 2019-10-13 07:02:04 +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 82faab4380 project: Re-apply formatting 2019-09-04 03:03:41 +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 9ace96285d filter-dynamic-mask: Use snprintf instead of sprintf_s 2019-09-04 02:39:59 +02:00
Michael Fabian 'Xaymar' Dirks deeb6719c4 project: Apply formatting 2019-08-24 12:59:32 +02:00
Michael Fabian 'Xaymar' Dirks 71b223dcb5 gs-effect: Add ::create for shared_ptr and remove default constructor 2019-08-04 23:19:38 +02:00
Michael Fabian 'Xaymar' Dirks 0c447f4055 gs-effect: Use std::shared_ptr and track effect lifetime
This fixes the case where the effect vanishes, but we still hold an invalid pointer to a parameter of that effect. With the new code, the effect will not vanish as long as an effect pointer exists.

However, all effects must be created either through std::shared_ptr or std::make_shared. If they were not made through one of those means, the code will crash on the ->shared_from_this() call.
2019-08-04 23:12:30 +02:00
Michael Fabian 'Xaymar' Dirks 0e350415b3 project: Apply new coding guidelines 2019-08-04 16:20:26 +02:00
Michael Fabian 'Xaymar' Dirks c716e75ba3 project: Fix various catch-by-value locations 2019-07-27 19:57:50 +02:00
Michael Fabian 'Xaymar' Dirks 95b1e81ee5 filter-dynamic-mask: Don't crash if a texture is missing
When copying or re-ordering filters, an occasional crash can be observed due to the rendering not being possible yet. With this, it will simply revert back to the original source instead of crashing.
2019-05-28 02:51:27 +02:00
Michael Fabian 'Xaymar' Dirks 9e7894c9c3 filter-dynamic-mask: Implement Dynamic Mask filter
This filter allows the use of another source as a mask, allowing complex filter graphs and trippy effects, such as creating a text source with three animated videos, each using a different color channel as the mask.

Fixes #18.
2019-04-27 17:56:10 +02:00