Adding codec-profile option to the server exec params

(cherry picked from commit fa56950f43a14a501d03a79c626103ae3fc9f046)
This commit is contained in:
Tzah Mazuz 2020-03-16 15:04:13 +02:00
parent 1e3321cf58
commit e49657a5e3
2 changed files with 5 additions and 0 deletions

View file

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

View file

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