Skip to content

Commit

Permalink
Adding codecProfile to server options
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzah Mazuz committed Mar 16, 2020
1 parent 8bf4599 commit d4fb6a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions server/src/main/java/com/genymobile/scrcpy/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,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;
Expand Down Expand Up @@ -66,4 +67,12 @@ public boolean getControl() {
public void setControl(boolean control) {
this.control = control;
}

public int getCodecProfile() {
return codecProfile;
}

public void setCodecProfile(int codecProfile) {
this.codecProfile = codecProfile;
}
}
7 changes: 5 additions & 2 deletions server/src/main/java/com/genymobile/scrcpy/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ private static Options createOptions(String... args) {
"The server version (" + clientVersion + ") does not match the client " + "(" + BuildConfig.VERSION_NAME + ")");
}

if (args.length != 8) {
throw new IllegalArgumentException("Expecting 8 parameters");
if (args.length != 9) {
throw new IllegalArgumentException("Expecting 9 parameters");
}

Options options = new Options();
Expand All @@ -107,6 +107,9 @@ private static Options createOptions(String... args) {
boolean control = Boolean.parseBoolean(args[7]);
options.setControl(control);

int codecProfile = Integer.parseInt(args[8]);
options.setCodecProfile(codecProfile);

return options;
}

Expand Down

0 comments on commit d4fb6a0

Please sign in to comment.