rtsp拉流、rtp单端口推流新增支持获取丢包率: #1877

This commit is contained in:
xiongziliang
2022-09-03 15:53:01 +08:00
parent cd269672a5
commit 20f1275c58
12 changed files with 35 additions and 40 deletions

View File

@@ -18,7 +18,7 @@
namespace mediakit {
class RtpProcess : public toolkit::SockInfo, public MediaSinkInterface, public MediaSourceEventInterceptor, public std::enable_shared_from_this<RtpProcess>{
class RtpProcess : public RtcpContextForRecv, public toolkit::SockInfo, public MediaSinkInterface, public MediaSourceEventInterceptor, public std::enable_shared_from_this<RtpProcess>{
public:
typedef std::shared_ptr<RtpProcess> Ptr;
friend class RtpProcessHelper;
@@ -64,8 +64,6 @@ public:
uint16_t get_peer_port() override;
std::string getIdentifier() const override;
void setHelper(const std::weak_ptr<RtcpContext> help);
protected:
bool inputFrame(const Frame::Ptr &frame) override;
bool addTrack(const Track::Ptr & track) override;
@@ -77,7 +75,7 @@ protected:
std::string getOriginUrl(MediaSource &sender) const override;
std::shared_ptr<SockInfo> getOriginSock(MediaSource &sender) const override;
toolkit::EventPoller::Ptr getOwnerPoller(MediaSource &sender) override;
int getLossRate(MediaSource &sender, TrackType type) override;
float getLossRate(MediaSource &sender, TrackType type) override;
private:
void emitOnPublish();
@@ -100,7 +98,6 @@ private:
toolkit::Ticker _last_check_alive;
std::recursive_mutex _func_mtx;
std::deque<std::function<void()> > _cached_func;
std::weak_ptr<RtcpContext> _help;
};
}//namespace mediakit