Add support for forced prebuffering.
[cubemap] / config.cpp
index 0917961..aa0f670 100644 (file)
@@ -235,6 +235,13 @@ bool parse_stream(const ConfigLine &line, Config *config)
                stream.backlog_size = atoi(backlog_it->second.c_str());
        }
 
+       map<string, string>::const_iterator prebuffer_it = line.parameters.find("force_prebuffer");
+       if (prebuffer_it == line.parameters.end()) {
+               stream.prebuffering_bytes = 0;
+       } else {
+               stream.prebuffering_bytes = atoi(prebuffer_it->second.c_str());
+       }
+
        // Parse encoding.
        map<string, string>::const_iterator encoding_parm_it = line.parameters.find("encoding");
        if (encoding_parm_it == line.parameters.end() ||