diff options
author | thlo <smarttv640@gmail.com> | 2013-11-26 22:11:45 +0100 |
---|---|---|
committer | thlo <smarttv640@gmail.com> | 2013-11-26 22:11:45 +0100 |
commit | 802f35d8a1a7f06dd76068d30f429da6dad9f227 (patch) | |
tree | c6cee6003b66ce7097ffeaa139edb18340e7f5ed /stvw_cfg.c | |
parent | 3ac54dc3c1f6dd6d8b9adc4024e5003bd4532cae (diff) | |
download | vdr-plugin-smarttvweb-802f35d8a1a7f06dd76068d30f429da6dad9f227.tar.gz vdr-plugin-smarttvweb-802f35d8a1a7f06dd76068d30f429da6dad9f227.tar.bz2 |
first version of the built-in live solution
Diffstat (limited to 'stvw_cfg.c')
-rwxr-xr-x | stvw_cfg.c | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -33,7 +33,8 @@ cSmartTvConfig::cSmartTvConfig(string d): mConfigDir(d), mLog(NULL), mCfgFile(NULL), mLogFile(), mMediaFolder(), mSegmentDuration(), mHasMinBufferTime(), mHasBitrateCorrection(), - mLiveChannels(), mGroupSep(IGNORE), mServerAddress(""), mServerPort(8000), mCmds(false) { + mLiveChannels(), mGroupSep(IGNORE), mServerAddress(""), mServerPort(8000), mCmds(false), mUseStreamDev4Live(true), + mBuiltInLiveStartMode (2), mBuiltInLivePktBuf4Hd(150), mBuiltInLivePktBuf4Sd(75) { #ifndef STANDALONE mLogFile= ""; @@ -68,6 +69,11 @@ void cSmartTvConfig::printConfig() { *(mLog->log()) << " LiveChannels: " << mLiveChannels << endl; *(mLog->log()) << " GroupSeparators: " << ((mGroupSep==IGNORE)? "Ignore" : ((mGroupSep==EMPTYIGNORE)? "EmptyIgnore": "EmptyFolderDown")) << endl; *(mLog->log()) << " ServerAddress: " << mServerAddress << endl; + *(mLog->log()) << " UseStreamDev4Live: " << ((mUseStreamDev4Live) ? "true" :"false") << endl; + *(mLog->log()) << " BuiltInLiveStartMode: " << mBuiltInLiveStartMode << endl; + *(mLog->log()) << " BuiltInLivePktBuf4Hd: " << mBuiltInLivePktBuf4Hd << endl; + *(mLog->log()) << " BuiltInLivePktBuf4Sd: " << mBuiltInLivePktBuf4Sd << endl; + } @@ -155,6 +161,27 @@ void cSmartTvConfig::readConfig() { continue; } + if (strcmp(attr, "UseStreamDev4Live") == 0) { + if (strcmp(value, "false") == 0) + mUseStreamDev4Live = false; + continue; + } + + if (strcmp(attr, "BuiltInLiveStartMode") == 0) { + mBuiltInLiveStartMode = atoi(value); + if ((mBuiltInLiveStartMode <0) || (mBuiltInLiveStartMode > 2)) + mBuiltInLiveStartMode = 0; + continue; + } + + if (strcmp(attr, "BuiltInLivePktBuf4Hd") == 0) { + mBuiltInLivePktBuf4Hd = atoi(value); + continue; + } + if (strcmp(attr, "BuiltInLivePktBuf4Sd") == 0) { + mBuiltInLivePktBuf4Sd = atoi(value); + continue; + } #ifndef STANDALONE esyslog("WARNING in SmartTvWeb: Attribute= %s with value= %s was not processed, thus ignored.", attr, value); |