#pragma once #include #include // 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 "TCPClient.h" #include "inifile.h" #include #include #include "inference.h" using namespace toolkit; using namespace mediakit; using namespace inifile; using namespace std; #define ERR -1 #define OK 0 namespace VIA { class UserApp { public: static std::shared_ptr 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; std::string Log_src; private: // 负责链接Netty的Socker std::shared_ptr m_tcpClient; }; }