user_app.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #pragma once
  2. #include <iostream>
  3. #include <signal.h>
  4. // ZLMediaKit
  5. #include "Util/logger.h"
  6. #include "Util/NoticeCenter.h"
  7. #include "Poller/EventPoller.h"
  8. #include "Player/PlayerProxy.h"
  9. #include "Rtmp/RtmpPusher.h"
  10. #include "Common/config.h"
  11. #include "Pusher/MediaPusher.h"
  12. #include "Extension/Frame.h"
  13. #include "Util/SqlPool.h"
  14. #include "Network/TcpClient.h"
  15. #include "TCPClient.h"
  16. #include "inference.h"
  17. #include "inifile.h"
  18. #include <gst/gst.h>
  19. #include <vector>
  20. using namespace toolkit;
  21. using namespace mediakit;
  22. using namespace inifile;
  23. using namespace std;
  24. #define ERR -1
  25. #define OK 0
  26. namespace VIA
  27. {
  28. class UserApp
  29. {
  30. private:
  31. public:
  32. static std::shared_ptr<UserApp> CreateNew();
  33. UserApp();
  34. ~UserApp();
  35. int32_t Init(std::string appName);
  36. void Destroy();
  37. void StartTask();
  38. private:
  39. IniFile m_ini;
  40. std::string m_appName;
  41. const std::string m_configSrc = "../config/config.ini";
  42. private:
  43. // Natty
  44. std::string Netty_ip;
  45. int32_t Netty_port;
  46. std::string Netty_idName;
  47. // PIS
  48. std::string PIS_ip;
  49. int32_t PIS_port;
  50. std::string PIS_IdName;
  51. // Mysql
  52. std::string MySql_ip;
  53. int32_t MySql_port;
  54. std::string MySql_User;
  55. std::string MySql_Pwd;
  56. int device_id;
  57. std::string Log_src;
  58. private:
  59. // 负责链接Netty的Socker
  60. std::shared_ptr<TCPClient> m_tcpClient;
  61. // 推理模块
  62. };
  63. }