This commit is contained in:
bmy
2024-07-01 01:30:45 +08:00
parent 4b33e55c57
commit 564fd4439f
3 changed files with 25 additions and 12 deletions

21
main.cc
View File

@@ -41,23 +41,32 @@ int main(int argc, char **argv)
toml_datum_t server_0_index = toml_int_in(server, "server_0_index");
toml_datum_t server_1_index = toml_int_in(server, "server_1_index");
toml_datum_t server_2_index = toml_int_in(server, "server_2_index");
// toml_datum_t server_2_index = toml_int_in(server, "server_2_index");
toml_datum_t server_0_port = toml_int_in(server, "server_0_port");
toml_datum_t server_1_port = toml_int_in(server, "server_1_port");
toml_datum_t server_2_port = toml_int_in(server, "server_2_port");
// toml_datum_t server_2_port = toml_int_in(server, "server_2_port");
capture cap0(server_0_index.u.i, server_0_port.u.i);
capture cap1(server_1_index.u.i, server_1_port.u.i, 320, 240, 60, true);
capture cap2(server_2_index.u.i, server_2_port.u.i);
// capture cap2(server_2_index.u.i, server_2_port.u.i);
cap0.start();
cap1.start();
cap2.start();
// cap2.start();
while (1)
if (cap0.is_open())
{
usleep(1);
cap0.thread->join();
}
if (cap1.is_open())
{
cap1.thread->join();
}
// if (cap2.is_open())
// {
// cap2.thread->join();
// }
// while (true)
// {
// cap >> frame;