mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-20 19:45:00 +00:00
Adding codecProfile to server options
(cherry picked from commit d4fb6a0c19af23d0d3c57721f6ccc91e4fad67f3) (cherry picked from commite7f205ca19
) (cherry picked from commit ef5d72cbb785d48d412b437fee95bc8f61829680) (cherry picked from commit709a0c327a
)
This commit is contained in:
parent
8f9205e76c
commit
88a00ab28c
2 changed files with 18 additions and 6 deletions
|
@ -11,6 +11,7 @@ public class Options {
|
|||
private Rect crop;
|
||||
private boolean sendFrameMeta; // send PTS so that the client may record properly
|
||||
private boolean control;
|
||||
private int codecProfile;
|
||||
|
||||
public int getMaxSize() {
|
||||
return maxSize;
|
||||
|
@ -75,4 +76,12 @@ public class Options {
|
|||
public void setControl(boolean control) {
|
||||
this.control = control;
|
||||
}
|
||||
|
||||
public int getCodecProfile() {
|
||||
return codecProfile;
|
||||
}
|
||||
|
||||
public void setCodecProfile(int codecProfile) {
|
||||
this.codecProfile = codecProfile;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,8 +80,8 @@ public final class Server {
|
|||
"The server version (" + clientVersion + ") does not match the client " + "(" + BuildConfig.VERSION_NAME + ")");
|
||||
}
|
||||
|
||||
if (args.length != 9) {
|
||||
throw new IllegalArgumentException("Expecting 9 parameters");
|
||||
if (args.length != 10) {
|
||||
throw new IllegalArgumentException("Expecting 10 parameters");
|
||||
}
|
||||
|
||||
Options options = new Options();
|
||||
|
@ -98,17 +98,20 @@ public final class Server {
|
|||
int lockedVideoOrientation = Integer.parseInt(args[4]);
|
||||
options.setLockedVideoOrientation(lockedVideoOrientation);
|
||||
|
||||
int codecProfile = Integer.parseInt(args[5]);
|
||||
options.setCodecProfile(codecProfile);
|
||||
|
||||
// use "adb forward" instead of "adb tunnel"? (so the server must listen)
|
||||
boolean tunnelForward = Boolean.parseBoolean(args[5]);
|
||||
boolean tunnelForward = Boolean.parseBoolean(args[6]);
|
||||
options.setTunnelForward(tunnelForward);
|
||||
|
||||
Rect crop = parseCrop(args[6]);
|
||||
Rect crop = parseCrop(args[7]);
|
||||
options.setCrop(crop);
|
||||
|
||||
boolean sendFrameMeta = Boolean.parseBoolean(args[7]);
|
||||
boolean sendFrameMeta = Boolean.parseBoolean(args[8]);
|
||||
options.setSendFrameMeta(sendFrameMeta);
|
||||
|
||||
boolean control = Boolean.parseBoolean(args[8]);
|
||||
boolean control = Boolean.parseBoolean(args[9]);
|
||||
options.setControl(control);
|
||||
|
||||
return options;
|
||||
|
|
Loading…
Add table
Reference in a new issue