Skip to content

Commit

Permalink
Update for GFE 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
irtimmer committed May 7, 2014
1 parent 16badc4 commit 8edfaf5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/common
27 changes: 26 additions & 1 deletion src/com/limelight/Limelight.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ public static void main(String args[]) {
boolean pair = false;
int resolution = 720;
int refresh = 60;
int bitrate = 0;
boolean parse = true;
boolean fake = false;
boolean tests = true;
Expand Down Expand Up @@ -205,6 +206,20 @@ public static void main(String args[]) {
refresh = 30;
} else if (args[i].equals("-60fps")) {
refresh = 60;
} else if (args[i].equals("-bitrate")) {
if (i + 1 < args.length) {
try {
bitrate = Integer.parseInt(args[i+1]);
} catch (NumberFormatException e) {
System.out.println("Syntax error: bitrate must be a number");
System.exit(3);
}
i++;
} else {
System.out.println("Syntax error: bitrate expected after -bitrate");
System.exit(3);
}
refresh = 30;
} else if (args[i].equals("-fake")) {
fake = true;
} else if (args[i].equals("-notest")) {
Expand All @@ -225,6 +240,7 @@ public static void main(String args[]) {
System.out.println("\t-1080\t\tUse 1920x1080 resolution");
System.out.println("\t-30fps\t\tUse 30fps");
System.out.println("\t-60fps\t\tUse 60fps [default]");
System.out.println("\t-bitrate <bitrate>\t\tSpecify the bitrate in Kbps");
System.out.println("\t-input <device>\tUse <device> as input. Can be used multiple times");
System.out.println("\t\t\t[default uses all devices in /dev/input]");
System.out.println("\t-mapping <file>\tUse <file> as gamepad mapping configuration file");
Expand All @@ -236,10 +252,19 @@ public static void main(String args[]) {
} else
host = args[args.length-1];

if (bitrate == 0) {
if (resolution==720)
bitrate = 10000;
else if (refresh==30)
bitrate = 15000;
else
bitrate = 25000;
}

//Set debugging level
Logger.getLogger(LimeLog.class.getName()).setLevel(debug);

StreamConfiguration streamConfig = new StreamConfiguration((resolution/9)*16, resolution, refresh);
StreamConfiguration streamConfig = new StreamConfiguration((resolution/9)*16, resolution, refresh, bitrate);

Limelight limelight = new Limelight(host);
if (!pair)
Expand Down

0 comments on commit 8edfaf5

Please sign in to comment.