瀏覽代碼

去除依赖

lishengyin 2 年之前
父節點
當前提交
6d141ef576
共有 3 個文件被更改,包括 9 次插入6 次删除
  1. 二進制
      lib/libmodules.so
  2. 2 2
      modules/inference/src/inference.cpp
  3. 7 4
      modules/userApp/src/user_app.cpp

二進制
lib/libmodules.so


+ 2 - 2
modules/inference/src/inference.cpp

@@ -4,7 +4,7 @@
  * @Autor: lishengyin
  * @Date: 2021-10-13 09:35:37
  * @LastEditors: lishengyin
- * @LastEditTime: 2022-10-11 09:38:19
+ * @LastEditTime: 2022-10-11 10:47:53
  */
 #include "inference.h"
 
@@ -255,7 +255,7 @@ namespace MIVA{
         for (iter = this->m_InferInfo->DataSources.begin(); iter != this->m_InferInfo->DataSources.end(); iter++){
             if(iter->source_bin != NULL){
                 state_return = gst_element_set_state(iter->source_bin, GST_STATE_NULL);
-                StateResulit(state_return);
+                //StateResulit(state_return);
             }
         }
         state_return = gst_element_set_state(this->streammux, GST_STATE_NULL);

+ 7 - 4
modules/userApp/src/user_app.cpp

@@ -4,7 +4,7 @@
  * @Autor: lishengyin
  * @Date: 2021-10-13 09:35:42
  * @LastEditors: lishengyin
- * @LastEditTime: 2022-10-11 09:22:36
+ * @LastEditTime: 2022-10-11 10:32:29
  */
 #include "user_app.h"
 
@@ -127,7 +127,7 @@ namespace MIVA
         this->m_udpClient = Socket::createSocket();
         this->m_udpClient->bindUdpSock(this->PIS_port);
 
-        SqlWriter sqlUpdata("UPDATE MIVA_DB.DataSources SET Num=0,finish=0");
+        SqlWriter sqlUpdata("UPDATE MIVA_DB.DataSources SET Num=0, finish=0");
 
         sqlUpdata << sqlRet;
         // 查询需要播放的流
@@ -189,7 +189,10 @@ namespace MIVA
 
         // 监听上报推理数据
         NoticeCenter::Instance().addListener(0, NOTICE_REPORT,[&](){
-                this->ReportInferData();
+                m_pool.async([&](){
+                    this->ReportInferData();
+                });
+                m_pool.start();
         });
 
         // 监听推理完成
@@ -429,7 +432,7 @@ namespace MIVA
         this->m_udpClient->send((char *)data,48,&addrDst, sizeof(struct sockaddr_in));
         // 喂狗
         makeAddr(&addrDst,"127.0.0.1",9527);
-        this->m_udpClient->send("MIVA正常",48,&addrDst, sizeof(struct sockaddr_in));
+        this->m_udpClient->send("MIVA正常", 48, &addrDst, sizeof(struct sockaddr_in));
     }
 
     /**