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

stop-scrcpy doesn't work if Consumer and Supplier are same #16

Open
mobi-nex opened this issue Dec 25, 2022 · 2 comments
Open

stop-scrcpy doesn't work if Consumer and Supplier are same #16

mobi-nex opened this issue Dec 25, 2022 · 2 comments

Comments

@mobi-nex
Copy link
Owner

#12 Added ability to stop device screen mirroring. It stops the mirroring by closing the tunnels established for scrcpy. This doesn't work if both the Consumer and Supplier are on the same machine as no scrcpy tunnels are established if they are on the same machine. Need another way to stop the screen mirroring.

@mobi-nex
Copy link
Owner Author

This issue only affects Windows. This is because In addition to closing the scrcpy tunnels, we also kill the child scrcpy process. The problem is, the scrcpy window runs in a separate thread (with a different pid) from the child process. The scrcpy window closes in *nix platforms when SIGKILL is sent to the original scrcpy thread (which is what we send), but if SIGTERM is sent, the window doesn't close.

Not exactly sure what the behavior of kill signals is on Windows (neither do I know, what signal exactly is sent from our side). Need to investigate this further.

@mobi-nex
Copy link
Owner Author

See Genymobile/scrcpy#3639 for more details on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant