mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-27 04:20:13 +08:00
commit
df7305c6ce
@ -268,12 +268,16 @@ const string kFilePath = RECORD_FIELD"filePath";
|
||||
//mp4文件写缓存大小
|
||||
const string kFileBufSize = RECORD_FIELD"fileBufSize";
|
||||
|
||||
//mp4文件是否重头循环读取
|
||||
const string kFileRepeat = RECORD_FIELD"fileRepeat";
|
||||
|
||||
onceToken token([](){
|
||||
mINI::Instance()[kAppName] = RECORD_APP_NAME;
|
||||
mINI::Instance()[kSampleMS] = RECORD_SAMPLE_MS;
|
||||
mINI::Instance()[kFileSecond] = RECORD_FILE_SECOND;
|
||||
mINI::Instance()[kFilePath] = RECORD_FILE_PATH;
|
||||
mINI::Instance()[kFileBufSize] = 64 * 1024;
|
||||
mINI::Instance()[kFileRepeat] = false;
|
||||
},nullptr);
|
||||
|
||||
} //namespace Record
|
||||
|
@ -268,6 +268,8 @@ extern const string kFileSecond;
|
||||
extern const string kFilePath;
|
||||
//mp4文件写缓存大小
|
||||
extern const string kFileBufSize;
|
||||
//mp4文件是否重头循环读取
|
||||
extern const string kFileRepeat;
|
||||
} //namespace Record
|
||||
|
||||
////////////HLS相关配置///////////
|
||||
|
@ -200,6 +200,11 @@ bool MediaReader::readSample(int iTimeInc,bool justSeekSyncFrame) {
|
||||
if((bFlag0 || bFlag1) && bFlag2){
|
||||
_alive.resetTime();
|
||||
}
|
||||
//重头开始循环读取
|
||||
GET_CONFIG(bool,fileRepeat,Record::kFileRepeat);
|
||||
if (fileRepeat && !bFlag0 && !bFlag1) {
|
||||
seek(0);
|
||||
}
|
||||
//DebugL << "alive ...";
|
||||
//3秒延时关闭
|
||||
return _alive.elapsedTime() < 3 * 1000;
|
||||
|
Loading…
Reference in New Issue
Block a user