12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- #pragma once
- #include <iostream>
- #include <signal.h>
- // ZLMediaKit
- #include "Util/logger.h"
- #include "Util/NoticeCenter.h"
- #include "Poller/EventPoller.h"
- #include "Player/PlayerProxy.h"
- #include "Rtmp/RtmpPusher.h"
- #include "Common/config.h"
- #include "Pusher/MediaPusher.h"
- #include "Extension/Frame.h"
- #include "Util/SqlPool.h"
- #include "Network/TcpClient.h"
- #include "Poller/Timer.h"
- #include "TCPClient.h"
- #include "inifile.h"
- #include <gst/gst.h>
- #include <vector>
- #include <map>
- #include "inference.h"
- #include "Stream.h"
- // dataType
- #include "SendLogin.h"
- #include "NettyServerCommandEnum.h"
- #include "NettyServerResultMsg.h"
- #include "NettyClientResultMsg.h"
- #include "SendLogin.h"
- #include "NettyClientCommandEnum.h"
- using namespace toolkit;
- using namespace mediakit;
- using namespace inifile;
- using namespace std;
- #define ERR -1
- #define OK 0
- // 推理广播
- #define NOTICE_INFER "NOTICE_INFER"
- namespace MIVA
- {
- class UserApp
- {
- public:
- static std::shared_ptr<UserApp> CreateNew();
- UserApp();
- ~UserApp();
- int32_t Init(std::string appName);
- void Destroy();
- void StartTask();
- private:
- IniFile m_ini;
- std::string m_appName;
- const std::string m_configSrc = "../config/config.ini";
- private:
- // Natty
- std::string Netty_ip;
- int32_t Netty_port;
- std::string Netty_idName;
- // PIS
- std::string PIS_ip;
- int32_t PIS_port;
- std::string PIS_IdName;
- // Mysql
- std::string sql_ip;
- int32_t sql_port;
- std::string user;
- std::string password;
- std::string character;
- int device_id;
- private:
- // 负责链接Netty的Socker
- std::shared_ptr<TCPClient> m_tcpClient;
- std::list<Stream> DataList;
- Timer::Ptr m_timer0;
- private:
- void ListenInfer(int Source_id, int num);
- void ConnectNetty();
- };
- }
|