-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
[feat] add support to create virtual display #5175
Conversation
# Conflicts: # app/src/cli.c # server/src/main/java/com/genymobile/scrcpy/video/ScreenCapture.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the prototype 👍
I tested, it works on my device 😎
I keep this feature on my TODO list (beforehand, I'd like to add gamepad support).
struct sc_control_msg msg; | ||
msg.type = SC_CONTROL_MSG_TYPE_RESIZE_DISPLAY; | ||
msg.resize_display.width = sz.width; | ||
msg.resize_display.height = sz.height; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I resize my client window, the captured display remains at the initial resolution (which is fine, but I think this code was expected to resize on the device, right?). In the end, it should probably be an option.
@@ -166,7 +168,7 @@ private boolean encode(MediaCodec codec, Streamer streamer) throws IOException { | |||
alive = false; | |||
break; | |||
} | |||
int outputBufferId = codec.dequeueOutputBuffer(bufferInfo, -1); | |||
int outputBufferId = codec.dequeueOutputBuffer(bufferInfo, 100000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
Superseded by #5370. |
with option
--create-new-display=WxH
you may cast a new virtual screenbased on the fork https://github.com/anirudhb/scrcpy/