Changes to turn scrcpy into a library that can be embedded... #2591
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.
... and used by another process.
Hello,
Do not rush to merge this PR. At this point I'm more interested in your feedback and ideas how to improve my code.
My intent is to integrate scrcpy with SikuliX library to enable testing and automation of Android phones. https://github.com/RaiMan/SikuliX1 RaiMan/SikuliX1#473
To do that, I am attempting to modify scrcpy to be a shared library that can be invoked. Since SikuliX is in Java, I'm using https://github.com/bytedeco/javacpp/ for integration. I needed to make following changes to scrcpy:
These changes are sufficient for me to get a video feed inside Java process and copy frames into a BufferedImage. I can provide Java code tomorrow if you are interested- it needs a bit of cleaning up before I can make it public.
My question is if you would consider accepting changes like this upstream and merging them. It is my honest belief that adding better ability to integrate it with other software would boost scrcpy's popularity and usefulness.
Next steps- I intend to add ability to send events (mouse clicks, key presses, etc.) to Android next. If you have any comments on how to improve the changes I have made, please let me know and I'll do my best to accommodate you.
P.S. I'm doing this as a hobby, not a commercial project.
Sincerely,
Teofilis Martisius