X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=server.h;h=49f9d51badedd68c02ae2e7436b6807f1eccb060;hp=4b3aab8e9b7250eb47e634805f1978c5a4071ce2;hb=6889a665614e926437484a556124a5ff60363568;hpb=9b8129d05b5d1ec0caed09a40f170e967afc60b3 diff --git a/server.h b/server.h index 4b3aab8..49f9d51 100644 --- a/server.h +++ b/server.h @@ -23,7 +23,6 @@ struct Stream; #define MAX_CLIENT_REQUEST 16384 class CubemapStateProto; -class MarkPool; class StreamProto; class Server : public Thread { @@ -39,9 +38,9 @@ public: const std::string &http_header, const std::string &stream_header); - // Set that the given stream should use the given mark pool from now on. + // Set that the given stream should use the given max pacing rate from now on. // NOTE: This should be set before any clients are connected! - void set_mark_pool(int stream_index, MarkPool *mark_pool); + void set_pacing_rate(int stream_index, uint32_t pacing_rate); // These will be deferred until the next time an iteration in do_work() happens, // and the order between them are undefined. @@ -54,7 +53,7 @@ public: // at the same time). CubemapStateProto serialize(); void add_client_from_serialized(const ClientProto &client); - int add_stream(const std::string &url, size_t bytes_received, Stream::Encoding encoding); + int add_stream(const std::string &url, size_t bytes_received, size_t prebuffering_bytes, Stream::Encoding encoding); int add_stream_from_serialized(const StreamProto &stream, int data_fd); int lookup_stream_by_url(const std::string &url) const; void set_backlog_size(int stream_index, size_t new_size);