Provide a UNIX domain control socket#126
Open
blufor wants to merge 1 commit into
Open
Conversation
...to control the application by other means (ie. StreamDecks and such). This integrates creating `AF_UNIX`/`SOCK_STREAM` listen socket with a very simple JSON API (using `Poco/JSON`) that allows one to do thing such as: - switch presets - toggle lock and shuffle - get status from outside of the application. > Wayland by design doesn't allow one to send keystrokes to non-active windows. It's actually against the design. Every API response reports on the status as well. The simplicity allows one to integrate practically anything with just `bash`, `socat` and `jq`. In the `examples/vj-control`, one can find a tool that parses the output into stylish format that can be used on StreamDecks. One thing I'm not very sure about is how it's hooked into the RenderLoop, however it seems to me there's no other (simple) way around it to properly report back with the status. It is definitely a compromise. > NOTE: I'm a senior devops engineer, however C++ is not one of the languages I'm friends with (on the contrary actually), so - guilty as charged - I've used Claude Code to help me implement it. The feature is guarded behind `-DENABLE_CONTROL_SOCKET=ON`
Author
Member
|
maybe something like https://en.wikipedia.org/wiki/Open_Sound_Control would be more flexible/standard? |
Author
|
@revmischa Using standard protocols is definitely a better approach and I'm all for that. However (not knowing the details of OSC) - doesn't this present a completely different communication model? Basically you get notified about changes (events) that happen on the other side, no? The implemented model in this PR is purely req->resp. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

...to control the application by other means (ie. StreamDecks and such). This integrates creating
AF_UNIX/SOCK_STREAMlisten socket with a very simple JSON API (usingPoco/JSON) that allows one to do thing such as:from outside of the application.
Every API response reports on the status as well. The simplicity allows one to integrate practically anything with just
bash,socatandjq.In the
examples/vj-control, one can find a tool that parses the output into stylish format that can be used on StreamDecks.One thing I'm not very sure about is how it's hooked into the RenderLoop, however it seems to me there's no other (simple) way around it to properly report back with the status. It is definitely a compromise.