Remove default bit-rate on client side
If no bit-rate is passed, let the server use the default value (8Mbps). This avoids to define a default value on both sides, and to pass the default bit-rate as an argument when starting the server. PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757>
This commit is contained in:
@@ -107,7 +107,7 @@ static const struct sc_option options[] = {
|
||||
.argdesc = "value",
|
||||
.text = "Encode the video at the given bit-rate, expressed in bits/s. "
|
||||
"Unit suffixes are supported: 'K' (x1000) and 'M' (x1000000).\n"
|
||||
"Default is " STR(DEFAULT_BIT_RATE) ".",
|
||||
"Default is 8M (8000000).",
|
||||
},
|
||||
{
|
||||
.longopt_id = OPT_CODEC,
|
||||
|
||||
@@ -28,7 +28,7 @@ const struct scrcpy_options scrcpy_options_default = {
|
||||
.count = 2,
|
||||
},
|
||||
.max_size = 0,
|
||||
.bit_rate = DEFAULT_BIT_RATE,
|
||||
.bit_rate = 0,
|
||||
.max_fps = 0,
|
||||
.lock_video_orientation = SC_LOCK_VIDEO_ORIENTATION_UNLOCKED,
|
||||
.rotation = 0,
|
||||
|
||||
@@ -215,8 +215,10 @@ execute_server(struct sc_server *server,
|
||||
|
||||
ADD_PARAM("scid=%08x", params->scid);
|
||||
ADD_PARAM("log_level=%s", log_level_to_server_string(params->log_level));
|
||||
ADD_PARAM("bit_rate=%" PRIu32, params->bit_rate);
|
||||
|
||||
if (params->bit_rate) {
|
||||
ADD_PARAM("bit_rate=%" PRIu32, params->bit_rate);
|
||||
}
|
||||
if (!params->audio) {
|
||||
ADD_PARAM("audio=false");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user