]> git.sesse.net Git - cubemap/blobdiff - server.h
Add Metacube headers in add_data_deferred(), not add_data().
[cubemap] / server.h
index 523f5c55f376eed2ca9becf25a15c60a9172ba70..edcdc83438b9a0322f382514601abf71e46f43ff 100644 (file)
--- a/server.h
+++ b/server.h
@@ -55,13 +55,14 @@ public:
        CubemapStateProto serialize();
        void add_client_from_serialized(const ClientProto &client);
        void add_stream(const std::string &stream_id, size_t bytes_received, Stream::Encoding encoding);
-       void add_stream_from_serialized(const StreamProto &stream);
+       void add_stream_from_serialized(const StreamProto &stream, int data_fd);
        void set_backlog_size(const std::string &stream_id, size_t new_size);
        void set_encoding(const std::string &stream_id, Stream::Encoding encoding);
 
 private:
-       // Mutex protecting queued_data only. Note that if you want to hold both this
-       // and <mutex> below, you will need to take <mutex> before this one.
+       // Mutex protecting queued_add_clients and streams[..]->queued_data.
+       // Note that if you want to hold both this and <mutex> below,
+       // you will need to take <mutex> before this one.
        mutable pthread_mutex_t queued_data_mutex;
 
        // Deferred commands that should be run from the do_work() thread as soon as possible.
@@ -75,7 +76,6 @@ private:
        //      
        // Protected by <queued_data_mutex>.
        std::vector<int> queued_add_clients;
-       std::map<std::string, std::string> queued_data;
 
        // All variables below this line are protected by the mutex.
        mutable pthread_mutex_t mutex;