提交 a8ef6201 authored 作者: blu's avatar blu

refactor of delta config

上级 dc861846
...@@ -224,9 +224,12 @@ private: ...@@ -224,9 +224,12 @@ private:
if(evslicer.count("video-server-addr") != 0 && !evslicer["video-server-addr"].get<string>().empty()) { if(evslicer.count("video-server-addr") != 0 && !evslicer["video-server-addr"].get<string>().empty()) {
videoFileServerApi = evslicer["video-server-addr"].get<string>(); videoFileServerApi = evslicer["video-server-addr"].get<string>();
if(videoFileServerApi.at(videoFileServerApi.size()-1) != '/') {
videoFileServerApi += string("/");
}
} }
this->videoFileServerApi += this->ipcSn; this->videoFileServerApi += this->ipcSn;
json evpuller = ipc["modules"]["evpuller"][0]; json evpuller = ipc["modules"]["evpuller"][0];
pullerGid = evpuller["sn"].get<string>() + ":evpuller:" + to_string(evpuller["iid"]); pullerGid = evpuller["sn"].get<string>() + ":evpuller:" + to_string(evpuller["iid"]);
...@@ -579,6 +582,18 @@ protected: ...@@ -579,6 +582,18 @@ protected:
return string(buffer); return string(buffer);
} }
void debugFilesRing(){
spdlog::info("evslicer {} debug files ring. segHead: {}, isFull: {}", this->segHead, this->bSegFull);
int idx = 0;
for(auto &i: this->vTsActive) {
spdlog::info("\t\t vTsActive[{}]: {}, {}", idx, i, videoFileTs2Name(i));
idx++;
if(i == 0) {
break;
}
}
}
vector<long> LoadVideoFiles(string path, int hours, int maxSlices, vector<long> &tsNeedUpload) vector<long> LoadVideoFiles(string path, int hours, int maxSlices, vector<long> &tsNeedUpload)
{ {
vector<long> v = vector<long>(maxSlices, 0); vector<long> v = vector<long>(maxSlices, 0);
...@@ -748,6 +763,8 @@ protected: ...@@ -748,6 +763,8 @@ protected:
// find video files // find video files
vector<string> findSlicesByRange(long tss, long tse, int offsetS, int offsetE) vector<string> findSlicesByRange(long tss, long tse, int offsetS, int offsetE)
{ {
debugFilesRing();
vector<string> ret; vector<string> ret;
int found = 0; int found = 0;
int _itss = 0; int _itss = 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论