- if (input == NULL) {
- input = create_input(stream_id, src);
- if (input == NULL) {
- fprintf(stderr, "ERROR: did not understand URL '%s', clients will not get any data.\n",
- src.c_str());
- continue;
- }
+ }
+
+ // Warn about any streams servers we've lost.
+ for (set<string>::const_iterator stream_it = expecting_urls.begin();
+ stream_it != expecting_urls.end();
+ ++stream_it) {
+ string url = *stream_it;
+ log(WARNING, "stream '%s' disappeared from the configuration file. "
+ "It will not be deleted, but clients will not get any new inputs. "
+ "If you really meant to delete it, set src=delete and reload.",
+ url.c_str());
+ }
+
+ // UDP streams.
+ for (unsigned i = 0; i < config.udpstreams.size(); ++i) {
+ const UDPStreamConfig &udpstream_config = config.udpstreams[i];
+ int stream_index = servers->add_udpstream(
+ udpstream_config.dst,
+ udpstream_config.pacing_rate,
+ udpstream_config.ttl,
+ udpstream_config.multicast_iface_index);
+
+ string src = udpstream_config.src;
+ if (!src.empty()) {
+ multimap<string, InputWithRefcount>::iterator input_it = inputs->find(src);
+ assert(input_it != inputs->end());
+ input_it->second.input->add_destination(stream_index);
+ ++input_it->second.refcount;