From e299832f617a5a0068776dfd4aa83b32c5aa4d7f Mon Sep 17 00:00:00 2001 From: Leon <8544842+leon14631@user.noreply.gitee.com> Date: Wed, 8 Jun 2022 08:51:37 +0000 Subject: [PATCH] update src/Common/MediaSource.h. --- src/Common/MediaSource.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Common/MediaSource.h b/src/Common/MediaSource.h index dd6d3572..d711b4dc 100644 --- a/src/Common/MediaSource.h +++ b/src/Common/MediaSource.h @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved. * * This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit). @@ -78,6 +78,8 @@ public: //流注册或注销事件 virtual void onRegist(MediaSource &sender, bool regist) {}; + virtual int getLossRate(MediaSource &sender, TrackType type) {return -1;}; + ////////////////////////仅供MultiMediaSourceMuxer对象继承//////////////////////// // 开启或关闭录制 virtual bool setupRecord(MediaSource &sender, Recorder::type type, bool start, const std::string &custom_path, size_t max_second) { return false; }; @@ -142,7 +144,7 @@ public: std::vector getMediaTracks(MediaSource &sender, bool trackReady = true) const override; void startSendRtp(MediaSource &sender, const SendRtpArgs &args, const std::function cb) override; bool stopSendRtp(MediaSource &sender, const std::string &ssrc) override; - + int getLossRate(MediaSource &sender, TrackType type) override; private: std::weak_ptr _listener; };