mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-02-16 10:30:47 +00:00
Use different default bitrates for different resolutions
This commit is contained in:
11
src/main.c
11
src/main.c
@@ -150,7 +150,7 @@ int main(int argc, char* argv[]) {
|
||||
config.width = 1280;
|
||||
config.height = 720;
|
||||
config.fps = 60;
|
||||
config.bitrate = 8000;
|
||||
config.bitrate = -1;
|
||||
config.packetSize = 1024;
|
||||
|
||||
static struct option long_options[] = {
|
||||
@@ -246,6 +246,15 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
if (config.bitrate == -1) {
|
||||
if (config.height >= 1080 && config.fps >= 60)
|
||||
config.bitrate = 20000;
|
||||
else if (config.height >= 1080 || config.fps >= 60)
|
||||
config.bitrate = 10000;
|
||||
else
|
||||
config.bitrate = 5000;
|
||||
}
|
||||
|
||||
if (inputAdded && !mapped) {
|
||||
fprintf(stderr, "Mapping option should be followed by the input to be mapped.\n");
|
||||
exit(-1);
|
||||
|
||||
Reference in New Issue
Block a user