Commit Graph

507 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks baf265fd5b obs-signal-handler: Fix possible crash 2020-02-14 07:31:30 +01:00
Michael Fabian 'Xaymar' Dirks 326fa68d9f obs-signal-handler: Helper classes for signals and audio 2020-02-14 07:30:46 +01:00
Michael Fabian 'Xaymar' Dirks 42c9375333 obs-tools: Fix obs::tools::child_source not checking return value 2020-02-14 07:29:31 +01:00
Michael Fabian 'Xaymar' Dirks fb5041a69d util-event: Ensure thread safety 2020-02-14 07:28:57 +01:00
Michael Fabian 'Xaymar' Dirks 5d38ca8a74 ffmpeg-encoder/nvenc: Various additional default states 2020-02-13 11:19:30 +01:00
Michael Fabian 'Xaymar' Dirks 40369bf72d obs-tools: Add child_source helper class 2020-02-13 10:34:26 +01:00
Michael Fabian 'Xaymar' Dirks 53d4ad31e6 source-mirror: Remove useless group 2020-02-13 05:18:28 +01:00
Michael Fabian 'Xaymar' Dirks a47dbaefc8 source-mirror: Remove scaling and caching
Scaling shouldn't be part of the Source and instead should be done as a filter. Not only does supporting it drastically increase code complexity, it also doesn't add anything that is really necessary as you can do everything it did better in an actual transform.

Caching wasn't actually used except for scaling and was mostly broken too, causing flickering.
2020-02-13 05:17:06 +01:00
Michael Fabian 'Xaymar' Dirks c6a1edf46f util-event: Fix and cleanup 2020-02-13 05:09:14 +01:00
Michael Fabian 'Xaymar' Dirks f8ee95d71c obs-*: Cleanup 2020-02-13 05:09:14 +01:00
Michael Fabian 'Xaymar' Dirks 5956a6f7a9 ffmpeg-encoder/nvenc: Add AUD and DPB Size options 2020-01-15 13:43:33 +01:00
Michael Fabian 'Xaymar' Dirks 98c7a2e379 ffmpeg-encoder/nvenc: Fix typo 2020-01-15 05:53:54 +01:00
Michael Fabian 'Xaymar' Dirks 34b2859dac ffmpeg-encoder/nvenc: Add minimum bitrate, fix target quality and more
Adds support for specifying Minimum Bitrate directly in the UI instead of requiring custom settings to do so. Additionally Adaptive I/B-Frames are now only shown if Look-Ahead is a value greater than 0 frames.

Quality Minimum can also now be left at a default value of -1, the Quality group is no longer toggleable and Quality Target moved into the group. Settings options on the context is now searching children too (if there are any).

Finally, some C++17 formatting was done.

Fixes #101
2020-01-15 05:50:31 +01:00
Michael Fabian 'Xaymar' Dirks 5d5a104819 ffmpeg-encoder: Improve UI, fix acceleration encode, etc 2020-01-15 03:59:03 +01:00
Michael Fabian 'Xaymar' Dirks 96ac0bd11b ffmpeg-encoder: Fix weird bug with std::map crashing in constructor 2020-01-14 10:36:04 +01:00
Michael Fabian 'Xaymar' Dirks 109b1c9b0f ffmpeg-encoder: Fix incorrect call 2020-01-14 10:03:42 +01:00
Michael Fabian 'Xaymar' Dirks a72eba6ded ci: Remove Node.JS requirement 2020-01-14 09:31:41 +01:00
Michael Fabian 'Xaymar' Dirks 8df90dfda8 ffmpeg-encoder: Fix handler detection 2020-01-14 02:15:05 +01:00
Michael Fabian 'Xaymar' Dirks 14d05ccdac plugin: Enable FFmpeg Encoders 2020-01-14 01:55:31 +01:00
Michael Fabian 'Xaymar' Dirks b306cebd6b project: More warnings fixed 2020-01-14 01:39:13 +01:00
Michael Fabian 'Xaymar' Dirks ebc50dcefe utility: Merge util-math and util-memory 2020-01-14 01:11:08 +01:00
Michael Fabian 'Xaymar' Dirks 1987bfb853 ffmpeg-encoder: Fix some warnings 2020-01-14 01:04:49 +01:00
Michael Fabian 'Xaymar' Dirks a33dd83d72 project: Merged FFmpeg Encoders Step 3 2020-01-13 23:40:08 +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 3eea289679 project: Merged FFmpeg Encoders Step 1 2020-01-13 01:52:30 +01:00
Michael Fabian 'Xaymar' Dirks 3062d3b331 gfx-shader: Better logging, and ViewSize parameter 2020-01-01 04:21:02 +01:00
Michael Fabian 'Xaymar' Dirks 3e02857d39 gfx-shader-param: Initialize all variables 2020-01-01 02:59:02 +01:00
Michael Fabian 'Xaymar' Dirks 26a58645a7 gfx-shader-param-basic: Support for scaling and fix enumerations
Scaling is now fully supported for Floats and Integers, which allows much higher precision inputs, or upscaling to a different range. Complex functions for scaling are not supported as those would be a scripting thing and should be kept as that (OBS Studio has built in Lua scripting).

Additionally, enumerations are now correctly loaded with data.

Related #5
2020-01-01 02:58:45 +01:00
Michael Fabian 'Xaymar' Dirks ce15bc6abc gfx-shader-param: Fix is_visible 2019-12-25 20:10:09 +01:00
Michael Fabian 'Xaymar' Dirks f79502b9b0 gfx-shader: Deal with remaining compile errors 2019-12-25 19:18:44 +01:00
Michael Fabian 'Xaymar' Dirks 731a22e1ea gfx-shader-param-basic: Automatically resize min/max/step/scale buffers 2019-12-25 19:10:56 +01:00
Michael Fabian 'Xaymar' Dirks 975d2e293e gfx-shader-param-basic: Add Integers, Enumerations, Arrays 2019-12-25 19:10:01 +01:00
Michael Fabian 'Xaymar' Dirks 903d416607 gfx-shader-param: Fix get_parameter 2019-12-25 19:09:30 +01:00
Michael Fabian 'Xaymar' Dirks 17ee2d713c gs-effect-parameter: Implement copy and move 2019-12-25 19:09:13 +01:00
Michael Fabian 'Xaymar' Dirks 1902d005e9 gfx-shader-param: Add support for automatic parameters
Allows other parameters to be a seed to these parameters.
2019-12-25 10:14:04 +01:00
Michael Fabian 'Xaymar' Dirks 907216f143 gfx-shader: Don't show parameters that are invisible 2019-12-25 10:10:06 +01:00
Michael Fabian 'Xaymar' Dirks 4acbfedd40 gfx-shader-param: Support for input, slider, enum and more 2019-12-25 10:09:56 +01:00
Michael Fabian 'Xaymar' Dirks 777556f4f6 gfx-shader-param: Vastly improve parameter functionality
Allow for overriding type and size of an element, opening the path for `int#[]`, `float#[]`, `int#x#`, `float#x#`, `bool#x#`, `vector<type, #>` and `matrix<type, #, #>`. Also allows for specifying the exact type of texture instead of hoping the user gets it right, as well as samplers.

Parameters are also now created if they are invisible, which means that the properties() function must not be called, but they must still be used like any other. This is due to a problem with default values not being applied all the time, and sometimes just vanishing.

The code also now throws exceptions with reasonable text, which should be caught by the gfx::shader implementation and refuse a load of the effect. No other state should be modified at that point, so care must be taken that up until the moment the complete initialization is done no other state is modified.
2019-12-24 22:02:37 +01:00
Michael Fabian 'Xaymar' Dirks eab3ae4fbc gfx-shader-param: Add support for order and overall name/desc 2019-12-24 08:38:01 +01:00
Michael Fabian 'Xaymar' Dirks 9696f836e0 gfx-shader: Fix startup and select crash if file is missing 2019-12-24 08:37:37 +01:00
Michael Fabian 'Xaymar' Dirks 3018c9b9ea project: Version 0.8.0a1 2019-12-22 08:31:00 +01:00
Michael Fabian 'Xaymar' Dirks 4c5a7018a3 gfx-shader: Add file watching and dynamic UI updates
Thanks to the workaround in obs::tools, gfx::shader::shader now supports dynamically rebuilding the properties with new properties without crashing OBS Studio. This effectively allows you to have an up to date view of the current parameters for the shader technique.

Additionally with file watching, live development of shaders is possible at very little cost. Currently only file times and size is looked at every 333ms, but in the future it is possible to also watch for file renames and more.
2019-12-22 06:14:26 +01:00
Michael Fabian 'Xaymar' Dirks bd6b4f2d2a gfx-shader-param-basic: Add support for defaults function 2019-12-22 06:07:54 +01:00
Michael Fabian 'Xaymar' Dirks 672c6d39af gfx-shader-param: Split setting defaults from properties 2019-12-22 06:07:37 +01:00
Michael Fabian 'Xaymar' Dirks 1ff6c0cf41 obs-tools: Add work around for property memory corruption
The current implementation of obs_properties_remove_by_name corrupts the obs_properties_t object whenever it is called on the first or last property in the list. This leads to rapid unscheduled disassembly, and therefore must be fixed in order for this function to be used.

Fixed by upstream PR https://github.com/obsproject/obs-studio/pull/2257.
2019-12-22 06:07:07 +01:00
Michael Fabian 'Xaymar' Dirks 9ef60cc2f9 gfx-shader: Add support for validating file differences
Removes the stutter when re-opening the properties dialog which was caused by recompiling the same exact shader every time this happened. Also paves the way for simple file watching.
2019-12-21 18:23:26 +01:00
Michael Fabian 'Xaymar' Dirks 2faa68f9be gs-effect: Pass unmodified parameters as const reference 2019-12-21 18:20:36 +01:00
Michael Fabian 'Xaymar' Dirks 1d9a4ddbf5 gs-helper: Fix nonstandard usage of va_start 2019-12-21 18:07:08 +01:00
Michael Fabian 'Xaymar' Dirks 624bdda6a3 gs-texture: Reduce context lock time and improve code 2019-12-21 18:06:17 +01:00
Michael Fabian 'Xaymar' Dirks aa59806322 gs-effect: Fix warning 2019-12-21 18:05:54 +01:00