X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=server.h;h=edcdc83438b9a0322f382514601abf71e46f43ff;hp=523f5c55f376eed2ca9becf25a15c60a9172ba70;hb=e0b47eba2f5ec1aca1d02adc9fb4ffc7293d5c0f;hpb=8f44468bfe4a1d1607b0ab7044c3071605ae1fa7 diff --git a/server.h b/server.h index 523f5c5..edcdc83 100644 --- 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 below, you will need to take before this one. + // Mutex protecting queued_add_clients and streams[..]->queued_data. + // Note that if you want to hold both this and below, + // you will need to take 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 . std::vector queued_add_clients; - std::map queued_data; // All variables below this line are protected by the mutex. mutable pthread_mutex_t mutex;