mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
修改代码格式
This commit is contained in:
parent
c1b4ccd041
commit
b8d17565d7
@ -280,19 +280,22 @@ std::shared_ptr<SockInfo> RtpProcess::getOriginSock(MediaSource &sender) const {
|
||||
toolkit::EventPoller::Ptr RtpProcess::getOwnerPoller(MediaSource &sender) {
|
||||
return _sock ? _sock->getPoller() : nullptr;
|
||||
}
|
||||
void RtpProcess::setHelper(const std::weak_ptr<RtcpContext> &help)
|
||||
{
|
||||
_help=help;
|
||||
|
||||
void RtpProcess::setHelper(const std::weak_ptr<RtcpContext> help){
|
||||
_help = std::move(help);
|
||||
}
|
||||
int RtpProcess::getLossRate(MediaSource &sender, TrackType type)
|
||||
{
|
||||
|
||||
int RtpProcess::getLossRate(MediaSource &sender, TrackType type){
|
||||
auto help = _help.lock();
|
||||
if(!help){
|
||||
return -1;
|
||||
}
|
||||
auto expected = help->getExpectedPacketsInterval();
|
||||
if (!expected) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return help->geLostInterval() * 100 / expected;
|
||||
}
|
||||
|
||||
}//namespace mediakit
|
||||
#endif//defined(ENABLE_RTPPROXY)
|
@ -67,7 +67,7 @@ public:
|
||||
int getTotalReaderCount();
|
||||
void setListener(const std::weak_ptr<MediaSourceEvent> &listener);
|
||||
|
||||
void setHelper(const std::weak_ptr<RtcpContext> &help);
|
||||
void setHelper(const std::weak_ptr<RtcpContext> help);
|
||||
int getLossRate(MediaSource &sender, TrackType type) override;
|
||||
protected:
|
||||
bool inputFrame(const Frame::Ptr &frame) override;
|
||||
|
Loading…
Reference in New Issue
Block a user