pansen
2019-03-06 a2dfb4907fd11e0a64ba16419dce066509462297
QiaoJiaSystem/VideoAnalysFromHC/RtspAnalysElement.cpp
@@ -10,24 +10,24 @@
//RtspAnalysElement::RtspAnalysElement() {}
//std::string RtspAnalysElement::resetFdfs(std::string ip, unsigned int port, std::string content) {
//
//    std::thread reset([&]() {
//        fdfsClient.rwLock.rdlock();
//        if (fdfsClient.fastFds != nullptr) {
//            delete fdfsClient.fastFds;
//        }
//        fdfsClient.fastFds = new FastFds("fastDfsClient.conf");
//        fdfsClient.rwLock.unlock();
//    });
//    reset.detach();
//
//    return "";
//}
std::string RtspAnalysElement::resetFdfs(std::string ip, unsigned int port, std::string content) {
    std::thread reset([&]() {
        fdfsClient.rwLock.rdlock();
        if (fdfsClient.fastFds != nullptr) {
            delete fdfsClient.fastFds;
        }
        fdfsClient.fastFds = new FastFds("fastDfsClient.conf");
        fdfsClient.rwLock.unlock();
    });
    reset.detach();
    return "";
}
RtspAnalysElement::RtspAnalysElement(LDBTool *_dbTool) : m_lDBTool(_dbTool), maxCount(50), currentCount(0) {
    init();
//    resetFdfs();
    resetFdfs();
    {
//        std::thread httpServer([&]() {
//            //#todo port