Send frame meta only if recording is enabled

The client needs the PTS for each frame only if recording is enabled.
Otherwise, the PTS are not necessary, and the protocol is more
straighforward.
This commit is contained in:
Romain Vimont
2018-11-11 14:41:54 +01:00
parent 22bf0c19d6
commit 345f8858d3
7 changed files with 75 additions and 29 deletions

View File

@@ -140,8 +140,10 @@ static void wait_show_touches(process_t process) {
}
SDL_bool scrcpy(const struct scrcpy_options *options) {
SDL_bool send_frame_meta = !!options->record_filename;
if (!server_start(&server, options->serial, options->port,
options->max_size, options->bit_rate, options->crop)) {
options->max_size, options->bit_rate, options->crop,
send_frame_meta)) {
return SDL_FALSE;
}