From fa56950f43a14a501d03a79c626103ae3fc9f046 Mon Sep 17 00:00:00 2001 From: Tzah Mazuz Date: Mon, 16 Mar 2020 15:04:13 +0200 Subject: [PATCH] Adding codec-profile option to the server exec params --- app/src/server.c | 3 +++ app/src/server.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/app/src/server.c b/app/src/server.c index 4b2c1866cc..1d9efe8b5a 100644 --- a/app/src/server.c +++ b/app/src/server.c @@ -238,6 +238,7 @@ execute_server(struct server *server, const struct server_params *params) { sprintf(bit_rate_string, "%"PRIu32, params->bit_rate); sprintf(max_fps_string, "%"PRIu16, params->max_fps); sprintf(lock_video_orientation_string, "%"PRIi8, params->lock_video_orientation); + sprintf(codec_profile_string, "%"PRIu32, params->codec_profile); const char *const cmd[] = { "shell", "CLASSPATH=" DEVICE_SERVER_PATH, @@ -254,6 +255,7 @@ execute_server(struct server *server, const struct server_params *params) { bit_rate_string, max_fps_string, lock_video_orientation_string, + codec_profile_string, server->tunnel_forward ? "true" : "false", params->crop ? params->crop : "-", "true", // always send frame meta (packet boundaries + timestamp) @@ -327,6 +329,7 @@ bool server_start(struct server *server, const char *serial, const struct server_params *params) { server->port_range = params->port_range; + 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 f16ad6b43c..974cb4190a 100644 --- a/app/src/server.h +++ b/app/src/server.h @@ -19,6 +19,7 @@ struct server { uint16_t local_port; // selected from port_range bool tunnel_enabled; bool tunnel_forward; // use "adb forward" instead of "adb reverse" + uint32_t codec_profile; }; #define SERVER_INITIALIZER { \ @@ -34,6 +35,7 @@ struct server { .local_port = 0, \ .tunnel_enabled = false, \ .tunnel_forward = false, \ + .codec_profile = 0, } struct server_params {