Commit Graph

973 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks b108362ee1 gfx/source-texture: Update to new classes 2023-04-05 18:58:21 +02:00
Michael Fabian 'Xaymar' Dirks fc693e0210 obs/tools: Remove more legacy tools 2023-04-05 18:58:21 +02:00
Michael Fabian 'Xaymar' Dirks 39548e760d obs/tools: Replace scene_contains_source
As the recursion checking code is somewhat broken in libOBS, we need something to prevent accidental recursion from occurring. While the alternative fix is to simply make all of libOBS support recursion, unfortunately that endeavor would be too large for a single person to take on.
2023-04-05 18:58:21 +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 9bbc35b293 obs/source: Refactor old deprecated classes 2023-04-05 18:58:21 +02:00
Michael Fabian 'Xaymar' Dirks 6dd661a41c obs/source-tracker: Fix missing sources and modernize singleton design
In some rare cases, a bug is observed where some sources end up missing despite being visible in the OBS Studio UI. This is most likely related to us actually missing the events due to plugin load order. We can fix this by explicitly enumerating sources in the constructor.

Additionally in order to reduce the human error factor, we should avoid explicit initialize() and finalize() calls for our singleton. Instead the get() function should do all of the heavy lifting, including thread safety, so that the human writing the code will have next to no chances to break it.
2023-04-05 18:58:20 +02:00
Michael Fabian 'Xaymar' Dirks 0627628884 obs/tools: Remove work-around for obs_properties_remove_by_name
The bug fix to this was applied upstream, so we no longer need to support the broken behavior
2023-04-05 18:58:20 +02:00
Michael Fabian 'Xaymar' Dirks 98e2447ec8 common: Add macro to force inlining 2023-04-05 18:58:20 +02:00
carsten.braun 0540a18f27 encoders/ffmpeg/dnxhr: Add Avid DNxHR Encoder based on FFmpeg 2023-04-05 18:58:18 +02:00
Chris Pence f93d5c2202 encoder/ffmpeg: Remove legacy API usage (#783)
The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API.
2023-04-05 18:58:18 +02:00
Michael Fabian 'Xaymar' Dirks 03b16786e7 encoders/ffmpeg/nvenc: Improve compatibility with FFmpeg
Replaces some very specific code with generic support for FFmpeg, which should last us much longer than the old way. Also improves the migration of settings, which wasn't quite working with the previous way.
2023-04-05 18:58:17 +02:00
Michael Fabian 'Xaymar' Dirks 378f2b3f0e ffmpeg/tools: Improve helper functions for AVOption lists 2023-04-05 18:58:17 +02:00
Michael Fabian 'Xaymar' Dirks 36aec3be54 encoders/ffmpeg/nvenc: Ensure compatibility with more than just FFmpeg 4.2
When FFmpeg Encoders was originally written, FFmpeg 4.2 was still new and OBS Studio did not seem to want to update to anything newer for a while. This led to code being fine-tuned for FFmpeg 4.2, which stops working the moment OBS Studio upgrades FFmpeg. This removes the dependency on FFmpeg 4.2 hopefully, and allows using newer FFmpeg versions - or perhaps even older versions.

Additionally the nonsensical behavior of the Target Quality slider was fixed. It is now from 0 to 51, instead of from 0 to 100, and as such matches FFmpeg exactly.
2023-04-05 18:58:17 +02:00
Michael Fabian 'Xaymar' Dirks 7f6047f43f ffmpeg/tools: Helpers for easily populating OBS property lists 2023-04-05 18:58:17 +02:00
Michael Fabian 'Xaymar' Dirks a32c2b1104 ui/about: Remove additional spacers
These just break the flow, with no visual improvement.
2023-04-05 18:51:55 +02:00
Michael Fabian 'Xaymar' Dirks b5cb3440f2 filters/autoframing: Always set projection matrix
Fixes #739
2023-04-05 18:51:55 +02:00
Michael Fabian 'Xaymar' Dirks decca6e906 ui/about: Use auto-generated credits for "About StreamFX"
As contributors and translators always increase in number and never decrease, it was getting difficult to thank everyone properly with every update. So instead of manually writing each entry we should take advantage of the power of automation and use APIs to gather this information properly. As long as the user is not actively hiding their profile, they will be thanked properly.

This also includes a potential fix for the problem with multi-lingual text in the About StreamFX window.
2023-04-05 18:51:54 +02:00
Michael Fabian 'Xaymar' Dirks d15e8d58da encoders/ffmpeg/nvenc: Fix new Reference Frames setting 2023-04-05 18:51:54 +02:00
Michael Fabian 'Xaymar' Dirks 2505b193c8 encoders/ffmpeg/nvenc: Allow OBS to detect or override bitrate
We won't allow OBS to override everything, just the bare minimum necessary for Replay Buffer, Dynamic Bitrate and generic Streaming.
2023-04-05 18:51:54 +02:00
Michael Fabian 'Xaymar' Dirks 567620a6ad encoders/ffmpeg/nvenc: Support reconfiguration during encoding 2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks 19689d1a11 encoders/ffmpeg: Add support for re-configuration of encoders 2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks 977716d679 encoders/ffmpeg/nvenc: Always set rc_max_rate if needed 2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks 6cf663ffff encoders/aom-av1: Set proper packet priority and drop priority 2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks ac466a65f8 encoders/ffmpeg: Set proper packet priority and drop priority
With increasing complexity in video encoders, we end up with complex priority and drop priority structures. While the fields are currently ignored by the default libOBSs output plugins, in the future this might no longer be the case. In any case, the increase in complexity requires us to adjust to it.
2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks b151a44790 encoders/ffmpeg: Support proper settings migration 2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks 132c58632e obs/encoder-factory: Support proper settings migration 2023-04-05 18:51:52 +02:00
Michael Fabian 'Xaymar' Dirks bc5de8061f encoders/codecs/h264: Basic support for parsing NALs 2023-04-05 18:51:51 +02:00
Michael Fabian 'Xaymar' Dirks afa47646f5 encoders/ffmpeg/nvenc: Don't migrate already correct settings 2023-04-05 18:51:51 +02:00
Michael Fabian 'Xaymar' Dirks cce33eef80 gfx/shader/texture: Fix incorrect placement of modified_type
The previous placement would result in the properties not yet existing.
2023-04-05 18:51:49 +02:00
Michael Fabian 'Xaymar' Dirks ba05258547 gfx/shader/texture: Improve load/acquire behavior
Prevents massive stalls from happening unexpectedly due to repeatedly loading the same thing over and over.
2023-04-05 18:51:49 +02:00
Michael Fabian 'Xaymar' Dirks 7994d03166 gfx/shader/texture: Add default file annotation 2023-04-05 18:51:49 +02:00
Michael Fabian 'Xaymar' Dirks c3b1dc2ec2 gfx/shader: Call defaults before update before properties
Fixes an unusual order of initialization bug resulting in poor user experience
2023-04-05 18:51:48 +02:00
Michael Fabian 'Xaymar' Dirks 86cb224783 gfx/shader: Clear render target before rendering
Accidentally left as a comment, this causes things like SMAA to freak out.
2023-04-05 18:51:48 +02:00
Michael Fabian 'Xaymar' Dirks 89f1affe32 gfx/shader: Shaders don't render in sRGB mode 2023-04-05 18:51:47 +02:00
Michael Fabian 'Xaymar' Dirks ab84537a6e gfx/shader/param-texture: Fix detection of enumerations and paths 2023-04-05 18:51:46 +02:00
Michael Fabian 'Xaymar' Dirks 4b86d67517 obs/gs/effect: Only add defines to the top level shader
Fixes certain warnings that are caused by duplicate '#define' lines.
2023-04-05 18:51:46 +02:00
Michael Fabian 'Xaymar' Dirks 2962be9d52 obs/gs/effect: gs_get_device_type() requires graphics context 2023-04-05 18:51:45 +02:00
Michael Fabian 'Xaymar' Dirks 9859b44b1c obs/gs/mipmapper: Enable support for sRGB mip-mapping 2023-04-05 18:51:45 +02:00
Michael Fabian 'Xaymar' Dirks 9f035deaaa obs/gs/mipmapper: Don't cache the "source" parameter
Fixes #721
2023-04-05 18:51:45 +02:00
coolsoft.rf 4601df76d9 gfx/shader/param/texture: Add support for Texture parameters
Implements File, Source and Enumeration type for Texture shader inputs, completing the initial Shader implementation.

Related: #5

Co-authored-by: Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
2023-04-05 18:51:43 +02:00
Michael Fabian 'Xaymar' Dirks 1816e29862 gfx/shader: Optional sRGB support for inputs 2023-04-05 18:51:43 +02:00
Michael Fabian 'Xaymar' Dirks 93a20c7dd4 gfx/shader: Add profiling code and fix problems with properties 2023-04-05 18:51:43 +02:00
Michael Fabian 'Xaymar' Dirks e1b7e6eaf2 gfx/shader: Get-er for currently loaded shader file 2023-04-05 18:51:43 +02:00
Michael Fabian 'Xaymar' Dirks 6f7c03fb28 obs/gs/effect-parameter: Add support for sRGB texture inputs 2023-04-05 18:51:42 +02:00
Michael Fabian 'Xaymar' Dirks 22786005d6 gfx/shader/param: Track the parent shader object 2023-04-05 18:51:42 +02:00
Michael Fabian 'Xaymar' Dirks 69a72d4975 gfx/shader: Add a way to retrieve the underlying obs_source_t* 2023-04-05 18:51:42 +02:00
coolsoft.rf bba606e439 gfx/shader: Support for visible and active tracking in parameters
Co-authored-by: Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
2023-04-05 18:51:42 +02:00
coolsoft.rf 6aa3f6dbc2 gfx/shader: De-duplicate some code paths
Co-authored-by: Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
2023-04-05 18:51:41 +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 10ec6a7ad2 obs/gs/mipmapper: Add support for OpenGL 2023-04-05 18:51:40 +02:00
Michael Fabian 'Xaymar' Dirks 655ff6e367 third-party: Add GLAD OpenGL wrapper 2023-04-05 18:51:40 +02:00
Michael Fabian 'Xaymar' Dirks ab6ba5ee4c encoder/ffmpeg/nvenc: Swap parameter names in migration code 2023-04-05 18:51:39 +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 e954e86308 encoder/ffmpeg: libOBS samples Chroma at Top, not Center
This bug predates the merge into StreamFX and was present in the original release as a separate plugin. libOBS has never sampled Chroma at Center as far as I can look back into its history.

Fixes #676
2023-04-05 18:51:38 +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 2ccbd76c02 util/library: Don't mix incompatible parameters 2023-04-05 18:51:37 +02:00
Michael Fabian 'Xaymar' Dirks aeb889091e filter/autoframing: Remaining part of ff235b765e 2023-04-05 18:51:37 +02:00
Michael Fabian 'Xaymar' Dirks 2b3535f089 filter/autoframing: Allow specifying Tracking Frequency in Hz 2023-04-05 18:51:36 +02:00
Michael Fabian 'Xaymar' Dirks ad3ac69cd7 filter/auto-framing: Frame your face, automatically! 2023-04-05 18:51:36 +02:00
Michael Fabian 'Xaymar' Dirks e6ec0fc4c7 nvidia/ar/facedetection: Add Face Detection feature 2023-04-05 18:51:36 +02:00
Michael Fabian 'Xaymar' Dirks c1ecfe70b3 nvidia/ar/feature: Add wrapper for AR features 2023-04-05 18:51:35 +02:00
Michael Fabian 'Xaymar' Dirks 913ac4b309 nvidia/ar: Add modern wrapper for Maxine AR SDK 2023-04-05 18:51:35 +02:00
Michael Fabian 'Xaymar' Dirks c3440d2069 project: Remove undocumented "NVIDIA Face Tracking" feature
Originally intended to be an experiment with no future, it turned out to be very popular with streamers that move a lot. In the end it was popular enough that NVIDIA added their own variant to their Broadcast software, which works decently enough. Unfortunately my wrapper code around the library was written very poorly, so it didn't take long for it to break out of nowhere.
2023-04-05 18:51:35 +02:00
Michael Fabian 'Xaymar' Dirks 28fa127ead gfx/debug: Helper class to handle common debug rendering 2023-04-05 18:51:35 +02:00
Michael Fabian 'Xaymar' Dirks e4b15d0f73 nvidia/vfx/superresolution: Refactor onto effect class 2023-04-05 18:51:34 +02:00
Michael Fabian 'Xaymar' Dirks 8d029c97a2 nvidia/vfx/denoising: Refactor onto effect class 2023-04-05 18:51:34 +02:00
Michael Fabian 'Xaymar' Dirks 092ba2cad5 nvidia/vfx/greenscreen: Parent class already does this for us 2023-04-05 18:51:34 +02:00
Michael Fabian 'Xaymar' Dirks 883839ed2b nvidia/vfx/effect: Auto-assign model path, and optimize with const-reference
Improves code performance slightly and reduces overall code duplication.
2023-04-05 18:51:34 +02:00
Michael Fabian 'Xaymar' Dirks 39c2fdb943 nvidia/vfx: Optimize by returning a const-reference
Prevents a needless deep clone of the path object.
2023-04-05 18:51:34 +02:00
Michael Fabian 'Xaymar' Dirks 939ad35dd7 nvidia/cv: Publicly inherit from std::runtime_error
It wasn't possible to cast these exceptions to the underlying type, so they were treated as unknown exceptions.
2023-04-05 18:51:33 +02:00
Michael Fabian 'Xaymar' Dirks 25dc14f805 util/library: Load wstring instead of string 2023-04-05 18:51:33 +02:00
Michael Fabian 'Xaymar' Dirks f0b0b0d33d filter/denoising: Wait for internal task to be completed 2023-04-05 18:51:33 +02:00
Michael Fabian 'Xaymar' Dirks 926cb740b3 filter/upscaling: Wait for internal task to be completed 2023-04-05 18:51:33 +02:00
Michael Fabian 'Xaymar' Dirks 21f872edfc filter/virtual-greenscreen: Wait for internal task to be completed 2023-04-05 18:51:33 +02:00
Michael Fabian 'Xaymar' Dirks 97318eacac util/threadpool: Allow waiting for task completion 2023-04-05 18:51:33 +02:00
Michael Fabian 'Xaymar' Dirks a7fd867be6 filter/upscaling: Set correct parameters to the appropriate textures 2023-04-05 18:51:32 +02:00
Michael Fabian 'Xaymar' Dirks 26d854b7ce nvidia/vfx: Prefer AddDllDirectory over SetDefaultDllDirectories 2023-04-05 18:51:32 +02:00
Michael Fabian 'Xaymar' Dirks 6983be457a nvidia/cv: Prefer AddDllDirectory over SetDefaultDllDirectories 2023-04-05 18:51:32 +02:00
Michael Fabian 'Xaymar' Dirks a56f3816a1 util/library: Force specific search directories 2023-04-05 18:51:31 +02:00
Michael Fabian 'Xaymar' Dirks 90bb03779c filter/virtual-greenscreen: Add Virtual Greenscreen filter 2023-04-05 18:51:31 +02:00
Michael Fabian 'Xaymar' Dirks 6d20280956 nvidia/vfx/greenscreen: Simple wrapper for the Green Screen effect 2023-04-05 18:51:30 +02:00
Michael Fabian 'Xaymar' Dirks c714d932b8 nvidia/vfx/effect: Fix 'run()' defaulting to async and expose internals 2023-04-05 18:51:30 +02:00
Michael Fabian 'Xaymar' Dirks fe4ed123d0 nvidia/cv: Add specialized exception 2023-04-05 18:51:30 +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 948976fce1 effects: Add Draw, DrawPremultiplied to 'standard.effect' 2023-04-05 18:51:29 +02:00
Michael Fabian 'Xaymar' Dirks cc9fa6de8f locale: Remove any unused Strings 2023-04-05 18:51:28 +02:00
Michael Fabian 'Xaymar' Dirks a7cf5bd941 encoder/ffmpeg: Adjust i18n identifiers to match other parts of code 2023-04-05 18:51:28 +02:00
Michael Fabian 'Xaymar' Dirks 3ebaf9ea30 encoder/ffmpeg: Remove color format and compliance choice
As people appear to be far too willing to mess with settings they have absolutely no reason to mess with, removing these seems like the best option. Both of these can still be set if you know where to look, and aren't actually required for operation at all.
2023-04-05 18:51:28 +02:00
Michael Fabian 'Xaymar' Dirks 4fea923371 ui: Update StreamFX's menu with new Links 2023-04-05 18:51:25 +02:00
Michael Fabian 'Xaymar' Dirks e3563c7cf4 filter/dynamic-mask: Prevent recursive filter graphs 2023-04-05 18:51:25 +02:00
Michael Fabian 'Xaymar' Dirks 6a6929105a ffmpeg: Fix print_av_option_string2 printing wrong names 2023-04-05 18:51:25 +02:00
Michael Fabian 'Xaymar' Dirks b122785bd1 encoder/ffmpeg/nvenc: Fix migration code causing issues 2023-04-05 18:51:25 +02:00
Michael Fabian 'Xaymar' Dirks 6473882c57 encoder/ffmpeg/nvenc: Add Reference Frames and remove useless settings 2023-04-05 18:51:25 +02:00
Michael Fabian 'Xaymar' Dirks b1a35118ee encoder/ffmpeg/nvenc: Fix localization file order 2023-04-05 18:51:24 +02:00
Michael Fabian 'Xaymar' Dirks 7e9e9e037d encoder/ffmpeg/nvenc: Fix missing settings and CQ being applied in CBR mode 2023-04-05 18:51:24 +02:00
Michael Fabian 'Xaymar' Dirks e2efc01917 encoder/aom-av1: Add CPU Usage 10 2023-04-05 18:51:24 +02:00
Michael Fabian 'Xaymar' Dirks a628dfebae encoder/aom-av1: Respect "Default" setting for Metric tune setting 2023-04-05 18:51:23 +02:00