diff --git a/app/src/server.c b/app/src/server.c index ff167aeb..5c0b7929 100644 --- a/app/src/server.c +++ b/app/src/server.c @@ -124,9 +124,11 @@ execute_server(struct server *server, const struct server_params *params) { char max_size_string[6]; char bit_rate_string[11]; char max_fps_string[6]; + char codec_profile_string[11]; sprintf(max_size_string, "%"PRIu16, params->max_size); sprintf(bit_rate_string, "%"PRIu32, params->bit_rate); sprintf(max_fps_string, "%"PRIu16, params->max_fps); + sprintf(codec_profile_string, "%"PRIu32, params->codec_profile); const char *const cmd[] = { "shell", "CLASSPATH=" DEVICE_SERVER_PATH, @@ -146,6 +148,7 @@ execute_server(struct server *server, const struct server_params *params) { params->crop ? params->crop : "-", "true", // always send frame meta (packet boundaries + timestamp) params->control ? "true" : "false", + codec_profile_string, }; #ifdef SERVER_DEBUGGER LOGI("Server debugger waiting for a client on device port " @@ -222,6 +225,7 @@ bool server_start(struct server *server, const char *serial, const struct server_params *params) { server->local_port = params->local_port; + server->codec_profile = params->codec_profile; if (serial) { server->serial = SDL_strdup(serial); diff --git a/app/src/server.h b/app/src/server.h index 1307ab2c..967f378b 100644 --- a/app/src/server.h +++ b/app/src/server.h @@ -17,6 +17,7 @@ struct server { uint16_t local_port; bool tunnel_enabled; bool tunnel_forward; // use "adb forward" instead of "adb reverse" + uint32_t codec_profile; }; #define SERVER_INITIALIZER { \ @@ -28,6 +29,7 @@ struct server { .local_port = 0, \ .tunnel_enabled = false, \ .tunnel_forward = false, \ + .codec_profile = 0, \ } struct server_params {