diff --git a/app/src/cli.c b/app/src/cli.c index d9e1013a0a..13394cdc1f 100644 --- a/app/src/cli.c +++ b/app/src/cli.c @@ -371,6 +371,7 @@ scrcpy_parse_args(struct scrcpy_cli_args *args, int argc, char *argv[]) { {"window-height", required_argument, NULL, OPT_WINDOW_HEIGHT}, {"window-borderless", no_argument, NULL, OPT_WINDOW_BORDERLESS}, + {"codec-profile", required_argument, NULL, 'P'}, {NULL, 0, NULL, 0 }, }; diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index 17be1ed415..81c5d0ae49 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -285,6 +285,7 @@ scrcpy(const struct scrcpy_options *options) { .bit_rate = options->bit_rate, .max_fps = options->max_fps, .control = options->control, + .codec_profile = options->codec_profile, }; if (!server_start(&server, options->serial, ¶ms)) { return false; diff --git a/app/src/scrcpy.h b/app/src/scrcpy.h index 75de8717f3..3c4e6dddb8 100644 --- a/app/src/scrcpy.h +++ b/app/src/scrcpy.h @@ -32,6 +32,7 @@ struct scrcpy_options { bool render_expired_frames; bool prefer_text; bool window_borderless; + uint32_t codec_profile; }; #define SCRCPY_OPTIONS_DEFAULT { \ @@ -58,6 +59,7 @@ struct scrcpy_options { .render_expired_frames = false, \ .prefer_text = false, \ .window_borderless = false, \ + .codec_profile = 0, \ } bool diff --git a/app/src/server.h b/app/src/server.h index 0cb1ab3a6d..1307ab2cce 100644 --- a/app/src/server.h +++ b/app/src/server.h @@ -37,6 +37,7 @@ struct server_params { uint32_t bit_rate; uint16_t max_fps; bool control; + uint32_t codec_profile; }; // init default values