]> git.sesse.net Git - cubemap/blobdiff - main.cpp
Remove some code for pre-1.1.3 deserialization compatibility.
[cubemap] / main.cpp
index a7ad64c5748d07e8e7a2b6b66bacb01340d7b44d..0b8825a9da595b6f36bf7247cd75cfd25bdb619a 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -158,7 +158,7 @@ void create_config_inputs(const Config &config, multimap<InputKey, InputWithRefc
        }
        for (unsigned i = 0; i < config.udpstreams.size(); ++i) {
                const UDPStreamConfig &udpstream_config = config.udpstreams[i];
-               create_config_input(udpstream_config.src, Input::Encoding(udpstream_config.src_encoding), inputs);
+               create_config_input(udpstream_config.src, Input::INPUT_ENCODING_RAW, inputs);
        }
 }
 
@@ -231,9 +231,8 @@ void create_streams(const Config &config,
                        udpstream_config.multicast_iface_index);
 
                string src = udpstream_config.src;
-               Input::Encoding src_encoding = Input::Encoding(udpstream_config.src_encoding);
                if (!src.empty()) {
-                       multimap<InputKey, InputWithRefcount>::iterator input_it = inputs->find(make_pair(src, src_encoding));
+                       multimap<InputKey, InputWithRefcount>::iterator 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;
@@ -478,26 +477,6 @@ start:
        // Find all streams in the configuration file, create them, and connect to the inputs.
        create_streams(config, deserialized_urls, &inputs);
        vector<Acceptor *> acceptors = create_acceptors(config, &deserialized_acceptors);
-
-       // Convert old-style timestamps to new-style timestamps for all clients;
-       // this simplifies the sort below.
-       {
-               timespec now_monotonic;
-               if (clock_gettime(CLOCK_MONOTONIC_COARSE, &now_monotonic) == -1) {
-                       log(ERROR, "clock_gettime(CLOCK_MONOTONIC_COARSE) failed.");
-                       exit(1);
-               }
-               long delta_sec = now_monotonic.tv_sec - time(NULL);
-
-               for (int i = 0; i < loaded_state.clients_size(); ++i) {
-                       ClientProto* client = loaded_state.mutable_clients(i);
-                       if (client->has_connect_time_old()) {
-                               client->set_connect_time_sec(client->connect_time_old() + delta_sec);
-                               client->set_connect_time_nsec(now_monotonic.tv_nsec);
-                               client->clear_connect_time_old();
-                       }
-               }
-       }
        
        // Put back the existing clients. It doesn't matter which server we
        // allocate them to, so just do round-robin. However, we need to sort them