mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-17 05:24:19 +01:00
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:
@@ -12,6 +12,7 @@ struct server {
|
||||
Uint16 local_port;
|
||||
SDL_bool tunnel_enabled;
|
||||
SDL_bool tunnel_forward; // use "adb forward" instead of "adb reverse"
|
||||
SDL_bool send_frame_meta; // request frame PTS to be able to record properly
|
||||
SDL_bool server_copied_to_device;
|
||||
};
|
||||
|
||||
@@ -23,6 +24,7 @@ struct server {
|
||||
.local_port = 0, \
|
||||
.tunnel_enabled = SDL_FALSE, \
|
||||
.tunnel_forward = SDL_FALSE, \
|
||||
.send_frame_meta = SDL_FALSE, \
|
||||
.server_copied_to_device = SDL_FALSE, \
|
||||
}
|
||||
|
||||
@@ -30,8 +32,9 @@ struct server {
|
||||
void server_init(struct server *server);
|
||||
|
||||
// push, enable tunnel et start the server
|
||||
SDL_bool server_start(struct server *server, const char *serial, Uint16 local_port,
|
||||
Uint16 max_size, Uint32 bit_rate, const char *crop);
|
||||
SDL_bool server_start(struct server *server, const char *serial,
|
||||
Uint16 local_port, Uint16 max_size, Uint32 bit_rate,
|
||||
const char *crop, SDL_bool send_frame_meta);
|
||||
|
||||
// block until the communication with the server is established
|
||||
socket_t server_connect_to(struct server *server);
|
||||
|
||||
Reference in New Issue
Block a user