From ecd2f45bb48215c402e9cd9c00f3972a10ded55b Mon Sep 17 00:00:00 2001 From: Iwan Timmer Date: Mon, 1 Dec 2014 16:12:13 +0100 Subject: [PATCH] Can change packetsize and be able to play audio locally --- README.md | 4 +++- src/com/limelight/Limelight.java | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 559dc9a..b3ff848 100644 --- a/README.md +++ b/README.md @@ -68,13 +68,15 @@ implementation. -height Vertical resolution (default 720) -30fps Use 30fps -60fps Use 60fps (default) - -bitrate Specify the bitrate in Kbps + -bitrate Specify the bitrate in Kbps + -packetsize Specify the maximum packetsize in bytes -app Name of app to stream -nosops Don't allow GFE to modify game settings -input Use as input. Can be used multiple times (default uses all devices in /dev/input) -mapping Use as gamepad mapping configuration file -audio Use as ALSA audio output device (default sysdefault) + -localaudio Play audio locally Use ctrl-c to exit application diff --git a/src/com/limelight/Limelight.java b/src/com/limelight/Limelight.java index 239c61c..e458ab8 100644 --- a/src/com/limelight/Limelight.java +++ b/src/com/limelight/Limelight.java @@ -258,6 +258,19 @@ public class Limelight implements NvConnectionListener { System.out.println("Syntax error: bitrate expected after -bitrate"); System.exit(3); } + } else if (args[i].equals("-packetsize")) { + if (i + 1 < args.length) { + try { + builder.setMaxPacketSize(Integer.parseInt(args[i+1])); + } catch (NumberFormatException e) { + System.out.println("Syntax error: packetsize must be a number"); + System.exit(3); + } + i++; + } else { + System.out.println("Syntax error: packetsize expected after -packetsize"); + System.exit(3); + } } else if (args[i].equals("-out")) { if (i + 1 < args.length) { video = args[i+1]; @@ -278,6 +291,8 @@ public class Limelight implements NvConnectionListener { tests = false; } else if (args[i].equals("-nosops")) { builder.setEnableSops(false); + } else if (args[i].equals("-localaudio")) { + builder.enableLocalAudioPlayback(true); } else if (args[i].equals("-v")) { debug = Level.WARNING; } else if (args[i].equals("-vv")) { @@ -358,12 +373,14 @@ public class Limelight implements NvConnectionListener { System.out.println("\t-30fps\t\t\tUse 30fps"); System.out.println("\t-60fps\t\t\tUse 60fps [default]"); System.out.println("\t-bitrate \tSpecify the bitrate in Kbps"); + System.out.println("\t-packetsize \tSpecify the maximum packetsize in bytes"); System.out.println("\t-app \t\tName of app to stream"); System.out.println("\t-nosops\t\t\tDon't allow GFE to modify game settings"); System.out.println("\t-input \t\tUse as input. Can be used multiple times"); System.out.println("\t\t\t\t[default uses all devices in /dev/input]"); System.out.println("\t-mapping \t\tUse as gamepad mapping configuration file"); System.out.println("\t-audio \t\tUse as ALSA audio output device (default sysdefault)"); + System.out.println("\t-localaudio\t\tPlay audio locally"); System.out.println(); System.out.println("Use ctrl-c to exit application"); System.exit(5);