- if (stream_config.mark_pool != -1) {
- servers->set_mark_pool(stream_config.stream_id,
- mark_pools[stream_config.mark_pool]);
+ servers->set_pacing_rate(stream_index, stream_config.pacing_rate);
+
+ string src = stream_config.src;
+ Input::Encoding src_encoding = Input::Encoding(stream_config.src_encoding);
+ if (!src.empty()) {
+ const auto input_it = inputs->find(make_pair(src, src_encoding));
+ if (input_it != inputs->end()) {
+ input_it->second.input->add_destination(stream_index);
+ ++input_it->second.refcount;
+ }
+ }
+ }
+
+ // Warn about any streams servers we've lost.
+ for (const string &url : expecting_urls) {
+ 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 (const UDPStreamConfig &udpstream_config : config.udpstreams) {
+ 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()) {
+ auto input_it = inputs->find(make_pair(src, Input::INPUT_ENCODING_RAW));
+ assert(input_it != inputs->end());
+ input_it->second.input->add_destination(stream_index);
+ ++input_it->second.refcount;