mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-06 03:28:09 +08:00
实现whip/whep delete相关功能
通过whip/whep 回复http头中的Location url进行删除资源 新增delete token随机数实现删除鉴权
This commit is contained in:
@@ -40,7 +40,8 @@ public:
|
||||
WebRtcInterface() = default;
|
||||
virtual ~WebRtcInterface() = default;
|
||||
virtual std::string getAnswerSdp(const std::string &offer) = 0;
|
||||
virtual const std::string &getIdentifier() const = 0;
|
||||
virtual const std::string& getIdentifier() const = 0;
|
||||
virtual const std::string& deleteRandStr() const { static std::string s_null; return s_null; }
|
||||
};
|
||||
|
||||
std::string exchangeSdp(const WebRtcInterface &exchanger, const std::string& offer);
|
||||
@@ -92,6 +93,7 @@ public:
|
||||
* 获取对象唯一id
|
||||
*/
|
||||
const std::string& getIdentifier() const override;
|
||||
const std::string& deleteRandStr() const override;
|
||||
|
||||
/**
|
||||
* socket收到udp数据
|
||||
@@ -174,6 +176,7 @@ protected:
|
||||
std::shared_ptr<RTC::IceServer> _ice_server;
|
||||
|
||||
private:
|
||||
mutable std::string _delete_rand_str;
|
||||
std::string _identifier;
|
||||
EventPoller::Ptr _poller;
|
||||
std::shared_ptr<RTC::DtlsTransport> _dtls_transport;
|
||||
@@ -248,6 +251,7 @@ public:
|
||||
|
||||
void createRtpChannel(const std::string &rid, uint32_t ssrc, MediaTrack &track);
|
||||
void removeTuple(RTC::TransportTuple* tuple);
|
||||
void safeShutdown(const SockException &ex);
|
||||
|
||||
protected:
|
||||
void OnIceServerSelectedTuple(const RTC::IceServer *iceServer, RTC::TransportTuple *tuple) override;
|
||||
|
||||
Reference in New Issue
Block a user