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

big refacting of communitation architect

上级 a7e88534
......@@ -68,6 +68,9 @@ class EvDaemon{
json diff = json::diff(this->config, jret["data"]);
// TODO
spdlog::info("evdaemon {} config diff: {}", devSn, diff.dump(4));
if(diff.size() == 0) {
return 0;
}
// apply config
try{
if(jret["code"] != 0) {
......
......@@ -260,8 +260,10 @@ protected:
void run()
{
int ret = 0;
if ((ret = avformat_open_input(&pAVFormatInput, urlIn.c_str(), NULL, NULL)) < 0) {
spdlog::error("Could not open input file {}", urlIn);
AVDictionary * optsIn;
av_dict_set(&optsIn, "timeout", "7", 0);
if ((ret = avformat_open_input(&pAVFormatInput, urlIn.c_str(), NULL, &optsIn)) < 0) {
spdlog::error("Could not open input stream {}", urlIn);
}
if ((ret = avformat_find_stream_info(pAVFormatInput, NULL)) < 0) {
spdlog::error("Failed to retrieve input stream information");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论