libobs: Add `obs_encoder_parent_video()` method
Description
Allows parent (original) video object of an encoder with an FPS divisor to be fetched.
Motivation and Context
When implementing a non-shared-texture encoder, I needed to be able to determine the original video_t object to use as a reference for a cross-encoder frame caching system. Since FPS division creates a new video_t object, multiple encoders cannot be associated with each other if one of them has a divisor set, as the video_t object will be different.
How Has This Been Tested?
Ubuntu 22.04, runs
Types of changes
- New feature (non-breaking change which adds functionality)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] I have included updates to all appropriate documentation.
Please squash your commits as the documentation change requires the code changes.
Commits squashed
Seems fine, I recently had a use for this as well (GPU rescaling allows multiple video outputs with different formats, but get_mix_for_video fails if your encoder has an fps divisor, so if you need to get info from the mix that doesn't work right now).
I might remove the backticks from the commit message though.