obs-studio
obs-studio copied to clipboard
plugins: Add obs-ipc plugin
Description
This plugin allows an external or third-party program a means to control OBS or pull information about the program's state through named pipes.
NOTE: While this changes the ipc-util dependency which game capture relies on, the changes should not be breaking, and not require a recompile and resigning of game capture.
Motivation and Context
This can be used to provide alternative control interfaces, or support integrations into other software that can run alongside OBS.
How Has This Been Tested?
This has been tested against an integration into third-party software that was developed alongside this plugin, but hasn't been released yet.
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.
There are quite a few warnings generated by this code. I would recommend going over the commits and cleaning up any warnings each commit generates (and make sure those warning fixes are squashed into the commits they come from)
Given that OBS Websockets has now been merged into mainline with 28, I feel like much of the demand for IPC control could be handled via that mechanism.
Is this PR still worthwhile?
Given that OBS Websockets has now been merged into mainline with 28, I feel like much of the demand for IPC control could be handled via that mechanism.
Is this PR still worthwhile?
This PR still has certain additional features that websockets doesn't, e.g. for texture sharing. We're discussing how to move forward with this and the project it was for (GameBar integration).
@derrod Do we have a plan to bring some improvements from this PR over into obs-websockets? It seems to me that at some point it might be beneficial to split that module up into a generic "external API" part and WebSockets just being one way to expose it (iirc internally that's how that module is designed anyway) and we could saddle IPC or even scripting on that.
@tt2468 wdyt?
The easiest way to share the handler code for obs-websocket is for this obs-ipc plugin to implement obs-websocket-api.h
. The header allows you to call obs-websocket requests directly, and I believe I also implemented event callback support. So, through there, all of the functionality necessary should already be accessible. This plugin would just have to do the ipc-specific things and link back to obs-websocket.
Regarding refactoring the plugins, I did try my best to design obs-websocket with a future refactor in mind, but it would still require a good amount of work.
@VodBox Is this still something you'd have the time to continue work on?
@VodBox Is this still something you'd have the time to continue work on?
I have the interest, but can provide no guarantee on a timeline
@VodBox Is this still something you'd have the time to continue work on?
I have the interest, but can provide no guarantee on a timeline
I’ll close this variant then as I guess a new attempt would look different and the base files have changed a lot since then.