提交 6891720f authored 作者: blu's avatar blu

revise getModulesOperFromConfDiff and related applications

上级 37da4ffb
...@@ -187,7 +187,7 @@ private: ...@@ -187,7 +187,7 @@ private:
bProcessed = true; bProcessed = true;
}else if(metaValue == "debug:list_files"){ }else if(metaValue == "debug:list_files"){
// TODO: remove debug feature // TODO: remove debug feature
debugFilesRing(this->vTsActive); this->vTsActive = LoadVideoFiles(this->urlOut, this->hours, this->numSlices, this->vTsOld);
bProcessed = true; bProcessed = true;
}else if(metaValue == "debug:toggle_log") { }else if(metaValue == "debug:toggle_log") {
// TODO: remove debug feature // TODO: remove debug feature
...@@ -661,7 +661,7 @@ protected: ...@@ -661,7 +661,7 @@ protected:
void debugFilesRing(vector<long> &v) void debugFilesRing(vector<long> &v)
{ {
spdlog::info("evslicer {} debug files ring. segHead: {}, isFull: {}, max: {}",this->selfId, this->segHead, this->bSegFull, this->numSlices); spdlog::info("evslicer {} debug files ring. segHead: {}, isFull: {}, max: {}",this->selfId, this->segHead, this->bSegFull, this->numSlices);
for(int i = 1; i <= numSlices; i++) { for(int i = 0; i <= numSlices; i++) {
spdlog::info("\tevslicer {} vector[{}] = {}, {}", selfId, i, v[i], videoFileTs2Name(v[i])); spdlog::info("\tevslicer {} vector[{}] = {}, {}", selfId, i, v[i], videoFileTs2Name(v[i]));
if(v[segToIdx(i)] == 0) { if(v[segToIdx(i)] == 0) {
break; break;
...@@ -671,6 +671,11 @@ protected: ...@@ -671,6 +671,11 @@ protected:
vector<long> LoadVideoFiles(string path, int hours, int maxSlices, vector<long> &tsNeedUpload) vector<long> LoadVideoFiles(string path, int hours, int maxSlices, vector<long> &tsNeedUpload)
{ {
tsNeedUpload.clear();
vTsActive.clear();
segHeadP = 0;
segHead = -1;
bSegFull = false;
vector<long> v = vector<long>(maxSlices, 0); vector<long> v = vector<long>(maxSlices, 0);
tsNeedUpload = vector<long>(maxSlices, 0); tsNeedUpload = vector<long>(maxSlices, 0);
// get current timestamp // get current timestamp
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论