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

upload video files

上级 ea9b6462
...@@ -47,6 +47,7 @@ private: ...@@ -47,6 +47,7 @@ private:
void *pSub = nullptr, *pDealer = nullptr, *pDaemonCtx = nullptr, *pDaemon = nullptr; void *pSub = nullptr, *pDealer = nullptr, *pDaemonCtx = nullptr, *pDaemon = nullptr;
string urlOut, urlPub, urlRouter, devSn, mgrSn, selfId, pullerGid, ipcSn; string urlOut, urlPub, urlRouter, devSn, mgrSn, selfId, pullerGid, ipcSn;
int iid, hours, seconds, numSlices, segHead = 0, segHeadP; int iid, hours, seconds, numSlices, segHead = 0, segHeadP;
long bootTime = 0;
bool enablePush = false, bSegFull = false; bool enablePush = false, bSegFull = false;
AVFormatContext *pAVFormatRemux = nullptr; AVFormatContext *pAVFormatRemux = nullptr;
AVFormatContext *pAVFormatInput = nullptr; AVFormatContext *pAVFormatInput = nullptr;
...@@ -407,6 +408,7 @@ protected: ...@@ -407,6 +408,7 @@ protected:
spdlog::error("evslicer {} error occurred when opening output file", selfId); spdlog::error("evslicer {} error occurred when opening output file", selfId);
} }
bootTime = chrono::duration_cast<chrono::seconds>(chrono::system_clock::now().time_since_epoch()).count();
spdlog::info("evslicer {} start writing new slices", selfId); spdlog::info("evslicer {} start writing new slices", selfId);
int pktIgnore = 0; int pktIgnore = 0;
while(true) { while(true) {
...@@ -823,7 +825,7 @@ public: ...@@ -823,7 +825,7 @@ public:
long offsetS = 0; long offsetS = 0;
long offsetE = 0; long offsetE = 0;
// TODO: async // TODO: async
static auto bootTime = chrono::duration_cast<chrono::seconds>(chrono::system_clock::now().time_since_epoch()).count();
if(tse < bootTime) { if(tse < bootTime) {
spdlog::warn("evslicer {} discard old msg {}", selfId, evt); spdlog::warn("evslicer {} discard old msg {}", selfId, evt);
continue; continue;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论