Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
f09861c6
Unverified
提交
f09861c6
authored
1月 04, 2024
作者:
José Luis Millán
提交者:
GitHub
1月 04, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
C++: qualified auto (#1299)
上级
913cf8fe
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
20 行增加
和
18 行删除
+20
-18
Packet.hpp
worker/include/RTC/RTCP/Packet.hpp
+1
-1
RtpPacket.hpp
worker/include/RTC/RtpPacket.hpp
+1
-1
TransportTuple.hpp
worker/include/RTC/TransportTuple.hpp
+5
-3
PlainTransport.cpp
worker/src/RTC/PlainTransport.cpp
+1
-1
WebRtcServer.cpp
worker/src/RTC/WebRtcServer.cpp
+1
-1
Settings.cpp
worker/src/Settings.cpp
+1
-1
IP.cpp
worker/src/Utils/IP.cpp
+1
-1
String.cpp
worker/src/Utils/String.cpp
+2
-2
Worker.cpp
worker/src/Worker.cpp
+4
-4
TcpConnectionHandle.cpp
worker/src/handles/TcpConnectionHandle.cpp
+1
-1
UdpSocketHandle.cpp
worker/src/handles/UdpSocketHandle.cpp
+1
-1
TestIP.cpp
worker/test/src/Utils/TestIP.cpp
+1
-1
没有找到文件。
worker/include/RTC/RTCP/Packet.hpp
浏览文件 @
f09861c6
...
@@ -52,7 +52,7 @@ namespace RTC
...
@@ -52,7 +52,7 @@ namespace RTC
static
const
size_t
CommonHeaderSize
{
4
};
static
const
size_t
CommonHeaderSize
{
4
};
static
bool
IsRtcp
(
const
uint8_t
*
data
,
size_t
len
)
static
bool
IsRtcp
(
const
uint8_t
*
data
,
size_t
len
)
{
{
auto
header
=
const_cast
<
CommonHeader
*>
(
reinterpret_cast
<
const
CommonHeader
*>
(
data
));
auto
*
header
=
const_cast
<
CommonHeader
*>
(
reinterpret_cast
<
const
CommonHeader
*>
(
data
));
// clang-format off
// clang-format off
return
(
return
(
...
...
worker/include/RTC/RtpPacket.hpp
浏览文件 @
f09861c6
...
@@ -120,7 +120,7 @@ namespace RTC
...
@@ -120,7 +120,7 @@ namespace RTC
{
{
// NOTE: RtcpPacket::IsRtcp() must always be called before this method.
// NOTE: RtcpPacket::IsRtcp() must always be called before this method.
auto
header
=
const_cast
<
Header
*>
(
reinterpret_cast
<
const
Header
*>
(
data
));
auto
*
header
=
const_cast
<
Header
*>
(
reinterpret_cast
<
const
Header
*>
(
data
));
// clang-format off
// clang-format off
return
(
return
(
...
...
worker/include/RTC/TransportTuple.hpp
浏览文件 @
f09861c6
...
@@ -190,7 +190,7 @@ namespace RTC
...
@@ -190,7 +190,7 @@ namespace RTC
{
{
case
AF_INET
:
case
AF_INET
:
{
{
auto
*
remoteSockAddrIn
=
reinterpret_cast
<
const
struct
sockaddr_in
*>
(
remoteSockAddr
);
const
auto
*
remoteSockAddrIn
=
reinterpret_cast
<
const
struct
sockaddr_in
*>
(
remoteSockAddr
);
const
uint64_t
address
=
ntohl
(
remoteSockAddrIn
->
sin_addr
.
s_addr
);
const
uint64_t
address
=
ntohl
(
remoteSockAddrIn
->
sin_addr
.
s_addr
);
const
uint64_t
port
=
(
ntohs
(
remoteSockAddrIn
->
sin_port
));
const
uint64_t
port
=
(
ntohs
(
remoteSockAddrIn
->
sin_port
));
...
@@ -204,8 +204,10 @@ namespace RTC
...
@@ -204,8 +204,10 @@ namespace RTC
case
AF_INET6
:
case
AF_INET6
:
{
{
auto
*
remoteSockAddrIn6
=
reinterpret_cast
<
const
struct
sockaddr_in6
*>
(
remoteSockAddr
);
const
auto
*
remoteSockAddrIn6
=
auto
*
a
=
reinterpret_cast
<
const
uint32_t
*>
(
std
::
addressof
(
remoteSockAddrIn6
->
sin6_addr
));
reinterpret_cast
<
const
struct
sockaddr_in6
*>
(
remoteSockAddr
);
const
auto
*
a
=
reinterpret_cast
<
const
uint32_t
*>
(
std
::
addressof
(
remoteSockAddrIn6
->
sin6_addr
));
const
auto
address1
=
a
[
0
]
^
a
[
1
]
^
a
[
2
]
^
a
[
3
];
const
auto
address1
=
a
[
0
]
^
a
[
1
]
^
a
[
2
]
^
a
[
3
];
const
auto
address2
=
a
[
0
];
const
auto
address2
=
a
[
0
];
...
...
worker/src/RTC/PlainTransport.cpp
浏览文件 @
f09861c6
...
@@ -429,7 +429,7 @@ namespace RTC
...
@@ -429,7 +429,7 @@ namespace RTC
MS_THROW_TYPE_ERROR
(
"missing srtpParameters (SRTP enabled)"
);
MS_THROW_TYPE_ERROR
(
"missing srtpParameters (SRTP enabled)"
);
}
}
const
auto
srtpParameters
=
body
->
srtpParameters
();
const
auto
*
const
srtpParameters
=
body
->
srtpParameters
();
// Update out SRTP crypto suite with the one used by the remote.
// Update out SRTP crypto suite with the one used by the remote.
auto
previousSrtpCryptoSuite
=
this
->
srtpCryptoSuite
;
auto
previousSrtpCryptoSuite
=
this
->
srtpCryptoSuite
;
...
...
worker/src/RTC/WebRtcServer.cpp
浏览文件 @
f09861c6
...
@@ -273,7 +273,7 @@ namespace RTC
...
@@ -273,7 +273,7 @@ namespace RTC
std
::
vector
<
RTC
::
IceCandidate
>
iceCandidates
;
std
::
vector
<
RTC
::
IceCandidate
>
iceCandidates
;
uint16_t
iceLocalPreferenceDecrement
{
0
};
uint16_t
iceLocalPreferenceDecrement
{
0
};
for
(
auto
&
item
:
this
->
udpSocketOrTcpServers
)
for
(
const
auto
&
item
:
this
->
udpSocketOrTcpServers
)
{
{
if
(
item
.
udpSocket
&&
enableUdp
)
if
(
item
.
udpSocket
&&
enableUdp
)
{
{
...
...
worker/src/Settings.cpp
浏览文件 @
f09861c6
...
@@ -303,7 +303,7 @@ void Settings::HandleRequest(Channel::ChannelRequest* request)
...
@@ -303,7 +303,7 @@ void Settings::HandleRequest(Channel::ChannelRequest* request)
{
{
case
Channel
:
:
ChannelRequest
::
Method
::
WORKER_UPDATE_SETTINGS
:
case
Channel
:
:
ChannelRequest
::
Method
::
WORKER_UPDATE_SETTINGS
:
{
{
auto
body
=
request
->
data
->
body_as
<
FBS
::
Worker
::
UpdateSettingsRequest
>
();
const
auto
*
body
=
request
->
data
->
body_as
<
FBS
::
Worker
::
UpdateSettingsRequest
>
();
if
(
flatbuffers
::
IsFieldPresent
(
body
,
FBS
::
Worker
::
UpdateSettingsRequest
::
VT_LOGLEVEL
))
if
(
flatbuffers
::
IsFieldPresent
(
body
,
FBS
::
Worker
::
UpdateSettingsRequest
::
VT_LOGLEVEL
))
{
{
...
...
worker/src/Utils/IP.cpp
浏览文件 @
f09861c6
...
@@ -17,7 +17,7 @@ namespace Utils
...
@@ -17,7 +17,7 @@ namespace Utils
return
AF_UNSPEC
;
return
AF_UNSPEC
;
}
}
auto
ipPtr
=
ip
.
c_str
();
const
auto
*
ipPtr
=
ip
.
c_str
();
char
ipBuffer
[
INET6_ADDRSTRLEN
]
=
{
0
};
char
ipBuffer
[
INET6_ADDRSTRLEN
]
=
{
0
};
if
(
uv_inet_pton
(
AF_INET
,
ipPtr
,
ipBuffer
)
==
0
)
if
(
uv_inet_pton
(
AF_INET
,
ipPtr
,
ipBuffer
)
==
0
)
...
...
worker/src/Utils/String.cpp
浏览文件 @
f09861c6
...
@@ -84,7 +84,7 @@ namespace Utils
...
@@ -84,7 +84,7 @@ namespace Utils
{
{
MS_TRACE
();
MS_TRACE
();
auto
*
data
=
reinterpret_cast
<
const
uint8_t
*>
(
str
.
c_str
());
const
auto
*
data
=
reinterpret_cast
<
const
uint8_t
*>
(
str
.
c_str
());
return
Base64Encode
(
data
,
str
.
size
());
return
Base64Encode
(
data
,
str
.
size
());
}
}
...
@@ -186,7 +186,7 @@ namespace Utils
...
@@ -186,7 +186,7 @@ namespace Utils
{
{
MS_TRACE
();
MS_TRACE
();
auto
*
data
=
reinterpret_cast
<
const
uint8_t
*>
(
str
.
c_str
());
const
auto
*
data
=
reinterpret_cast
<
const
uint8_t
*>
(
str
.
c_str
());
return
Base64Decode
(
data
,
str
.
size
(),
outLen
);
return
Base64Decode
(
data
,
str
.
size
(),
outLen
);
}
}
...
...
worker/src/Worker.cpp
浏览文件 @
f09861c6
...
@@ -310,7 +310,7 @@ inline void Worker::HandleRequest(Channel::ChannelRequest* request)
...
@@ -310,7 +310,7 @@ inline void Worker::HandleRequest(Channel::ChannelRequest* request)
{
{
try
try
{
{
const
auto
body
=
request
->
data
->
body_as
<
FBS
::
Worker
::
CreateWebRtcServerRequest
>
();
const
auto
*
const
body
=
request
->
data
->
body_as
<
FBS
::
Worker
::
CreateWebRtcServerRequest
>
();
std
::
string
webRtcServerId
=
body
->
webRtcServerId
()
->
str
();
std
::
string
webRtcServerId
=
body
->
webRtcServerId
()
->
str
();
...
@@ -340,7 +340,7 @@ inline void Worker::HandleRequest(Channel::ChannelRequest* request)
...
@@ -340,7 +340,7 @@ inline void Worker::HandleRequest(Channel::ChannelRequest* request)
{
{
RTC
::
WebRtcServer
*
webRtcServer
{
nullptr
};
RTC
::
WebRtcServer
*
webRtcServer
{
nullptr
};
auto
body
=
request
->
data
->
body_as
<
FBS
::
Worker
::
CloseWebRtcServerRequest
>
();
const
auto
*
body
=
request
->
data
->
body_as
<
FBS
::
Worker
::
CloseWebRtcServerRequest
>
();
auto
webRtcServerId
=
body
->
webRtcServerId
()
->
str
();
auto
webRtcServerId
=
body
->
webRtcServerId
()
->
str
();
...
@@ -367,7 +367,7 @@ inline void Worker::HandleRequest(Channel::ChannelRequest* request)
...
@@ -367,7 +367,7 @@ inline void Worker::HandleRequest(Channel::ChannelRequest* request)
case
Channel
:
:
ChannelRequest
::
Method
::
WORKER_CREATE_ROUTER
:
case
Channel
:
:
ChannelRequest
::
Method
::
WORKER_CREATE_ROUTER
:
{
{
auto
body
=
request
->
data
->
body_as
<
FBS
::
Worker
::
CreateRouterRequest
>
();
const
auto
*
body
=
request
->
data
->
body_as
<
FBS
::
Worker
::
CreateRouterRequest
>
();
auto
routerId
=
body
->
routerId
()
->
str
();
auto
routerId
=
body
->
routerId
()
->
str
();
...
@@ -395,7 +395,7 @@ inline void Worker::HandleRequest(Channel::ChannelRequest* request)
...
@@ -395,7 +395,7 @@ inline void Worker::HandleRequest(Channel::ChannelRequest* request)
{
{
RTC
::
Router
*
router
{
nullptr
};
RTC
::
Router
*
router
{
nullptr
};
auto
body
=
request
->
data
->
body_as
<
FBS
::
Worker
::
CloseRouterRequest
>
();
const
auto
*
body
=
request
->
data
->
body_as
<
FBS
::
Worker
::
CloseRouterRequest
>
();
auto
routerId
=
body
->
routerId
()
->
str
();
auto
routerId
=
body
->
routerId
()
->
str
();
...
...
worker/src/handles/TcpConnectionHandle.cpp
浏览文件 @
f09861c6
...
@@ -38,7 +38,7 @@ inline static void onWrite(uv_write_t* req, int status)
...
@@ -38,7 +38,7 @@ inline static void onWrite(uv_write_t* req, int status)
auto
*
writeData
=
static_cast
<
TcpConnectionHandle
::
UvWriteData
*>
(
req
->
data
);
auto
*
writeData
=
static_cast
<
TcpConnectionHandle
::
UvWriteData
*>
(
req
->
data
);
auto
*
handle
=
req
->
handle
;
auto
*
handle
=
req
->
handle
;
auto
*
connection
=
static_cast
<
TcpConnectionHandle
*>
(
handle
->
data
);
auto
*
connection
=
static_cast
<
TcpConnectionHandle
*>
(
handle
->
data
);
auto
*
cb
=
writeData
->
cb
;
const
auto
*
cb
=
writeData
->
cb
;
if
(
connection
)
if
(
connection
)
{
{
...
...
worker/src/handles/UdpSocketHandle.cpp
浏览文件 @
f09861c6
...
@@ -43,7 +43,7 @@ inline static void onSend(uv_udp_send_t* req, int status)
...
@@ -43,7 +43,7 @@ inline static void onSend(uv_udp_send_t* req, int status)
auto
*
sendData
=
static_cast
<
UdpSocketHandle
::
UvSendData
*>
(
req
->
data
);
auto
*
sendData
=
static_cast
<
UdpSocketHandle
::
UvSendData
*>
(
req
->
data
);
auto
*
handle
=
req
->
handle
;
auto
*
handle
=
req
->
handle
;
auto
*
socket
=
static_cast
<
UdpSocketHandle
*>
(
handle
->
data
);
auto
*
socket
=
static_cast
<
UdpSocketHandle
*>
(
handle
->
data
);
auto
*
cb
=
sendData
->
cb
;
const
auto
*
cb
=
sendData
->
cb
;
if
(
socket
)
if
(
socket
)
{
{
...
...
worker/test/src/Utils/TestIP.cpp
浏览文件 @
f09861c6
...
@@ -127,7 +127,7 @@ SCENARIO("Utils::IP::GetAddressInfo()")
...
@@ -127,7 +127,7 @@ SCENARIO("Utils::IP::GetAddressInfo()")
sin
.
sin_port
=
htons
(
10251
);
sin
.
sin_port
=
htons
(
10251
);
sin
.
sin_addr
.
s_addr
=
inet_addr
(
"82.99.219.114"
);
sin
.
sin_addr
.
s_addr
=
inet_addr
(
"82.99.219.114"
);
auto
*
addr
=
reinterpret_cast
<
const
struct
sockaddr
*>
(
&
sin
);
const
auto
*
addr
=
reinterpret_cast
<
const
struct
sockaddr
*>
(
&
sin
);
int
family
;
int
family
;
std
::
string
ip
;
std
::
string
ip
;
uint16_t
port
;
uint16_t
port
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论