mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-20 09:20:47 +00:00
Rename --codec-options to --video-codec-options
This prepares the introduction of --audio-codec-options.
This commit is contained in:
parent
ad51a2b411
commit
705d69aaea
11 changed files with 49 additions and 39 deletions
|
@ -20,7 +20,7 @@ public class Options {
|
|||
private int displayId;
|
||||
private boolean showTouches;
|
||||
private boolean stayAwake;
|
||||
private List<CodecOption> codecOptions;
|
||||
private List<CodecOption> videoCodecOptions;
|
||||
private String encoderName;
|
||||
private boolean powerOffScreenOnClose;
|
||||
private boolean clipboardAutosync = true;
|
||||
|
@ -146,12 +146,12 @@ public class Options {
|
|||
this.stayAwake = stayAwake;
|
||||
}
|
||||
|
||||
public List<CodecOption> getCodecOptions() {
|
||||
return codecOptions;
|
||||
public List<CodecOption> getVideoCodecOptions() {
|
||||
return videoCodecOptions;
|
||||
}
|
||||
|
||||
public void setCodecOptions(List<CodecOption> codecOptions) {
|
||||
this.codecOptions = codecOptions;
|
||||
public void setVideoCodecOptions(List<CodecOption> videoCodecOptions) {
|
||||
this.videoCodecOptions = videoCodecOptions;
|
||||
}
|
||||
|
||||
public String getEncoderName() {
|
||||
|
|
|
@ -61,7 +61,6 @@ public final class Server {
|
|||
private static void scrcpy(Options options) throws IOException, ConfigurationException {
|
||||
Ln.i("Device: " + Build.MANUFACTURER + " " + Build.MODEL + " (Android " + Build.VERSION.RELEASE + ")");
|
||||
final Device device = new Device(options);
|
||||
List<CodecOption> codecOptions = options.getCodecOptions();
|
||||
|
||||
Thread initThread = startInitThread(options);
|
||||
|
||||
|
@ -117,8 +116,8 @@ public final class Server {
|
|||
|
||||
Streamer videoStreamer = new Streamer(connection.getVideoFd(), options.getVideoCodec(), options.getSendCodecId(),
|
||||
options.getSendFrameMeta());
|
||||
ScreenEncoder screenEncoder = new ScreenEncoder(device, videoStreamer, options.getVideoBitRate(), options.getMaxFps(), codecOptions,
|
||||
options.getEncoderName(), options.getDownsizeOnError());
|
||||
ScreenEncoder screenEncoder = new ScreenEncoder(device, videoStreamer, options.getVideoBitRate(), options.getMaxFps(),
|
||||
options.getVideoCodecOptions(), options.getEncoderName(), options.getDownsizeOnError());
|
||||
try {
|
||||
// synchronous
|
||||
screenEncoder.streamScreen();
|
||||
|
@ -242,9 +241,9 @@ public final class Server {
|
|||
boolean stayAwake = Boolean.parseBoolean(value);
|
||||
options.setStayAwake(stayAwake);
|
||||
break;
|
||||
case "codec_options":
|
||||
List<CodecOption> codecOptions = CodecOption.parse(value);
|
||||
options.setCodecOptions(codecOptions);
|
||||
case "video_codec_options":
|
||||
List<CodecOption> videoCodecOptions = CodecOption.parse(value);
|
||||
options.setVideoCodecOptions(videoCodecOptions);
|
||||
break;
|
||||
case "encoder_name":
|
||||
if (!value.isEmpty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue