#ifndef ZM_RTSP_SERVER_THREAD_H #define ZM_RTSP_SERVER_THREAD_H #include "zm_config.h" #include "zm_ffmpeg.h" #include "zm_thread.h" #include "zm_rtsp_server_server_media_subsession.h" #include "zm_rtsp_server_fifo_source.h" #include #include #if HAVE_RTSP_SERVER #include #include class Monitor; class RTSPServerThread : public Thread { private: std::shared_ptr monitor_; char terminate; TaskScheduler* scheduler; UsageEnvironment* env; UserAuthenticationDatabase* authDB; RTSPServer* rtspServer; std::list sources; public: explicit RTSPServerThread(std::shared_ptr monitor); ~RTSPServerThread(); ServerMediaSession *addSession(std::string &streamname); void addStream(std::string &streamname, AVStream *, AVStream *); FramedSource *addFifo(ServerMediaSession *sms, std::string fifo); int run(); void stop(); bool stopped() const; private: const std::string getRtpFormat(AVCodecID codec, bool muxTS); int addSession( const std::string & sessionName, const std::list & subSession ); }; #endif // HAVE_RTSP_SERVER #endif // ZM_RTSP_SERVER_THREAD_H