mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-20 19:45:00 +00:00
Adding codec_profile to scrcpy client default options.
If the option is not requested with -c then the codec will be automatically choosen by the MediaCodec.
(cherry picked from commit 43aea79f6acc69f68feaee0494f45a05bce0f782)
(cherry picked from commit 504d6a42d5
)
This commit is contained in:
parent
d3281f4b67
commit
8f9205e76c
4 changed files with 5 additions and 0 deletions
|
@ -431,6 +431,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 },
|
||||
};
|
||||
|
||||
|
|
|
@ -286,6 +286,7 @@ scrcpy(const struct scrcpy_options *options) {
|
|||
.max_fps = options->max_fps,
|
||||
.lock_video_orientation = options->lock_video_orientation,
|
||||
.control = options->control,
|
||||
.codec_profile = options->codec_profile,
|
||||
};
|
||||
if (!server_start(&server, options->serial, ¶ms)) {
|
||||
return false;
|
||||
|
|
|
@ -34,6 +34,7 @@ struct scrcpy_options {
|
|||
bool render_expired_frames;
|
||||
bool prefer_text;
|
||||
bool window_borderless;
|
||||
uint32_t codec_profile;
|
||||
};
|
||||
|
||||
#define SCRCPY_OPTIONS_DEFAULT { \
|
||||
|
@ -64,6 +65,7 @@ struct scrcpy_options {
|
|||
.render_expired_frames = false, \
|
||||
.prefer_text = false, \
|
||||
.window_borderless = false, \
|
||||
.codec_profile = 0, \
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -44,6 +44,7 @@ struct server_params {
|
|||
uint16_t max_fps;
|
||||
int8_t lock_video_orientation;
|
||||
bool control;
|
||||
uint32_t codec_profile;
|
||||
};
|
||||
|
||||
// init default values
|
||||
|
|
Loading…
Add table
Reference in a new issue