mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Add --list-encoders
Add an option to list the device encoders properly. PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757>
This commit is contained in:
parent
b7e5284adf
commit
9196dc1563
16 changed files with 157 additions and 29 deletions
|
|
@ -291,6 +291,10 @@ public final class Server {
|
|||
boolean powerOn = Boolean.parseBoolean(value);
|
||||
options.setPowerOn(powerOn);
|
||||
break;
|
||||
case "list_encoders":
|
||||
boolean listEncoders = Boolean.parseBoolean(value);
|
||||
options.setListEncoders(listEncoders);
|
||||
break;
|
||||
case "send_device_meta":
|
||||
boolean sendDeviceMeta = Boolean.parseBoolean(value);
|
||||
options.setSendDeviceMeta(sendDeviceMeta);
|
||||
|
|
@ -350,6 +354,17 @@ public final class Server {
|
|||
|
||||
Ln.initLogLevel(options.getLogLevel());
|
||||
|
||||
if (options.getListEncoders()) {
|
||||
if (options.getCleanup()) {
|
||||
CleanUp.unlinkSelf();
|
||||
}
|
||||
|
||||
Ln.i(CodecUtils.buildVideoEncoderListMessage());
|
||||
Ln.i(CodecUtils.buildAudioEncoderListMessage());
|
||||
// Just print the available encoders, do not mirror
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
scrcpy(options);
|
||||
} catch (ConfigurationException e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue