Rename --no-mirror to --no-playback

This option impacts video and audio _playback_. For example, if we use
V4L2, the device is still "mirrored" (via V4L2), even if playback is
disabled. Therefore, "playback" is more approriate than "mirror".

The initial option --no-display option was renamed to --no-mirror by
commit 6928acdeac, but this has never been
released, so it is ok to rename it one more time.

Refs #3978 <https://github.com/Genymobile/scrcpy/pull/3978#issuecomment-1549420103>
PR #4033 <https://github.com/Genymobile/scrcpy/pull/4033>
This commit is contained in:
Romain Vimont
2023-05-24 20:22:35 +02:00
parent cab354102d
commit a2c8910006
11 changed files with 39 additions and 40 deletions

View File

@@ -53,7 +53,7 @@ static void test_options(void) {
"--max-size", "1024",
"--lock-video-orientation=2", // optional arguments require '='
// "--no-control" is not compatible with "--turn-screen-off"
// "--no-mirror" is not compatible with "--fulscreen"
// "--no-playback" is not compatible with "--fulscreen"
"--port", "1234:1236",
"--push-target", "/sdcard/Movies",
"--record", "file",
@@ -108,8 +108,8 @@ static void test_options2(void) {
char *argv[] = {
"scrcpy",
"--no-control",
"--no-mirror",
"--record", "file.mp4", // cannot enable --no-mirror without recording
"--no-playback",
"--record", "file.mp4", // cannot enable --no-playback without recording
};
bool ok = scrcpy_parse_args(&args, ARRAY_LEN(argv), argv);
@@ -117,7 +117,7 @@ static void test_options2(void) {
const struct scrcpy_options *opts = &args.opts;
assert(!opts->control);
assert(!opts->mirror);
assert(!opts->playback);
assert(!strcmp(opts->record_filename, "file.mp4"));
assert(opts->record_format == SC_RECORD_FORMAT_MP4);
}