Adding codecProfile to server options

(cherry picked from commit d4fb6a0c19af23d0d3c57721f6ccc91e4fad67f3)
(cherry picked from commit e7f205ca19)
(cherry picked from commit ef5d72cbb785d48d412b437fee95bc8f61829680)
This commit is contained in:
Tzah Mazuz 2020-03-12 16:52:46 +02:00
parent 504d6a42d5
commit 709a0c327a
2 changed files with 18 additions and 6 deletions

View file

@ -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;
}
}

View file

@ -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;