Skip to content

Commit

Permalink
Adding codec-profile option to the server exec params
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzah Mazuz committed Mar 19, 2020
1 parent a5b83c1 commit fa56950
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions app/src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 { \
Expand All @@ -34,6 +35,7 @@ struct server {
.local_port = 0, \
.tunnel_enabled = false, \
.tunnel_forward = false, \
.codec_profile = 0,
}

struct server_params {
Expand Down

0 comments on commit fa56950

Please sign in to comment.