win-capture-audio
win-capture-audio copied to clipboard
Add integration with game-capture
As mentioned in #1, currently the user must select a game in both the game-capture and audio-capture settings windows (if they are not using the hotkeys). An idea to improve this would be to add a third mode "Same as game-capture" with a dropdown of the game-capture sources the user has in their current scene.
As far as my (limited) knowledge of OBS plugins goes, to implement this we would need to:
- Enumerate the game-capture sources in the scene
- Extract either the game-capture private context or the private obs_data_t settings object
- Peek the required information for us to identify the same process as the game-capture source
- Monitor updates to said context or settings object to track and updates to the target process
Step 1 is likely quite easy, but 2, 3 and especially 4 look to be awkward and hacky. For now this is somewhat out of scope until the stability and compatability of the hook has improved.
Alternatives such as integrating directly with the game-capture plugin are also worth considering, but would require the plugin to be merged into OBS master.
If this is not merged into the main plugin, obsproject/obs-studio/pull/2659 could be handy.
Ah yes that looks perfect, and even without that I see you pulling the handle directly from the game-capture source in your window follower plugin. Thanks!
Please don't follow my example with reaching deep into several internal structs. Push for the PR instead.
Yeah for sure, was just good to see that I wasn't completely off the rails with my first idea.