mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-01 23:57:37 +08:00
RTP代理支持完整的事件
This commit is contained in:
@@ -36,14 +36,20 @@ using namespace toolkit;
|
||||
|
||||
namespace mediakit{
|
||||
|
||||
class RtpSession : public TcpSession , public RtpSplitter{
|
||||
class RtpSession : public TcpSession , public RtpSplitter , public MediaSourceEvent{
|
||||
public:
|
||||
RtpSession(const Socket::Ptr &sock);
|
||||
~RtpSession() override;
|
||||
void onRecv(const Buffer::Ptr &) override;
|
||||
void onError(const SockException &err) override;
|
||||
void onManager() override;
|
||||
private:
|
||||
protected:
|
||||
// 通知其停止推流
|
||||
bool close(MediaSource &sender,bool force) override;
|
||||
// 通知无人观看
|
||||
void onNoneReader(MediaSource &sender) override;
|
||||
// 观看总人数
|
||||
int totalReaderCount(MediaSource &sender) override;
|
||||
void onRtpPacket(const char *data,uint64_t len) override;
|
||||
private:
|
||||
uint32_t _ssrc = 0;
|
||||
|
||||
Reference in New Issue
Block a user