libobs: Add missing encoder API functions #10648
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds the API functions
obs_encoder_get_signal_handler
andobs_encoder_get_proc_handler
, both of which are mentioned in the API docs but are not actually implemented in the API. Encoders don't use signals for anything, but it was easy enough to include that I didn't see a reason not to.Motivation and Context
Encoders already have a proc and signal handler stored internally, it simply isn't externally accessible due to the absence of these functions. As such, implementing custom extra functionality for encoders is somewhat difficult at present. There's minimal cost to adding these functions, and some nice possibilities opened up for plugin creators and future feature additions.
How Has This Been Tested?
Created an encoder in a plugin's load function, used function to get its proc handler, and found it did correctly return the encoder's proc handler.
Types of changes
Checklist: