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