- if (config[i].parameters.count("src") == 0) {
- fprintf(stderr, "WARNING: stream '%s' has no src= attribute, clients will not get any data.\n",
- stream_id.c_str());
- continue;
- }
-
- string src = config[i].parameters["src"];
- Input *input = NULL;
- if (deserialized_inputs.count(stream_id) != 0) {
- input = deserialized_inputs[stream_id];
- if (input->get_url() != src) {
- fprintf(stderr, "INFO: Stream '%s' has changed URL from '%s' to '%s', restarting input.\n",
- stream_id.c_str(), input->get_url().c_str(), src.c_str());
- delete input;
- input = NULL;
- }
- deserialized_inputs.erase(stream_id);
- }
- if (input == NULL) {
- input = new Input(stream_id, src);
- }
- input->run();
- inputs.push_back(input);
- }
-
- if (is_reexec) {
- // Put back the existing clients. It doesn't matter which server we
- // allocate them to, so just do round-robin. However, we need to add
- // them after the mark pools have been set up.
- for (int i = 0; i < loaded_state.clients_size(); ++i) {
- servers->add_client_from_serialized(loaded_state.clients(i));
- }
+ input_stats_thread = new InputStatsThread(config.input_stats_file, config.input_stats_interval, inputs_no_refcount);
+ input_stats_thread->run();