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
40369bf72d
obs-tools: Add child_source helper class
2020-02-13 10:34:26 +01:00
Michael Fabian 'Xaymar' Dirks
f8ee95d71c
obs-*: Cleanup
2020-02-13 05:09:14 +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
0a16ce07dc
project: Merged FFmpeg Encoders Step 2
2020-01-13 22:40:15 +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
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
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
Michael Fabian 'Xaymar' Dirks
cbada3e438
obs-source: Deprecate obs::source due to stability issues
...
This should be replaced with a class inheriting from std::shared_ptr.
2019-12-21 17:43:12 +01:00
Michael Fabian 'Xaymar' Dirks
7e5cbe18cf
project: Apply clang-format
2019-12-21 17:05:53 +01:00
Michael Fabian 'Xaymar' Dirks
1f0c595a0a
obs-source-factory: Add missing include
2019-12-21 17:05:49 +01:00
Michael Fabian 'Xaymar' Dirks
c0f131642b
gs-effect-parameter: Improve API and fix incorrect functions
2019-12-18 06:39:06 +01:00
Michael Fabian 'Xaymar' Dirks
cd82e2cac7
gs-effect-pass: Implement parameter getter and fix possible crash
2019-12-18 06:39:06 +01:00
Michael Fabian 'Xaymar' Dirks
570b70479f
gs-effect-technique: Fix possible crash
2019-12-18 06:39:06 +01:00
Michael Fabian 'Xaymar' Dirks
01f23e17fe
gs-effect: Also override finalizer for the stored ptr
2019-12-16 23:07:49 +01:00
Michael Fabian 'Xaymar' Dirks
e7b46063aa
gs-effect: Fix typo from refactor
2019-12-16 22:53:25 +01:00
Michael Fabian 'Xaymar' Dirks
b54e95527a
gs-effect*: Finish up refactoring onto std::shared_ptr
...
This is most likely not the last refactor, the entire obs/gs stuff is very very basic right now and likely needs a complete rewrite.
2019-12-15 12:55:19 +01:00
Michael Fabian 'Xaymar' Dirks
11a2329519
gs-effect: Refactor onto std::shared_ptr
2019-12-15 11:13:47 +01:00
Michael Fabian 'Xaymar' Dirks
1f25b56579
gs-effect-technique: Return nullptr instead of throwing exception
2019-12-15 10:37:57 +01:00
Michael Fabian 'Xaymar' Dirks
ef76e353d3
gs-effect-pass/technique: Change to protected inheritance
...
Prevents the use of get() and reset() where not actually needed and forces us to actually implement all of the methods needed to interface with the object, leading to cleaner and safer code.
2019-12-15 10:37:41 +01:00
Michael Fabian 'Xaymar' Dirks
50ac6893bf
gs-effect-parameter: Refactor effect_parameter onto std::shared_ptr
...
Prevents problems further down the line and supports multiple types of parents to ensure that lifetime is guaranteed.
2019-12-15 10:35:29 +01:00
Michael Fabian 'Xaymar' Dirks
738b08de36
gs-effect-pass/technique: Implement wrapper code based on std::shared_ptr
...
These two wrap the underlying gs_epass and gs_effect_technique objects, to allow direct and improved access to them without relying on the libobs API to provide this access for us. Additionally these make it safe for us to use them instead of relying on C-like code to deal with it.
2019-12-15 09:05:23 +01:00
Michael Fabian 'Xaymar' Dirks
7e98df0d1c
obs-source-factory: Add helper functionality to make things easier to use
2019-12-14 02:34:48 +01:00
Michael Fabian 'Xaymar' Dirks
6efdb1950b
obs-source-factory: Fix typo and missing return
2019-11-18 03:03:11 +01:00
Michael Fabian 'Xaymar' Dirks
db85883821
obs/obs-source-factory: Fix potential null-pointer-dereference
2019-11-17 14:07:54 +01:00
Michael Fabian 'Xaymar' Dirks
87f83738c3
gs-helper: Add common debug colors
2019-10-31 05:59:16 +01:00
Michael Fabian 'Xaymar' Dirks
10681d30c8
gs-helper: Remove unused constructor
2019-10-18 23:04:23 +02:00
Michael Fabian 'Xaymar' Dirks
90cdc30ef1
gs-helper: Add class for managed debug markers
2019-10-18 22:59:30 +02:00
Michael Fabian 'Xaymar' Dirks
d47ab0570f
obs-source-factory: Barebone Source Factory and Instance
...
This class and template should be used to reduce the code clutter from repeatedly doing the same thing. It requires OBS v24.0 or newer since the get_properties2 and get_defaults2 API were fully implemented with it.
2019-10-18 22:31:52 +02:00
Michael Fabian 'Xaymar' Dirks
96466100b4
obs-source: Ensure that exceptions are const
2019-10-13 07:07:31 +02:00
Michael Fabian 'Xaymar' Dirks
0ef94aad0f
gs-vertexbuffer: Fix and improve various problematic locations
2019-10-13 06:38:15 +02:00
Michael Fabian 'Xaymar' Dirks
e02225262c
obs-source: Add noexcept try-catch to C facing callbacks
2019-09-07 21:35:32 +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
deeb6719c4
project: Apply formatting
2019-08-24 12:59:32 +02:00
Michael Fabian 'Xaymar' Dirks
845a2cbb21
gs-effect: Don't include the null character in strings
2019-08-07 17:14:14 +02:00
Michael Fabian 'Xaymar' Dirks
b88cc0fe01
gs-effect: Check correct size in get_default_string
2019-08-07 17:07:54 +02:00
Michael Fabian 'Xaymar' Dirks
8603fef897
gs-effect: Fix get_string and get_default_string
2019-08-07 16:41:26 +02:00
Michael Fabian 'Xaymar' Dirks
c6559d84ba
gs-effect: Check if effect is nullptr, not if its a valid ptr
...
Woops, that somehow went completely by me without checking.
2019-08-07 16:17:12 +02:00
Michael Fabian 'Xaymar' Dirks
7b0159947e
gs-effect: Add helpers and fix bad enable_shared_from_this
2019-08-07 16:11:09 +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
ff6f4d5ddf
gs-effect: Add string support, get accessors and annotations
2019-08-04 22:44:46 +02:00