整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
54
video/zlmediakit/StreamPusher.h
Normal file
54
video/zlmediakit/StreamPusher.h
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
#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 <Poco/BasicEvent.h>
|
||||
|
||||
namespace Video
|
||||
{
|
||||
namespace ZLMediaKit
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DECLARE
|
||||
*******************************************************************************
|
||||
*/
|
||||
class StreamPusher: public Util::Configurable
|
||||
{
|
||||
public:
|
||||
using Ptr = Poco::SharedPtr<StreamPusher>;
|
||||
|
||||
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<void> ConnectionChanged;
|
||||
|
||||
protected:
|
||||
void onConfigChanged(ParameterNames& names) override;
|
||||
|
||||
private:
|
||||
Util::Task _task;
|
||||
std::string _key;
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue