AXRtspServer.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**********************************************************************************
  2. *
  3. * Copyright (c) 2019-2020 Beijing AXera Technology Co., Ltd. All Rights Reserved.
  4. *
  5. * This source file is the property of Beijing AXera Technology Co., Ltd. and
  6. * may not be copied or distributed in any isomorphic form without the prior
  7. * written consent of Beijing AXera Technology Co., Ltd.
  8. *
  9. **********************************************************************************/
  10. #ifndef __AXRTSPSERVER_H__
  11. #define __AXRTSPSERVER_H__
  12. #include "ax_base_type.h"
  13. #include "liveMedia.hh"
  14. #include "BasicUsageEnvironment.hh"
  15. #include "AXLiveServerMediaSession.h"
  16. #define MAX_RTSP_CHANNEL_NUM (8)
  17. class AXRtspServer{
  18. public:
  19. AXRtspServer(void);
  20. virtual ~AXRtspServer(void);
  21. public:
  22. AX_BOOL Init(AX_S32 arrIndex[], AX_S32 nNum, bool isH264=true, AX_U16 uBasePort=0);
  23. AX_BOOL Start(void);
  24. void Stop(void);
  25. void SendNalu(AX_U8 nChn, const AX_U8* pBuf, AX_U32 nLen, AX_U64 nPts=0, AX_BOOL bIFrame=AX_FALSE);
  26. public:
  27. RTSPServer* m_pRtspServer;
  28. AX_U16 m_uBasePort;
  29. AX_S32 m_arrIndex[MAX_RTSP_CHANNEL_NUM];
  30. AX_U16 m_nMaxNum;
  31. AXLiveServerMediaSession* m_pLiveServerMediaSession[MAX_RTSP_CHANNEL_NUM];
  32. UsageEnvironment* m_pUEnv;
  33. bool m_isH264;
  34. private:
  35. pthread_t m_tidServer;
  36. };
  37. #endif /*__AXRTSPSERVER_H__*/