From 1b12204dd49a99b2270e06b58bd38fe9404515a6 Mon Sep 17 00:00:00 2001 From: Tzah Mazuz Date: Fri, 17 Apr 2020 20:57:10 +0300 Subject: [PATCH] fixup! Added help and parsing of the codec-profile option --- app/scrcpy.1 | 8 ++++++-- app/src/cli.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/scrcpy.1 b/app/scrcpy.1 index 27ba5d792c..443bb19d57 100644 --- a/app/scrcpy.1 +++ b/app/scrcpy.1 @@ -152,8 +152,12 @@ Set the initial window height. Default is 0 (automatic).\n .TP -.BI "\-P, \-\-\codec\-profile " value -Request specific encoding codec profile, see AVC profiles at: https://developer.android.com/reference/android/media/MediaCodecInfo.CodecProfileLevel for valid codec profile values. Default is 0 (automatic). +.BI "\-\-\codec\-options " 'options' +'options' is a list of key=value pairs seperated by comma\n +for the device encoder.\n +For a list of possible codec options:\n +https://developer.android.com/reference/android/media/MediaCodecInfo\n +Currently supported keys: [profile, level].\n .SH SHORTCUTS diff --git a/app/src/cli.c b/app/src/cli.c index f62b7f9fe6..1d7bc63107 100644 --- a/app/src/cli.c +++ b/app/src/cli.c @@ -445,7 +445,7 @@ scrcpy_parse_args(struct scrcpy_cli_args *args, int argc, char *argv[]) { optind = 0; // reset to start from the first argument in tests int c; - while ((c = getopt_long(argc, argv, "b:c:fF:hm:nNp:r:s:StTv:", long_options, + while ((c = getopt_long(argc, argv, "b:c:fF:hm:nNp:r:s:StTv", long_options, NULL)) != -1) { switch (c) { case 'b':