Create WebSocket for Webcam Interface #9
Merged
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.
In this PR, I updated the webcam interface code to create a WebSocket and send encoded frames over the connection to a client.
I did this using WebSocket++ aka websocketpp.
WebSocket++ depends on boost, hence, you will need both of them available on your system for successful execution.
Please update
WEBSOCKETPP_DIR
andBOOST_DIR
to their directory on your system.Since I installed them using homebrew, the paths are as follows (these may be different from your system):
In addition to this, I downgraded to C++17. We had decided to use C++20, but when developing, I found that a lot of dependencies are not updated for C++20 and cause issues while compiling. C++17 has a lot more support and tbh, I doubt we are going to be using C++20-exclusive features in our code.
I also added a build-and-test workflow to build and test our code using a GitHub Action. It runs whenever a PR to
main
updates.To run the WebSocket:
closes #5
closes #10