Group server params in a struct

Starting the server requires more and more parameters. For clarity,
group them in a struct.
This commit is contained in:
Romain Vimont
2019-06-04 23:59:55 +02:00
parent c8a6783494
commit ca767ba364
3 changed files with 29 additions and 23 deletions

View File

@@ -29,6 +29,14 @@ struct server {
.tunnel_forward = false, \
}
struct server_params {
const char *crop;
uint16_t local_port;
uint16_t max_size;
uint32_t bit_rate;
bool send_frame_meta;
};
// init default values
void
server_init(struct server *server);
@@ -36,8 +44,7 @@ server_init(struct server *server);
// push, enable tunnel et start the server
bool
server_start(struct server *server, const char *serial,
uint16_t local_port, uint16_t max_size, uint32_t bit_rate,
const char *crop, bool send_frame_meta);
const struct server_params *params);
// block until the communication with the server is established
bool