diff --git a/lib/defines.h b/lib/defines.h index ee291a43..0939a968 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -49,3 +49,15 @@ static const char * DBG_LVL_LIST[] = {"NONE", "FAIL", "ERROR", "WARN", "INFO", " #define INFO_MSG(msg, ...) DEBUG_MSG(DLVL_DEVEL, msg, ##__VA_ARGS__) #endif + +/// The size used for stream header pages under Windows, where they cannot be size-detected. +#define DEFAULT_META_PAGE_SIZE 16 * 1024 * 1024 + +/// The size used for stream data pages under Windows, where they cannot be size-detected. +#define DEFAULT_DATA_PAGE_SIZE 25 * 1024 * 1024 + +/// The size used for server configuration pages. +#define DEFAULT_CONF_PAGE_SIZE 4 * 1024 * 1024 + +/// The position from where on stream data pages are switched over to the next page. +#define FLIP_DATA_PAGE_SIZE 8 * 1024 * 1024 diff --git a/lib/stream.cpp b/lib/stream.cpp index 36d944b4..1300a0c7 100644 --- a/lib/stream.cpp +++ b/lib/stream.cpp @@ -71,7 +71,7 @@ void Util::sanitizeName(std::string & streamname) { /// Starts a process for a VoD stream. bool Util::startInput(std::string streamname, std::string filename, bool forkFirst) { - IPC::sharedPage mistConfOut("!mistConfig", 4*1024*1024); + IPC::sharedPage mistConfOut("!mistConfig", DEFAULT_CONF_PAGE_SIZE); IPC::semaphore configLock("!mistConfLock", O_CREAT | O_RDWR, ACCESSPERMS, 1); configLock.wait(); DTSC::Scan config = DTSC::Scan(mistConfOut.mapped, mistConfOut.len);