Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
2510eeb8
提交
2510eeb8
authored
2月 26, 2018
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:versatica/mediasoup
上级
befab793
0aeaeb28
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
26 行增加
和
29 行删除
+26
-29
RtpDataCounter.hpp
worker/include/RTC/RtpDataCounter.hpp
+4
-12
RtpDataCounter.cpp
worker/src/RTC/RtpDataCounter.cpp
+10
-5
RtpListener.cpp
worker/src/RTC/RtpListener.cpp
+5
-5
RtpMonitor.cpp
worker/src/RTC/RtpMonitor.cpp
+2
-2
RtpStream.cpp
worker/src/RTC/RtpStream.cpp
+1
-1
TransportTuple.cpp
worker/src/RTC/TransportTuple.cpp
+3
-3
WebRtcTransport.cpp
worker/src/RTC/WebRtcTransport.cpp
+1
-1
没有找到文件。
worker/include/RTC/RtpDataCounter.hpp
浏览文件 @
2510eeb8
...
...
@@ -57,7 +57,6 @@ namespace RTC
uint32_t
GetRate
(
uint64_t
now
);
size_t
GetPacketCount
()
const
;
size_t
GetBytes
()
const
;
void
Reset
();
private
:
RateCalculator
rate
;
...
...
@@ -70,14 +69,14 @@ namespace RTC
inline
RateCalculator
::
RateCalculator
(
size_t
windowSize
,
float
scale
)
:
windowSize
(
windowSize
),
scale
(
scale
)
{
uint64_t
now
=
DepLibUV
::
GetTime
();
Reset
(
now
);
Reset
();
}
inline
void
RateCalculator
::
Reset
()
{
Reset
(
this
->
oldestTime
);
uint64_t
now
=
DepLibUV
::
GetTime
();
Reset
(
now
);
}
inline
void
RateCalculator
::
Reset
(
uint64_t
now
)
...
...
@@ -102,13 +101,6 @@ namespace RTC
{
return
this
->
bytes
;
}
inline
void
RtpDataCounter
::
Reset
()
{
rate
.
Reset
();
this
->
packets
=
0
;
this
->
bytes
=
0
;
}
}
// namespace RTC
#endif
worker/src/RTC/RtpDataCounter.cpp
浏览文件 @
2510eeb8
...
...
@@ -15,7 +15,7 @@ namespace RTC
if
(
now
<
this
->
oldestTime
)
return
;
this
->
RemoveOldData
(
now
);
RemoveOldData
(
now
);
// Set data in the index before the oldest index.
uint32_t
offset
=
this
->
windowSize
-
1
;
...
...
@@ -32,10 +32,9 @@ namespace RTC
{
MS_TRACE
();
this
->
RemoveOldData
(
now
);
RemoveOldData
(
now
);
int64_t
nominalWindowSize
=
now
-
this
->
oldestTime
;
float
scale
=
this
->
scale
/
nominalWindowSize
;
float
scale
=
this
->
scale
/
this
->
windowSize
;
return
static_cast
<
uint32_t
>
(
std
::
trunc
(
this
->
totalCount
*
scale
+
0.5
f
));
}
...
...
@@ -48,7 +47,13 @@ namespace RTC
// Should never happen.
if
(
newOldestTime
<
this
->
oldestTime
)
{
MS_ERROR
(
"current time [%"
PRIu64
"] is older than a previous [%"
PRIu64
"]"
,
newOldestTime
,
this
->
oldestTime
);
return
;
}
// We are in the same time unit (ms) as the last entry.
if
(
newOldestTime
==
this
->
oldestTime
)
...
...
@@ -57,7 +62,7 @@ namespace RTC
// A whole window size time has elapsed since last entry. Reset the buffer.
if
(
newOldestTime
>
this
->
oldestTime
+
this
->
windowSize
)
{
this
->
Reset
(
newOldestTime
);
Reset
(
now
);
return
;
}
...
...
worker/src/RTC/RtpListener.cpp
浏览文件 @
2510eeb8
...
...
@@ -119,7 +119,7 @@ namespace RTC
if
(
ssrc
!=
0u
)
{
if
(
!
this
->
HasSsrc
(
ssrc
,
producer
))
if
(
!
HasSsrc
(
ssrc
,
producer
))
{
this
->
ssrcTable
[
ssrc
]
=
producer
;
}
...
...
@@ -138,7 +138,7 @@ namespace RTC
if
(
ssrc
!=
0u
)
{
if
(
!
this
->
HasSsrc
(
ssrc
,
producer
))
if
(
!
HasSsrc
(
ssrc
,
producer
))
{
this
->
ssrcTable
[
ssrc
]
=
producer
;
}
...
...
@@ -157,7 +157,7 @@ namespace RTC
if
(
ssrc
!=
0u
)
{
if
(
!
this
->
HasSsrc
(
ssrc
,
producer
))
if
(
!
HasSsrc
(
ssrc
,
producer
))
{
this
->
ssrcTable
[
ssrc
]
=
producer
;
}
...
...
@@ -178,7 +178,7 @@ namespace RTC
{
auto
&
muxId
=
rtpParameters
.
muxId
;
if
(
!
this
->
HasMuxId
(
muxId
,
producer
))
if
(
!
HasMuxId
(
muxId
,
producer
))
{
this
->
muxIdTable
[
muxId
]
=
producer
;
}
...
...
@@ -201,7 +201,7 @@ namespace RTC
if
(
rid
.
empty
())
continue
;
if
(
!
this
->
HasRid
(
rid
,
producer
))
if
(
!
HasRid
(
rid
,
producer
))
{
this
->
ridTable
[
rid
]
=
producer
;
}
...
...
worker/src/RTC/RtpMonitor.cpp
浏览文件 @
2510eeb8
...
...
@@ -115,7 +115,7 @@ namespace RTC
score
+=
repairedPercentage
*
RepairedPercentageWeight
;
// Add score to histogram.
this
->
AddScore
(
static_cast
<
uint8_t
>
(
score
/
10
+
0.5
f
));
AddScore
(
static_cast
<
uint8_t
>
(
score
/
10
+
0.5
f
));
#ifdef MS_LOG_DEV
MS_DEBUG_TAG
(
...
...
@@ -129,7 +129,7 @@ namespace RTC
score
);
report
->
Dump
();
this
->
Dump
();
Dump
();
#endif
}
...
...
worker/src/RTC/RtpStream.cpp
浏览文件 @
2510eeb8
...
...
@@ -261,7 +261,7 @@ namespace RTC
if
(
timer
==
this
->
statusCheckTimer
)
{
this
->
CheckStatus
();
CheckStatus
();
}
}
}
// namespace RTC
worker/src/RTC/TransportTuple.cpp
浏览文件 @
2510eeb8
...
...
@@ -27,15 +27,15 @@ namespace RTC
std
::
string
ip
;
uint16_t
port
;
Utils
::
IP
::
GetAddressInfo
(
this
->
GetLocalAddress
(),
&
ipFamily
,
ip
,
&
port
);
Utils
::
IP
::
GetAddressInfo
(
GetLocalAddress
(),
&
ipFamily
,
ip
,
&
port
);
json
[
JsonStringLocalIp
]
=
ip
;
json
[
JsonStringLocalPort
]
=
Json
::
UInt
{
port
};
if
(
this
->
GetProtocol
()
==
RTC
::
TransportTuple
::
Protocol
::
UDP
)
if
(
GetProtocol
()
==
RTC
::
TransportTuple
::
Protocol
::
UDP
)
json
[
JsonStringProtocol
]
=
JsonStringUdp
;
else
json
[
JsonStringProtocol
]
=
JsonStringTcp
;
Utils
::
IP
::
GetAddressInfo
(
this
->
GetRemoteAddress
(),
&
ipFamily
,
ip
,
&
port
);
Utils
::
IP
::
GetAddressInfo
(
GetRemoteAddress
(),
&
ipFamily
,
ip
,
&
port
);
json
[
JsonStringRemoteIp
]
=
ip
;
json
[
JsonStringRemotePort
]
=
Json
::
UInt
{
port
};
...
...
worker/src/RTC/WebRtcTransport.cpp
浏览文件 @
2510eeb8
...
...
@@ -1251,7 +1251,7 @@ namespace RTC
packet
.
SetBitrate
(
effectiveBitrate
);
packet
.
SetSsrcs
(
ssrcs
);
packet
.
Serialize
(
RTC
::
RTCP
::
Buffer
);
this
->
SendRtcpPacket
(
&
packet
);
SendRtcpPacket
(
&
packet
);
if
(
now
-
this
->
lastEffectiveMaxBitrateAt
>
EffectiveMaxBitrateCheckInterval
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论