#ifdef HAVE_SRT
// Same, for SRT inputs.
- // TODO: On disconnect and reconnect, we might want to use the stream ID
for (SRTSOCKET sock : hotplugged_srt_cards_copy) {
char name[256];
int namelen = sizeof(name);
}
break;
}
+ if (!global_flags.enable_srt) { // Runtime UI toggle.
+ // Perhaps not as good as never listening in the first place,
+ // but much simpler to turn on and off.
+ srt_close(clientsock);
+ continue;
+ }
lock_guard<mutex> lock(hotplug_mutex);
hotplugged_srt_cards.push_back(clientsock);
}