]> git.sesse.net Git - cubemap/blobdiff - client.h
Add support for forced prebuffering.
[cubemap] / client.h
index 3767112b759b2c0c85bcf804b2ca77106ef68f78..d23b860767e16ecc372ab5726c6df8f2044ae7e3 100644 (file)
--- a/client.h
+++ b/client.h
@@ -37,7 +37,7 @@ struct Client {
        std::string remote_addr;
        time_t connect_time;
 
        std::string remote_addr;
        time_t connect_time;
 
-       enum State { READING_REQUEST, SENDING_HEADER, SENDING_DATA, SENDING_ERROR, WAITING_FOR_KEYFRAME };
+       enum State { READING_REQUEST, SENDING_HEADER, SENDING_DATA, SENDING_ERROR, WAITING_FOR_KEYFRAME, PREBUFFERING };
        State state;
 
        // The HTTP request, as sent by the client. If we are in READING_REQUEST,
        State state;
 
        // The HTTP request, as sent by the client. If we are in READING_REQUEST,
@@ -62,8 +62,8 @@ struct Client {
        // -1 means we want to send from the end of the backlog (the normal case),
        // although only at a keyframe.
        // -2 means we want to send from the _beginning_ of the backlog.
        // -1 means we want to send from the end of the backlog (the normal case),
        // although only at a keyframe.
        // -2 means we want to send from the _beginning_ of the backlog.
-       // Once we go into WAITING_FOR_KEYFRAME or SENDING_DATA, these negative
-       // values will be translated to real numbers.
+       // Once we go into WAITING_FOR_KEYFRAME, PREBUFFERING or SENDING_DATA,
+       // these negative values will be translated to real numbers.
        size_t stream_pos;
 
        // Number of bytes we've sent of data. Only relevant for SENDING_DATA.
        size_t stream_pos;
 
        // Number of bytes we've sent of data. Only relevant for SENDING_DATA.