]> git.sesse.net Git - cubemap/blobdiff - udpinput.cpp
Update metacube2.h with the latest version (sync with Nageru).
[cubemap] / udpinput.cpp
index 71364f1e79d2e98084b4c0b358fbd11c06c59f1c..e58ef9160ba1a1027f85efbcf270c4db8378537e 100644 (file)
@@ -6,6 +6,7 @@
 #include <sys/socket.h>
 #include <time.h>
 #include <unistd.h>
+#include <math.h>
 #include <string>
 
 #include "acceptor.h"
@@ -116,7 +117,9 @@ UDPInput::UDPInput(const string &url)
        stats.url = url;
        stats.bytes_received = 0;
        stats.data_bytes_received = 0;
+       stats.metadata_bytes_received = 0;
        stats.connect_time = time(NULL);
+       stats.latency_sec = HUGE_VAL;
 }
 
 UDPInput::UDPInput(const InputProto &serialized)
@@ -149,6 +152,7 @@ InputProto UDPInput::serialize() const
        serialized.set_bytes_received(stats.bytes_received);
        serialized.set_data_bytes_received(stats.data_bytes_received);
        serialized.set_connect_time(stats.connect_time);
+       serialized.set_is_metacube_encoded(false);
        return serialized;
 }