Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
8d41bbae
Unverified
提交
8d41bbae
authored
7月 12, 2021
作者:
Nazar Mokrynskyi
提交者:
GitHub
7月 12, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
C++ cleanup (#605)
上级
c014484e
隐藏空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
72 行增加
和
12 行删除
+72
-12
mediasoup_helpers.h
worker/deps/libwebrtc/libwebrtc/mediasoup_helpers.h
+3
-3
ChannelSocket.hpp
worker/include/Channel/ChannelSocket.hpp
+6
-0
PayloadChannelSocket.hpp
worker/include/PayloadChannel/PayloadChannelSocket.hpp
+6
-0
Consumer.hpp
worker/include/RTC/Consumer.hpp
+3
-0
DataConsumer.hpp
worker/include/RTC/DataConsumer.hpp
+3
-0
DataProducer.hpp
worker/include/RTC/DataProducer.hpp
+3
-0
DtlsTransport.hpp
worker/include/RTC/DtlsTransport.hpp
+3
-0
KeyFrameRequestManager.hpp
worker/include/RTC/KeyFrameRequestManager.hpp
+9
-0
NackGenerator.hpp
worker/include/RTC/NackGenerator.hpp
+3
-0
Producer.hpp
worker/include/RTC/Producer.hpp
+3
-0
RateCalculator.hpp
worker/include/RTC/RateCalculator.hpp
+1
-7
RtpStream.hpp
worker/include/RTC/RtpStream.hpp
+3
-0
SctpAssociation.hpp
worker/include/RTC/SctpAssociation.hpp
+3
-0
SenderBandwidthEstimator.hpp
worker/include/RTC/SenderBandwidthEstimator.hpp
+3
-0
TcpConnection.hpp
worker/include/RTC/TcpConnection.hpp
+3
-0
TcpServer.hpp
worker/include/RTC/TcpServer.hpp
+3
-0
Transport.hpp
worker/include/RTC/Transport.hpp
+3
-0
TransportCongestionControlClient.hpp
worker/include/RTC/TransportCongestionControlClient.hpp
+3
-0
TransportCongestionControlServer.hpp
worker/include/RTC/TransportCongestionControlServer.hpp
+3
-0
UdpSocket.hpp
worker/include/RTC/UdpSocket.hpp
+3
-0
DepLibUV.cpp
worker/src/DepLibUV.cpp
+1
-1
RateCalculator.cpp
worker/src/RTC/RateCalculator.cpp
+1
-1
没有找到文件。
worker/deps/libwebrtc/libwebrtc/mediasoup_helpers.h
浏览文件 @
8d41bbae
...
@@ -27,20 +27,20 @@ namespace mediasoup_helpers
...
@@ -27,20 +27,20 @@ namespace mediasoup_helpers
}
}
return
receivedPackets
;
return
receivedPackets
;
}
;
}
// Get the reference time in microseconds, including any precision loss.
// Get the reference time in microseconds, including any precision loss.
int64_t
GetBaseTimeUs
(
const
RTC
::
RTCP
::
FeedbackRtpTransportPacket
*
packet
)
int64_t
GetBaseTimeUs
(
const
RTC
::
RTCP
::
FeedbackRtpTransportPacket
*
packet
)
{
{
return
packet
->
GetReferenceTimestamp
()
*
1000
;
return
packet
->
GetReferenceTimestamp
()
*
1000
;
}
;
}
// Get the unwrapped delta between current base time and |prev_timestamp_us|.
// Get the unwrapped delta between current base time and |prev_timestamp_us|.
int64_t
GetBaseDeltaUs
(
int64_t
GetBaseDeltaUs
(
const
RTC
::
RTCP
::
FeedbackRtpTransportPacket
*
packet
,
int64_t
prev_timestamp_us
)
const
RTC
::
RTCP
::
FeedbackRtpTransportPacket
*
packet
,
int64_t
prev_timestamp_us
)
{
{
return
GetBaseTimeUs
(
packet
)
-
prev_timestamp_us
;
return
GetBaseTimeUs
(
packet
)
-
prev_timestamp_us
;
}
;
}
}
// namespace FeedbackRtpTransport
}
// namespace FeedbackRtpTransport
}
// namespace mediasoup_helpers
}
// namespace mediasoup_helpers
...
...
worker/include/Channel/ChannelSocket.hpp
浏览文件 @
8d41bbae
...
@@ -13,6 +13,9 @@ namespace Channel
...
@@ -13,6 +13,9 @@ namespace Channel
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnConsumerSocketMessage
(
ConsumerSocket
*
consumerSocket
,
char
*
msg
,
size_t
msgLen
)
=
0
;
virtual
void
OnConsumerSocketMessage
(
ConsumerSocket
*
consumerSocket
,
char
*
msg
,
size_t
msgLen
)
=
0
;
virtual
void
OnConsumerSocketClosed
(
ConsumerSocket
*
consumerSocket
)
=
0
;
virtual
void
OnConsumerSocketClosed
(
ConsumerSocket
*
consumerSocket
)
=
0
;
...
@@ -52,6 +55,9 @@ namespace Channel
...
@@ -52,6 +55,9 @@ namespace Channel
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnChannelRequest
(
virtual
void
OnChannelRequest
(
Channel
::
ChannelSocket
*
channel
,
Channel
::
ChannelRequest
*
request
)
=
0
;
Channel
::
ChannelSocket
*
channel
,
Channel
::
ChannelRequest
*
request
)
=
0
;
...
...
worker/include/PayloadChannel/PayloadChannelSocket.hpp
浏览文件 @
8d41bbae
...
@@ -14,6 +14,9 @@ namespace PayloadChannel
...
@@ -14,6 +14,9 @@ namespace PayloadChannel
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnConsumerSocketMessage
(
ConsumerSocket
*
consumerSocket
,
char
*
msg
,
size_t
msgLen
)
=
0
;
virtual
void
OnConsumerSocketMessage
(
ConsumerSocket
*
consumerSocket
,
char
*
msg
,
size_t
msgLen
)
=
0
;
virtual
void
OnConsumerSocketClosed
(
ConsumerSocket
*
consumerSocket
)
=
0
;
virtual
void
OnConsumerSocketClosed
(
ConsumerSocket
*
consumerSocket
)
=
0
;
...
@@ -57,6 +60,9 @@ namespace PayloadChannel
...
@@ -57,6 +60,9 @@ namespace PayloadChannel
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnPayloadChannelNotification
(
virtual
void
OnPayloadChannelNotification
(
PayloadChannel
::
PayloadChannelSocket
*
payloadChannel
,
PayloadChannel
::
PayloadChannelSocket
*
payloadChannel
,
...
...
worker/include/RTC/Consumer.hpp
浏览文件 @
8d41bbae
...
@@ -28,6 +28,9 @@ namespace RTC
...
@@ -28,6 +28,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnConsumerSendRtpPacket
(
RTC
::
Consumer
*
consumer
,
RTC
::
RtpPacket
*
packet
)
=
0
;
virtual
void
OnConsumerSendRtpPacket
(
RTC
::
Consumer
*
consumer
,
RTC
::
RtpPacket
*
packet
)
=
0
;
virtual
void
OnConsumerRetransmitRtpPacket
(
RTC
::
Consumer
*
consumer
,
RTC
::
RtpPacket
*
packet
)
=
0
;
virtual
void
OnConsumerRetransmitRtpPacket
(
RTC
::
Consumer
*
consumer
,
RTC
::
RtpPacket
*
packet
)
=
0
;
...
...
worker/include/RTC/DataConsumer.hpp
浏览文件 @
8d41bbae
...
@@ -18,6 +18,9 @@ namespace RTC
...
@@ -18,6 +18,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnDataConsumerSendMessage
(
virtual
void
OnDataConsumerSendMessage
(
RTC
::
DataConsumer
*
dataConsumer
,
RTC
::
DataConsumer
*
dataConsumer
,
...
...
worker/include/RTC/DataProducer.hpp
浏览文件 @
8d41bbae
...
@@ -14,6 +14,9 @@ namespace RTC
...
@@ -14,6 +14,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnDataProducerMessageReceived
(
virtual
void
OnDataProducerMessageReceived
(
RTC
::
DataProducer
*
dataProducer
,
uint32_t
ppid
,
const
uint8_t
*
msg
,
size_t
len
)
=
0
;
RTC
::
DataProducer
*
dataProducer
,
uint32_t
ppid
,
const
uint8_t
*
msg
,
size_t
len
)
=
0
;
...
...
worker/include/RTC/DtlsTransport.hpp
浏览文件 @
8d41bbae
...
@@ -62,6 +62,9 @@ namespace RTC
...
@@ -62,6 +62,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
// DTLS is in the process of negotiating a secure connection. Incoming
// DTLS is in the process of negotiating a secure connection. Incoming
// media can flow through.
// media can flow through.
...
...
worker/include/RTC/KeyFrameRequestManager.hpp
浏览文件 @
8d41bbae
...
@@ -11,6 +11,9 @@ namespace RTC
...
@@ -11,6 +11,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnKeyFrameRequestTimeout
(
PendingKeyFrameInfo
*
keyFrameRequestInfo
)
=
0
;
virtual
void
OnKeyFrameRequestTimeout
(
PendingKeyFrameInfo
*
keyFrameRequestInfo
)
=
0
;
};
};
...
@@ -52,6 +55,9 @@ namespace RTC
...
@@ -52,6 +55,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnKeyFrameDelayTimeout
(
KeyFrameRequestDelayer
*
keyFrameRequestDelayer
)
=
0
;
virtual
void
OnKeyFrameDelayTimeout
(
KeyFrameRequestDelayer
*
keyFrameRequestDelayer
)
=
0
;
};
};
...
@@ -90,6 +96,9 @@ namespace RTC
...
@@ -90,6 +96,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnKeyFrameNeeded
(
KeyFrameRequestManager
*
keyFrameRequestManager
,
uint32_t
ssrc
)
=
0
;
virtual
void
OnKeyFrameNeeded
(
KeyFrameRequestManager
*
keyFrameRequestManager
,
uint32_t
ssrc
)
=
0
;
};
};
...
...
worker/include/RTC/NackGenerator.hpp
浏览文件 @
8d41bbae
...
@@ -16,6 +16,9 @@ namespace RTC
...
@@ -16,6 +16,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnNackGeneratorNackRequired
(
const
std
::
vector
<
uint16_t
>&
seqNumbers
)
=
0
;
virtual
void
OnNackGeneratorNackRequired
(
const
std
::
vector
<
uint16_t
>&
seqNumbers
)
=
0
;
virtual
void
OnNackGeneratorKeyFrameRequired
()
=
0
;
virtual
void
OnNackGeneratorKeyFrameRequired
()
=
0
;
...
...
worker/include/RTC/Producer.hpp
浏览文件 @
8d41bbae
...
@@ -26,6 +26,9 @@ namespace RTC
...
@@ -26,6 +26,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnProducerPaused
(
RTC
::
Producer
*
producer
)
=
0
;
virtual
void
OnProducerPaused
(
RTC
::
Producer
*
producer
)
=
0
;
virtual
void
OnProducerResumed
(
RTC
::
Producer
*
producer
)
=
0
;
virtual
void
OnProducerResumed
(
RTC
::
Producer
*
producer
)
=
0
;
...
...
worker/include/RTC/RateCalculator.hpp
浏览文件 @
8d41bbae
...
@@ -33,16 +33,10 @@ namespace RTC
...
@@ -33,16 +33,10 @@ namespace RTC
{
{
return
this
->
bytes
;
return
this
->
bytes
;
}
}
void
Reset
()
{
uint64_t
nowMs
=
DepLibUV
::
GetTimeMs
();
Reset
(
nowMs
);
}
private
:
private
:
void
RemoveOldData
(
uint64_t
nowMs
);
void
RemoveOldData
(
uint64_t
nowMs
);
void
Reset
(
uint64_t
nowMs
)
void
Reset
()
{
{
this
->
buffer
.
reset
(
new
BufferItem
[
this
->
windowItems
]);
this
->
buffer
.
reset
(
new
BufferItem
[
this
->
windowItems
]);
this
->
newestItemStartTime
=
0u
;
this
->
newestItemStartTime
=
0u
;
...
...
worker/include/RTC/RtpStream.hpp
浏览文件 @
8d41bbae
...
@@ -25,6 +25,9 @@ namespace RTC
...
@@ -25,6 +25,9 @@ namespace RTC
protected
:
protected
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
=
0
;
virtual
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
=
0
;
};
};
...
...
worker/include/RTC/SctpAssociation.hpp
浏览文件 @
8d41bbae
...
@@ -37,6 +37,9 @@ namespace RTC
...
@@ -37,6 +37,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnSctpAssociationConnecting
(
RTC
::
SctpAssociation
*
sctpAssociation
)
=
0
;
virtual
void
OnSctpAssociationConnecting
(
RTC
::
SctpAssociation
*
sctpAssociation
)
=
0
;
virtual
void
OnSctpAssociationConnected
(
RTC
::
SctpAssociation
*
sctpAssociation
)
=
0
;
virtual
void
OnSctpAssociationConnected
(
RTC
::
SctpAssociation
*
sctpAssociation
)
=
0
;
...
...
worker/include/RTC/SenderBandwidthEstimator.hpp
浏览文件 @
8d41bbae
...
@@ -15,6 +15,9 @@ namespace RTC
...
@@ -15,6 +15,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnSenderBandwidthEstimatorAvailableBitrate
(
virtual
void
OnSenderBandwidthEstimatorAvailableBitrate
(
RTC
::
SenderBandwidthEstimator
*
senderBwe
,
RTC
::
SenderBandwidthEstimator
*
senderBwe
,
...
...
worker/include/RTC/TcpConnection.hpp
浏览文件 @
8d41bbae
...
@@ -11,6 +11,9 @@ namespace RTC
...
@@ -11,6 +11,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnTcpConnectionPacketReceived
(
virtual
void
OnTcpConnectionPacketReceived
(
RTC
::
TcpConnection
*
connection
,
const
uint8_t
*
data
,
size_t
len
)
=
0
;
RTC
::
TcpConnection
*
connection
,
const
uint8_t
*
data
,
size_t
len
)
=
0
;
...
...
worker/include/RTC/TcpServer.hpp
浏览文件 @
8d41bbae
...
@@ -14,6 +14,9 @@ namespace RTC
...
@@ -14,6 +14,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnRtcTcpConnectionClosed
(
virtual
void
OnRtcTcpConnectionClosed
(
RTC
::
TcpServer
*
tcpServer
,
RTC
::
TcpConnection
*
connection
)
=
0
;
RTC
::
TcpServer
*
tcpServer
,
RTC
::
TcpConnection
*
connection
)
=
0
;
...
...
worker/include/RTC/Transport.hpp
浏览文件 @
8d41bbae
...
@@ -53,6 +53,9 @@ namespace RTC
...
@@ -53,6 +53,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnTransportNewProducer
(
RTC
::
Transport
*
transport
,
RTC
::
Producer
*
producer
)
=
0
;
virtual
void
OnTransportNewProducer
(
RTC
::
Transport
*
transport
,
RTC
::
Producer
*
producer
)
=
0
;
virtual
void
OnTransportProducerClosed
(
RTC
::
Transport
*
transport
,
RTC
::
Producer
*
producer
)
=
0
;
virtual
void
OnTransportProducerClosed
(
RTC
::
Transport
*
transport
,
RTC
::
Producer
*
producer
)
=
0
;
...
...
worker/include/RTC/TransportCongestionControlClient.hpp
浏览文件 @
8d41bbae
...
@@ -35,6 +35,9 @@ namespace RTC
...
@@ -35,6 +35,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnTransportCongestionControlClientBitrates
(
virtual
void
OnTransportCongestionControlClientBitrates
(
RTC
::
TransportCongestionControlClient
*
tccClient
,
RTC
::
TransportCongestionControlClient
*
tccClient
,
...
...
worker/include/RTC/TransportCongestionControlServer.hpp
浏览文件 @
8d41bbae
...
@@ -17,6 +17,9 @@ namespace RTC
...
@@ -17,6 +17,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnTransportCongestionControlServerSendRtcpPacket
(
virtual
void
OnTransportCongestionControlServerSendRtcpPacket
(
RTC
::
TransportCongestionControlServer
*
tccServer
,
RTC
::
RTCP
::
Packet
*
packet
)
=
0
;
RTC
::
TransportCongestionControlServer
*
tccServer
,
RTC
::
RTCP
::
Packet
*
packet
)
=
0
;
...
...
worker/include/RTC/UdpSocket.hpp
浏览文件 @
8d41bbae
...
@@ -12,6 +12,9 @@ namespace RTC
...
@@ -12,6 +12,9 @@ namespace RTC
public
:
public
:
class
Listener
class
Listener
{
{
public
:
virtual
~
Listener
()
=
default
;
public
:
public
:
virtual
void
OnUdpSocketPacketReceived
(
virtual
void
OnUdpSocketPacketReceived
(
RTC
::
UdpSocket
*
socket
,
const
uint8_t
*
data
,
size_t
len
,
const
struct
sockaddr
*
remoteAddr
)
=
0
;
RTC
::
UdpSocket
*
socket
,
const
uint8_t
*
data
,
size_t
len
,
const
struct
sockaddr
*
remoteAddr
)
=
0
;
...
...
worker/src/DepLibUV.cpp
浏览文件 @
8d41bbae
...
@@ -16,7 +16,7 @@ inline static void onClose(uv_handle_t* handle)
...
@@ -16,7 +16,7 @@ inline static void onClose(uv_handle_t* handle)
delete
handle
;
delete
handle
;
}
}
inline
static
void
onWalk
(
uv_handle_t
*
handle
,
void
*
arg
)
inline
static
void
onWalk
(
uv_handle_t
*
handle
,
void
*
/*arg*/
)
{
{
// Must use MS_ERROR_STD since at this point the Channel is already closed.
// Must use MS_ERROR_STD since at this point the Channel is already closed.
MS_ERROR_STD
(
MS_ERROR_STD
(
...
...
worker/src/RTC/RateCalculator.cpp
浏览文件 @
8d41bbae
...
@@ -107,7 +107,7 @@ namespace RTC
...
@@ -107,7 +107,7 @@ namespace RTC
// A whole window size time has elapsed since last entry. Reset the buffer.
// A whole window size time has elapsed since last entry. Reset the buffer.
if
(
newoldestTime
>
this
->
newestItemStartTime
)
if
(
newoldestTime
>
this
->
newestItemStartTime
)
{
{
Reset
(
nowMs
);
Reset
();
return
;
return
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论