]> git.sesse.net Git - cubemap/blobdiff - udpinput.cpp
Refer to streams internally mostly by an index, not the stream_id.
[cubemap] / udpinput.cpp
index 07bf63d344e8ba6e38d7d8d399acafad3016058c..db544857bf367e0cfb0923c4de7343496d01facd 100644 (file)
@@ -67,10 +67,10 @@ void UDPInput::construct_header()
                "Connection: close\r\n";
 }
        
-void UDPInput::add_destination(const string &stream_id)
+void UDPInput::add_destination(int stream_index)
 {
-       stream_ids.push_back(stream_id);
-       servers->set_header(stream_id, http_header, "");
+       stream_indices.push_back(stream_index);
+       servers->set_header(stream_index, http_header, "");
 }
 
 void UDPInput::do_work()
@@ -106,8 +106,8 @@ void UDPInput::do_work()
                        continue;
                }
                
-               for (size_t i = 0; i < stream_ids.size(); ++i) {
-                       servers->add_data(stream_ids[i], buf, ret);
+               for (size_t i = 0; i < stream_indices.size(); ++i) {
+                       servers->add_data(stream_indices[i], buf, ret);
                }
        }
 }