Adding codec-profile option to the server exec params

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

View file

@ -234,10 +234,12 @@ execute_server(struct server *server, const struct server_params *params) {
char bit_rate_string[11];
char max_fps_string[6];
char lock_video_orientation_string[3];
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(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 +256,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 +330,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 {