#ifndef CAC2CCAF_4F83_412E_992A_82EA76F15756 #define CAC2CCAF_4F83_412E_992A_82EA76F15756 /* ******************************************************************************* * INCLUDE ******************************************************************************* */ #include "util/Configurable.h" #include "util/ClassAssistant.h" #include "util/Task.h" #include namespace Video { namespace ZLMediaKit { /* ******************************************************************************* * CLASS DECLARE ******************************************************************************* */ class StreamPusher: public Util::Configurable { public: using Ptr = Poco::SharedPtr; StreamPusher(const std::string& name, const std::string& streamApp, const std::string streamID); ~StreamPusher(); void start(); void cancel(); READONLY_PROPERTY_DECLARE(name, std::string) READONLY_PROPERTY_DECLARE(streamApp, std::string) READONLY_PROPERTY_DECLARE(streamID, std::string) PROPERTY_DECLARE(Started, bool, false, private, public) PROPERTY_DECLARE(Connected, bool, false, private, public) CONFIGURABLE_DECLARE_PARAMETER(URL, std::string) CONFIGURABLE_DECLARE_PARAMETER(UsingTCPTransport, bool) CONFIGURABLE_DECLARE_PARAMETER(RetryInterval, uint32_t) Poco::BasicEvent ConnectionChanged; protected: void onConfigChanged(ParameterNames& names) override; private: Util::Task _task; std::string _key; }; } } #endif