video analysis2.0拆分,ffmpeg封装go接口库
zhangmeng
2019-09-25 1d2e7ce97e33c74a949d443a226df531fbf5c7dd
csrc/wrapper.cpp
@@ -170,14 +170,18 @@
            init_worker(in.get());
            int64_t id = 0;
            int64_t id = -1;
            while(!stop_stream_.load()){
                auto data(std::make_shared<CodedData>());
                if (in->readPacket(&data->getAVPacket()) != 0){
                    logIt("read packet error, id: %lld", id);
                    break;
                }
               if (id < 0){
                    id++;
                    continue;
                }
                run_worker(in.get(), data, id);
                usleep(wTime);