X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=config.cpp;h=32e0e654164142d6dcd6f8dffc419fffc35483dc;hp=489711363482149c5b0f8d89621dc2c294c2b81a;hb=f51b3892514540ff3f08ab052296091f3a6f7a93;hpb=51e357cb8decceaeab47332492962bc0175b0b13 diff --git a/config.cpp b/config.cpp index 4897113..32e0e65 100644 --- a/config.cpp +++ b/config.cpp @@ -13,6 +13,8 @@ using namespace std; +#define DEFAULT_BACKLOG_SIZE 1048576 + struct ConfigLine { string keyword; vector arguments; @@ -197,6 +199,13 @@ bool parse_stream(const ConfigLine &line, Config *config) // TODO: Verify that the URL is parseable? } + map::const_iterator backlog_it = line.parameters.find("backlog_size"); + if (backlog_it == line.parameters.end()) { + stream.backlog_size = DEFAULT_BACKLOG_SIZE; + } else { + stream.backlog_size = atoi(backlog_it->second.c_str()); + } + // Parse marks, if so desired. map::const_iterator mark_parm_it = line.parameters.find("mark"); if (mark_parm_it == line.parameters.end()) {