Page limits implemented, performance timer for buffering pages added on debug level 5
This commit is contained in:
parent
9a1fb0873f
commit
5c5ab6c058
4 changed files with 20 additions and 10 deletions
|
@ -59,7 +59,7 @@ static const char * DBG_LVL_LIST[] = {"NONE", "FAIL", "ERROR", "WARN", "INFO", "
|
|||
|
||||
|
||||
#ifndef SHM_DATASIZE
|
||||
#define SHM_DATASIZE 25
|
||||
#define SHM_DATASIZE 20
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -83,8 +83,13 @@ static const char * DBG_LVL_LIST[] = {"NONE", "FAIL", "ERROR", "WARN", "INFO", "
|
|||
/// 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.
|
||||
/// The data size or duration from where on stream data pages are switched over to the next page.
|
||||
/// The flip happens whenever either of these is matched.
|
||||
#define FLIP_DATA_PAGE_SIZE 8 * 1024 * 1024
|
||||
#define FLIP_TARGET_DURATION 60000
|
||||
/// The minimum duration for switching to next page. The flip will never happen before this.
|
||||
/// Does not affect live streams.
|
||||
#define FLIP_MIN_DURATION 20000
|
||||
|
||||
#define SHM_STREAM_INDEX "MstSTRM%s" //%s stream name
|
||||
#define SHM_TRACK_META "MstTRAK%s@%lu" //%s stream name, %lu track ID
|
||||
|
|
|
@ -79,7 +79,7 @@ JSON::Value Util::getStreamConfig(std::string streamname){
|
|||
FAIL_MSG("Stream opening denied: %s is longer than 100 characters (%lu).", streamname.c_str(), streamname.size());
|
||||
return result;
|
||||
}
|
||||
IPC::sharedPage mistConfOut(SHM_CONF, DEFAULT_CONF_PAGE_SIZE);
|
||||
IPC::sharedPage mistConfOut(SHM_CONF, DEFAULT_CONF_PAGE_SIZE, false, false);
|
||||
IPC::semaphore configLock(SEM_CONF, O_CREAT | O_RDWR, ACCESSPERMS, 1);
|
||||
configLock.wait();
|
||||
DTSC::Scan config = DTSC::Scan(mistConfOut.mapped, mistConfOut.len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue