mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-18 05:54:20 +01:00
Add --no-audio option
Audio will be enabled by default (when supported). Add an option to disable it. PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757> Co-authored-by: Romain Vimont <rom@rom1v.com> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
committed by
Romain Vimont
parent
8487ddba64
commit
3cf03e4a4b
@@ -8,6 +8,7 @@ public class Options {
|
||||
|
||||
private Ln.Level logLevel = Ln.Level.DEBUG;
|
||||
private int scid = -1; // 31-bit non-negative value, or -1
|
||||
private boolean audio = true;
|
||||
private int maxSize;
|
||||
private VideoCodec codec = VideoCodec.H264;
|
||||
private int bitRate = 8000000;
|
||||
@@ -49,6 +50,14 @@ public class Options {
|
||||
this.scid = scid;
|
||||
}
|
||||
|
||||
public boolean getAudio() {
|
||||
return audio;
|
||||
}
|
||||
|
||||
public void setAudio(boolean audio) {
|
||||
this.audio = audio;
|
||||
}
|
||||
|
||||
public int getMaxSize() {
|
||||
return maxSize;
|
||||
}
|
||||
|
||||
@@ -169,6 +169,10 @@ public final class Server {
|
||||
Ln.Level level = Ln.Level.valueOf(value.toUpperCase(Locale.ENGLISH));
|
||||
options.setLogLevel(level);
|
||||
break;
|
||||
case "audio":
|
||||
boolean audio = Boolean.parseBoolean(value);
|
||||
options.setAudio(audio);
|
||||
break;
|
||||
case "codec":
|
||||
VideoCodec codec = VideoCodec.findByName(value);
|
||||
if (codec == null) {
|
||||
|
||||
Reference in New Issue
Block a user