Adding codec-profile option to the server exec params

(cherry picked from commit da3b0142ab2ce45a20c9acf8f8da765f3ba2bc8b)
This commit is contained in:
Tzah Mazuz 2020-03-16 15:04:13 +02:00
parent a4ef318ae3
commit a1c1b2377f
2 changed files with 6 additions and 0 deletions

View file

@ -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);

View file

@ -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 {