Capabilities: query in 100 ms interval

This commit is contained in:
Martin Pulec
2016-01-07 15:25:02 +01:00
parent a35a3b9d05
commit bc7ebcd380

View File

@@ -55,10 +55,10 @@ void print_capabilities(struct module *root, bool use_vidcap)
// try to figure out actual input video format
struct video_desc desc{};
if (use_vidcap && root) {
for (int attempt = 0; attempt < 2; ++attempt) {
for (int attempt = 0; attempt < 20; ++attempt) {
struct msg_sender *m = (struct msg_sender *) new_message(sizeof(struct msg_sender));
m->type = SENDER_MSG_QUERY_VIDEO_MODE;
struct response *r = send_message_sync(root, "sender", (struct message *) m, 1000);
struct response *r = send_message_sync(root, "sender", (struct message *) m, 100);
if (response_get_status(r) == RESPONSE_OK) {
const char *text = response_get_text(r);
istringstream iss(text);