- fprintf(stderr, "\nCubemap starting.\n");
-
- struct timeval serialize_start;
- bool is_reexec = false;
-
- string config_filename = (argc == 1) ? "cubemap.config" : argv[1];
- vector<ConfigLine> config = parse_config(config_filename);
-
- int port = fetch_config_int(config, "port", 1, 65535, PARAMATER_MANDATORY);
- int num_servers = fetch_config_int(config, "num_servers", 1, 20000, PARAMATER_MANDATORY); // Insanely high max limit.
-
- servers = new ServerPool(num_servers);
-
- CubemapStateProto loaded_state;
- int server_sock = -1, old_port = -1;
- set<string> deserialized_stream_ids;
- map<string, Input *> deserialized_inputs;
- if (argc == 4 && strcmp(argv[2], "-state") == 0) {
- is_reexec = true;
-
- fprintf(stderr, "Deserializing state from previous process... ");
- int state_fd = atoi(argv[3]);
- loaded_state = read_tempfile(state_fd);
-
- serialize_start.tv_sec = loaded_state.serialize_start_sec();
- serialize_start.tv_usec = loaded_state.serialize_start_usec();
-
- // Deserialize the streams.
- for (int i = 0; i < loaded_state.streams_size(); ++i) {
- servers->add_stream_from_serialized(loaded_state.streams(i));
- deserialized_stream_ids.insert(loaded_state.streams(i).stream_id());
+ for (unsigned i = 0; i < config.streams.size(); ++i) {
+ const StreamConfig &stream_config = config.streams[i];
+ if (stream_config.src == "delete") {
+ log(INFO, "Deleting stream '%s'.", stream_config.url.c_str());
+ deleted_urls->insert(stream_config.url);