Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration with game-capture #5

Open
bozbez opened this issue Aug 18, 2021 · 4 comments
Open

Add integration with game-capture #5

bozbez opened this issue Aug 18, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@bozbez
Copy link
Owner

bozbez commented Aug 18, 2021

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:

  1. Enumerate the game-capture sources in the scene
  2. Extract either the game-capture private context or the private obs_data_t settings object
  3. Peek the required information for us to identify the same process as the game-capture source
  4. 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.

@bozbez bozbez added the enhancement New feature or request label Aug 18, 2021
@bozbez bozbez added this to the Future milestone Aug 18, 2021
@bozbez bozbez mentioned this issue Aug 18, 2021
@henke37
Copy link

henke37 commented Aug 18, 2021

If this is not merged into the main plugin, obsproject/obs-studio/pull/2659 could be handy.

@bozbez
Copy link
Owner Author

bozbez commented Aug 18, 2021

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!

@henke37
Copy link

henke37 commented Aug 18, 2021

Please don't follow my example with reaching deep into several internal structs. Push for the PR instead.

@bozbez
Copy link
Owner Author

bozbez commented Aug 18, 2021

Yeah for sure, was just good to see that I wasn't completely off the rails with my first idea.

@bozbez bozbez removed this from the Future milestone Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants