X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=httpinput.h;h=78c49c3df0f0cde346487698d2afdcf1b925bb5e;hp=fc39b30f7c14f5ca701fce33d48e89dcd7a7ccc4;hb=2a2689e25c5906f66c5154803aae1d705dbf33af;hpb=9abb89bcf7940e2ada9d708f86a218a56334f68d diff --git a/httpinput.h b/httpinput.h index fc39b30..78c49c3 100644 --- a/httpinput.h +++ b/httpinput.h @@ -21,10 +21,9 @@ public: virtual std::string get_url() const { return url; } - virtual void add_destination(int stream_index) - { - stream_indices.push_back(stream_index); - } + virtual void add_destination(int stream_index); + + virtual InputStats get_stats() const; private: // Actually does the download. @@ -81,7 +80,13 @@ private: bool has_metacube_header; // The socket we are downloading on (or -1). - int sock; + int sock; + + // Mutex protecting . + mutable pthread_mutex_t stats_mutex; + + // The current statistics for this connection. Protected by . + InputStats stats; }; #endif // !defined(_HTTPINPUT_H)