Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
6d75382a
提交
6d75382a
authored
3月 16, 2017
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
C++: const all the things! (fixes #69 and majes @jmillan happy)
上级
44bbc6d1
隐藏空白字符变更
内嵌
并排
正在显示
69 个修改的文件
包含
428 行增加
和
425 行删除
+428
-425
DtlsTransport.hpp
worker/include/RTC/DtlsTransport.hpp
+17
-17
IceServer.hpp
worker/include/RTC/IceServer.hpp
+9
-9
Parameters.hpp
worker/include/RTC/Parameters.hpp
+1
-1
Peer.hpp
worker/include/RTC/Peer.hpp
+13
-13
Bye.hpp
worker/include/RTC/RTCP/Bye.hpp
+7
-6
CompoundPacket.hpp
worker/include/RTC/RTCP/CompoundPacket.hpp
+8
-8
Feedback.hpp
worker/include/RTC/RTCP/Feedback.hpp
+10
-10
FeedbackItem.hpp
worker/include/RTC/RTCP/FeedbackItem.hpp
+3
-3
FeedbackPs.hpp
worker/include/RTC/RTCP/FeedbackPs.hpp
+2
-2
FeedbackPsAfb.hpp
worker/include/RTC/RTCP/FeedbackPsAfb.hpp
+4
-4
FeedbackPsFir.hpp
worker/include/RTC/RTCP/FeedbackPsFir.hpp
+6
-6
FeedbackPsLei.hpp
worker/include/RTC/RTCP/FeedbackPsLei.hpp
+4
-4
FeedbackPsRpsi.hpp
worker/include/RTC/RTCP/FeedbackPsRpsi.hpp
+10
-10
FeedbackPsSli.hpp
worker/include/RTC/RTCP/FeedbackPsSli.hpp
+8
-8
FeedbackPsTst.hpp
worker/include/RTC/RTCP/FeedbackPsTst.hpp
+8
-8
FeedbackPsVbcm.hpp
worker/include/RTC/RTCP/FeedbackPsVbcm.hpp
+12
-12
FeedbackRtp.hpp
worker/include/RTC/RTCP/FeedbackRtp.hpp
+2
-2
FeedbackRtpEcn.hpp
worker/include/RTC/RTCP/FeedbackRtpEcn.hpp
+16
-16
FeedbackRtpNack.hpp
worker/include/RTC/RTCP/FeedbackRtpNack.hpp
+6
-6
FeedbackRtpTllei.hpp
worker/include/RTC/RTCP/FeedbackRtpTllei.hpp
+6
-6
FeedbackRtpTmmb.hpp
worker/include/RTC/RTCP/FeedbackRtpTmmb.hpp
+8
-8
Packet.hpp
worker/include/RTC/RTCP/Packet.hpp
+9
-9
ReceiverReport.hpp
worker/include/RTC/RTCP/ReceiverReport.hpp
+22
-22
Sdes.hpp
worker/include/RTC/RTCP/Sdes.hpp
+16
-16
SenderReport.hpp
worker/include/RTC/RTCP/SenderReport.hpp
+18
-18
Room.hpp
worker/include/RTC/Room.hpp
+4
-4
RtpDataCounter.hpp
worker/include/RTC/RtpDataCounter.hpp
+7
-7
RtpDictionaries.hpp
worker/include/RTC/RtpDictionaries.hpp
+17
-17
RtpListener.hpp
worker/include/RTC/RtpListener.hpp
+7
-7
RtpPacket.hpp
worker/include/RTC/RtpPacket.hpp
+31
-31
RtpReceiver.hpp
worker/include/RTC/RtpReceiver.hpp
+5
-5
RtpSender.hpp
worker/include/RTC/RtpSender.hpp
+8
-8
RtpStream.hpp
worker/include/RTC/RtpStream.hpp
+2
-0
RtpStreamRecv.hpp
worker/include/RTC/RtpStreamRecv.hpp
+1
-2
RtpStreamSend.hpp
worker/include/RTC/RtpStreamSend.hpp
+1
-2
StunMessage.hpp
worker/include/RTC/StunMessage.hpp
+28
-26
Transport.hpp
worker/include/RTC/Transport.hpp
+1
-1
TransportTuple.hpp
worker/include/RTC/TransportTuple.hpp
+10
-10
TcpConnection.hpp
worker/include/handles/TcpConnection.hpp
+19
-19
TcpServer.hpp
worker/include/handles/TcpServer.hpp
+13
-13
UdpSocket.hpp
worker/include/handles/UdpSocket.hpp
+9
-9
UnixStreamSocket.hpp
worker/include/handles/UnixStreamSocket.hpp
+2
-2
DtlsTransport.cpp
worker/src/RTC/DtlsTransport.cpp
+1
-1
IceServer.cpp
worker/src/RTC/IceServer.cpp
+3
-3
Peer.cpp
worker/src/RTC/Peer.cpp
+5
-5
Room.cpp
worker/src/RTC/Room.cpp
+2
-2
Parameters.cpp
worker/src/RTC/RtpDictionaries/Parameters.cpp
+1
-1
RtcpFeedback.cpp
worker/src/RTC/RtpDictionaries/RtcpFeedback.cpp
+1
-1
RtcpParameters.cpp
worker/src/RTC/RtpDictionaries/RtcpParameters.cpp
+1
-1
RtpCapabilities.cpp
worker/src/RTC/RtpDictionaries/RtpCapabilities.cpp
+1
-1
RtpCodecParameters.cpp
worker/src/RTC/RtpDictionaries/RtpCodecParameters.cpp
+1
-1
RtpEncodingParameters.cpp
worker/src/RTC/RtpDictionaries/RtpEncodingParameters.cpp
+1
-1
RtpFecParameters.cpp
worker/src/RTC/RtpDictionaries/RtpFecParameters.cpp
+1
-1
RtpHeaderExtension.cpp
worker/src/RTC/RtpDictionaries/RtpHeaderExtension.cpp
+1
-1
RtpHeaderExtensionParameters.cpp
.../src/RTC/RtpDictionaries/RtpHeaderExtensionParameters.cpp
+1
-1
RtpParameters.cpp
worker/src/RTC/RtpDictionaries/RtpParameters.cpp
+2
-2
RtpRtxParameters.cpp
worker/src/RTC/RtpDictionaries/RtpRtxParameters.cpp
+1
-1
RtpListener.cpp
worker/src/RTC/RtpListener.cpp
+2
-2
RtpPacket.cpp
worker/src/RTC/RtpPacket.cpp
+1
-1
RtpReceiver.cpp
worker/src/RTC/RtpReceiver.cpp
+1
-1
RtpSender.cpp
worker/src/RTC/RtpSender.cpp
+2
-2
RtpStreamRecv.cpp
worker/src/RTC/RtpStreamRecv.cpp
+1
-1
RtpStreamSend.cpp
worker/src/RTC/RtpStreamSend.cpp
+1
-1
StunMessage.cpp
worker/src/RTC/StunMessage.cpp
+1
-1
Transport.cpp
worker/src/RTC/Transport.cpp
+1
-1
TransportTuple.cpp
worker/src/RTC/TransportTuple.cpp
+2
-2
TcpConnection.cpp
worker/src/handles/TcpConnection.cpp
+1
-1
TcpServer.cpp
worker/src/handles/TcpServer.cpp
+1
-1
UdpSocket.cpp
worker/src/handles/UdpSocket.cpp
+1
-1
没有找到文件。
worker/include/RTC/DtlsTransport.hpp
浏览文件 @
6d75382a
...
...
@@ -118,16 +118,16 @@ namespace RTC
virtual
~
DtlsTransport
();
void
Close
();
void
Dump
();
void
Dump
()
const
;
void
Run
(
Role
localRole
);
void
SetRemoteFingerprint
(
Fingerprint
fingerprint
);
void
ProcessDtlsData
(
const
uint8_t
*
data
,
size_t
len
);
DtlsState
GetState
();
Role
GetLocalRole
();
DtlsState
GetState
()
const
;
Role
GetLocalRole
()
const
;
void
SendApplicationData
(
const
uint8_t
*
data
,
size_t
len
);
private
:
bool
IsRunning
();
bool
IsRunning
()
const
;
void
Reset
();
bool
CheckStatus
(
int
return_code
);
void
SendPendingOutgoingDtlsData
();
...
...
@@ -206,7 +206,19 @@ namespace RTC
/* Inline instance methods. */
inline
bool
DtlsTransport
::
IsRunning
()
DtlsTransport
::
DtlsState
DtlsTransport
::
GetState
()
const
{
return
this
->
state
;
}
inline
DtlsTransport
::
Role
DtlsTransport
::
GetLocalRole
()
const
{
return
this
->
localRole
;
}
inline
bool
DtlsTransport
::
IsRunning
()
const
{
switch
(
this
->
state
)
{
...
...
@@ -223,18 +235,6 @@ namespace RTC
// Make GCC 4.9 happy.
return
false
;
}
inline
DtlsTransport
::
DtlsState
DtlsTransport
::
GetState
()
{
return
this
->
state
;
}
inline
DtlsTransport
::
Role
DtlsTransport
::
GetLocalRole
()
{
return
this
->
localRole
;
}
}
#endif
worker/include/RTC/IceServer.hpp
浏览文件 @
6d75382a
...
...
@@ -46,10 +46,10 @@ namespace RTC
void
Close
();
void
ProcessStunMessage
(
RTC
::
StunMessage
*
msg
,
RTC
::
TransportTuple
*
tuple
);
std
::
string
&
GetUsernameFragment
()
;
std
::
string
&
GetPassword
()
;
IceState
GetState
();
bool
IsValidTuple
(
RTC
::
TransportTuple
*
tuple
);
const
std
::
string
&
GetUsernameFragment
()
const
;
const
std
::
string
&
GetPassword
()
const
;
IceState
GetState
()
const
;
bool
IsValidTuple
(
RTC
::
TransportTuple
*
tuple
)
const
;
void
RemoveTuple
(
RTC
::
TransportTuple
*
tuple
);
// This should be just called in 'connected' or completed' state
// and the given tuple must be an already valid tuple.
...
...
@@ -64,7 +64,7 @@ namespace RTC
/**
* If the given tuple exists return its stored address, nullptr otherwise.
*/
RTC
::
TransportTuple
*
HasTuple
(
RTC
::
TransportTuple
*
tuple
);
RTC
::
TransportTuple
*
HasTuple
(
RTC
::
TransportTuple
*
tuple
)
const
;
/**
* Set the given tuple as the selected tuple.
* NOTE: The given tuple MUST be already stored within the list.
...
...
@@ -82,22 +82,22 @@ namespace RTC
RTC
::
TransportTuple
*
selectedTuple
=
nullptr
;
};
/* Inline methods. */
/* Inline
instance
methods. */
inline
std
::
string
&
IceServer
::
GetUsernameFragment
()
const
std
::
string
&
IceServer
::
GetUsernameFragment
()
const
{
return
this
->
usernameFragment
;
}
inline
std
::
string
&
IceServer
::
GetPassword
()
const
std
::
string
&
IceServer
::
GetPassword
()
const
{
return
this
->
password
;
}
inline
IceServer
::
IceState
IceServer
::
GetState
()
IceServer
::
IceState
IceServer
::
GetState
()
const
{
return
this
->
state
;
}
...
...
worker/include/RTC/Parameters.hpp
浏览文件 @
6d75382a
...
...
@@ -64,7 +64,7 @@ namespace RTC
public
:
Parameters
()
{};
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
void
Set
(
Json
::
Value
&
data
);
bool
HasBoolean
(
std
::
string
&
key
);
...
...
worker/include/RTC/Peer.hpp
浏览文件 @
6d75382a
...
...
@@ -50,25 +50,25 @@ namespace RTC
virtual
~
Peer
();
void
Close
();
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
void
HandleRequest
(
Channel
::
Request
*
request
);
bool
HasCapabilities
();
std
::
vector
<
RTC
::
RtpReceiver
*>
GetRtpReceivers
();
std
::
vector
<
RTC
::
RtpSender
*>
GetRtpSenders
();
std
::
unordered_map
<
uint32_t
,
RTC
::
Transport
*>&
GetTransports
()
;
bool
HasCapabilities
()
const
;
std
::
vector
<
RTC
::
RtpReceiver
*>
GetRtpReceivers
()
const
;
std
::
vector
<
RTC
::
RtpSender
*>
GetRtpSenders
()
const
;
const
std
::
unordered_map
<
uint32_t
,
RTC
::
Transport
*>&
GetTransports
()
const
;
/**
* Add a new RtpSender to the Peer.
* @param rtpSender Instance of RtpSender.
* @param peerName Name of the receiver Peer.
*/
void
AddRtpSender
(
RTC
::
RtpSender
*
rtpSender
,
std
::
string
&
peerName
,
RTC
::
RtpParameters
*
rtpParameters
);
RTC
::
RtpSender
*
GetRtpSender
(
uint32_t
ssrc
);
RTC
::
RtpSender
*
GetRtpSender
(
uint32_t
ssrc
)
const
;
void
SendRtcp
(
uint64_t
now
);
private
:
RTC
::
Transport
*
GetTransportFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
transportId
=
nullptr
);
RTC
::
RtpReceiver
*
GetRtpReceiverFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
rtpReceiverId
=
nullptr
);
RTC
::
RtpSender
*
GetRtpSenderFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
rtpSenderId
=
nullptr
);
RTC
::
Transport
*
GetTransportFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
transportId
=
nullptr
)
const
;
RTC
::
RtpReceiver
*
GetRtpReceiverFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
rtpReceiverId
=
nullptr
)
const
;
RTC
::
RtpSender
*
GetRtpSenderFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
rtpSenderId
=
nullptr
)
const
;
/* Pure virtual methods inherited from RTC::Transport::Listener. */
public
:
...
...
@@ -111,13 +111,13 @@ namespace RTC
/* Inline methods. */
inline
bool
Peer
::
HasCapabilities
()
bool
Peer
::
HasCapabilities
()
const
{
return
this
->
hasCapabilities
;
}
inline
std
::
vector
<
RTC
::
RtpReceiver
*>
Peer
::
GetRtpReceivers
()
std
::
vector
<
RTC
::
RtpReceiver
*>
Peer
::
GetRtpReceivers
()
const
{
std
::
vector
<
RTC
::
RtpReceiver
*>
rtpReceivers
;
...
...
@@ -130,7 +130,7 @@ namespace RTC
}
inline
std
::
vector
<
RTC
::
RtpSender
*>
Peer
::
GetRtpSenders
()
std
::
vector
<
RTC
::
RtpSender
*>
Peer
::
GetRtpSenders
()
const
{
std
::
vector
<
RTC
::
RtpSender
*>
rtpSenders
;
...
...
@@ -143,7 +143,7 @@ namespace RTC
}
inline
std
::
unordered_map
<
uint32_t
,
RTC
::
Transport
*>&
Peer
::
GetTransports
()
const
std
::
unordered_map
<
uint32_t
,
RTC
::
Transport
*>&
Peer
::
GetTransports
()
const
{
return
this
->
transports
;
}
...
...
worker/include/RTC/RTCP/Bye.hpp
浏览文件 @
6d75382a
...
...
@@ -23,7 +23,7 @@ namespace RTC { namespace RTCP
void
AddSsrc
(
uint32_t
ssrc
);
void
SetReason
(
const
std
::
string
&
reason
);
const
std
::
string
&
GetReason
();
const
std
::
string
&
GetReason
()
const
;
Iterator
Begin
();
Iterator
End
();
...
...
@@ -31,8 +31,8 @@ namespace RTC { namespace RTCP
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetCount
()
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetCount
()
const
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
std
::
vector
<
uint32_t
>
ssrcs
;
...
...
@@ -47,15 +47,16 @@ namespace RTC { namespace RTCP
{}
inline
size_t
ByePacket
::
GetCount
()
size_t
ByePacket
::
GetCount
()
const
{
return
this
->
ssrcs
.
size
();
}
inline
size_t
ByePacket
::
GetSize
()
size_t
ByePacket
::
GetSize
()
const
{
size_t
size
=
sizeof
(
Packet
::
CommonHeader
);
size
+=
ssrcs
.
size
()
*
sizeof
(
uint32_t
);
if
(
!
this
->
reason
.
empty
())
...
...
@@ -82,7 +83,7 @@ namespace RTC { namespace RTCP
}
inline
const
std
::
string
&
ByePacket
::
GetReason
()
const
std
::
string
&
ByePacket
::
GetReason
()
const
{
return
this
->
reason
;
}
...
...
worker/include/RTC/RTCP/CompoundPacket.hpp
浏览文件 @
6d75382a
...
...
@@ -12,10 +12,10 @@ namespace RTC { namespace RTCP
class
CompoundPacket
{
public
:
const
uint8_t
*
GetData
();
size_t
GetSize
();
size_t
GetSenderReportCount
();
size_t
GetReceiverReportCount
();
const
uint8_t
*
GetData
()
const
;
size_t
GetSize
()
const
;
size_t
GetSenderReportCount
()
const
;
size_t
GetReceiverReportCount
()
const
;
void
Dump
();
void
AddSenderReport
(
SenderReport
*
report
);
void
AddReceiverReport
(
ReceiverReport
*
report
);
...
...
@@ -33,25 +33,25 @@ namespace RTC { namespace RTCP
/* Inline methods. */
inline
const
uint8_t
*
CompoundPacket
::
GetData
()
const
uint8_t
*
CompoundPacket
::
GetData
()
const
{
return
this
->
header
;
}
inline
size_t
CompoundPacket
::
GetSize
()
size_t
CompoundPacket
::
GetSize
()
const
{
return
this
->
size
;
}
inline
size_t
CompoundPacket
::
GetSenderReportCount
()
size_t
CompoundPacket
::
GetSenderReportCount
()
const
{
return
this
->
senderReportPacket
.
GetCount
();
}
inline
size_t
CompoundPacket
::
GetReceiverReportCount
()
size_t
CompoundPacket
::
GetReceiverReportCount
()
const
{
return
this
->
receiverReportPacket
.
GetCount
();
}
...
...
worker/include/RTC/RTCP/Feedback.hpp
浏览文件 @
6d75382a
...
...
@@ -27,18 +27,18 @@ namespace RTC { namespace RTCP
static
std
::
map
<
typename
T
::
MessageType
,
std
::
string
>
type2String
;
public
:
typename
T
::
MessageType
GetMessageType
();
uint32_t
GetSenderSsrc
();
typename
T
::
MessageType
GetMessageType
()
const
;
uint32_t
GetSenderSsrc
()
const
;
void
SetSenderSsrc
(
uint32_t
ssrc
);
uint32_t
GetMediaSsrc
();
uint32_t
GetMediaSsrc
()
const
;
void
SetMediaSsrc
(
uint32_t
ssrc
);
/* Pure virtual methods inherited from Packet. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetCount
()
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetCount
()
const
override
;
virtual
size_t
GetSize
()
const
override
;
protected
:
explicit
FeedbackPacket
(
CommonHeader
*
commonHeader
);
...
...
@@ -93,25 +93,25 @@ namespace RTC { namespace RTCP
/* Inline instance methods. */
template
<
typename
T
>
typename
T
::
MessageType
FeedbackPacket
<
T
>::
GetMessageType
()
typename
T
::
MessageType
FeedbackPacket
<
T
>::
GetMessageType
()
const
{
return
this
->
messageType
;
}
template
<
typename
T
>
size_t
FeedbackPacket
<
T
>::
GetCount
()
size_t
FeedbackPacket
<
T
>::
GetCount
()
const
{
return
(
size_t
)
this
->
GetMessageType
();
}
template
<
typename
T
>
size_t
FeedbackPacket
<
T
>::
GetSize
()
size_t
FeedbackPacket
<
T
>::
GetSize
()
const
{
return
sizeof
(
CommonHeader
)
+
sizeof
(
Header
);
}
template
<
typename
T
>
uint32_t
FeedbackPacket
<
T
>::
GetSenderSsrc
()
uint32_t
FeedbackPacket
<
T
>::
GetSenderSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
s_ssrc
);
}
...
...
@@ -123,7 +123,7 @@ namespace RTC { namespace RTCP
}
template
<
typename
T
>
uint32_t
FeedbackPacket
<
T
>::
GetMediaSsrc
()
uint32_t
FeedbackPacket
<
T
>::
GetMediaSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
m_ssrc
);
}
...
...
worker/include/RTC/RTCP/FeedbackItem.hpp
浏览文件 @
6d75382a
...
...
@@ -8,7 +8,7 @@ namespace RTC { namespace RTCP
class
FeedbackItem
{
public
:
bool
IsCorrect
();
bool
IsCorrect
()
const
;
protected
:
virtual
~
FeedbackItem
();
...
...
@@ -17,7 +17,7 @@ namespace RTC { namespace RTCP
virtual
void
Dump
()
=
0
;
virtual
void
Serialize
();
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
=
0
;
virtual
size_t
GetSize
()
=
0
;
virtual
size_t
GetSize
()
const
=
0
;
protected
:
uint8_t
*
raw
=
nullptr
;
...
...
@@ -44,7 +44,7 @@ namespace RTC { namespace RTCP
}
inline
bool
FeedbackItem
::
IsCorrect
()
bool
FeedbackItem
::
IsCorrect
()
const
{
return
this
->
isCorrect
;
}
...
...
worker/include/RTC/RTCP/FeedbackPs.hpp
浏览文件 @
6d75382a
...
...
@@ -30,7 +30,7 @@ namespace RTC { namespace RTCP
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
std
::
vector
<
Item
*>
items
;
...
...
@@ -49,7 +49,7 @@ namespace RTC { namespace RTCP
{}
template
<
typename
Item
>
size_t
FeedbackPsItemPacket
<
Item
>::
GetSize
()
size_t
FeedbackPsItemPacket
<
Item
>::
GetSize
()
const
{
size_t
size
=
FeedbackPsPacket
::
GetSize
();
...
...
worker/include/RTC/RTCP/FeedbackPsAfb.hpp
浏览文件 @
6d75382a
...
...
@@ -18,13 +18,13 @@ namespace RTC { namespace RTCP
FeedbackPsAfbPacket
(
uint32_t
sender_ssrc
,
uint32_t
media_ssrc
);
virtual
~
FeedbackPsAfbPacket
()
{};
uint8_t
*
GetData
();
uint8_t
*
GetData
()
const
;
/* Pure virtual methods inherited from Packet. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
uint8_t
*
data
=
nullptr
;
...
...
@@ -47,13 +47,13 @@ namespace RTC { namespace RTCP
{}
inline
uint8_t
*
FeedbackPsAfbPacket
::
GetData
()
uint8_t
*
FeedbackPsAfbPacket
::
GetData
()
const
{
return
this
->
data
;
}
inline
size_t
FeedbackPsAfbPacket
::
GetSize
()
size_t
FeedbackPsAfbPacket
::
GetSize
()
const
{
return
FeedbackPsPacket
::
GetSize
()
+
this
->
size
;
}
...
...
worker/include/RTC/RTCP/FeedbackPsFir.hpp
浏览文件 @
6d75382a
...
...
@@ -41,14 +41,14 @@ namespace RTC { namespace RTCP
FirItem
(
uint32_t
ssrc
,
uint8_t
sequence_number
);
virtual
~
FirItem
()
{};
uint32_t
GetSsrc
();
uint8_t
GetSequenceNumber
();
uint32_t
GetSsrc
()
const
;
uint8_t
GetSequenceNumber
()
const
;
/* Virtual methods inherited from FeedbackItem. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
Header
*
header
=
nullptr
;
...
...
@@ -70,19 +70,19 @@ namespace RTC { namespace RTCP
{}
inline
size_t
FirItem
::
GetSize
()
size_t
FirItem
::
GetSize
()
const
{
return
sizeof
(
Header
);
}
inline
uint32_t
FirItem
::
GetSsrc
()
uint32_t
FirItem
::
GetSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
ssrc
);
}
inline
uint8_t
FirItem
::
GetSequenceNumber
()
uint8_t
FirItem
::
GetSequenceNumber
()
const
{
return
(
uint8_t
)
this
->
header
->
sequence_number
;
}
...
...
worker/include/RTC/RTCP/FeedbackPsLei.hpp
浏览文件 @
6d75382a
...
...
@@ -36,13 +36,13 @@ namespace RTC { namespace RTCP
explicit
PsLeiItem
(
uint32_t
ssrc
);
virtual
~
PsLeiItem
()
{};
uint32_t
GetSsrc
();
uint32_t
GetSsrc
()
const
;
/* Virtual methods inherited from FeedbackItem. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
Header
*
header
=
nullptr
;
...
...
@@ -64,13 +64,13 @@ namespace RTC { namespace RTCP
{}
inline
size_t
PsLeiItem
::
GetSize
()
size_t
PsLeiItem
::
GetSize
()
const
{
return
sizeof
(
Header
);
}
inline
uint32_t
PsLeiItem
::
GetSsrc
()
uint32_t
PsLeiItem
::
GetSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
ssrc
);
}
...
...
worker/include/RTC/RTCP/FeedbackPsRpsi.hpp
浏览文件 @
6d75382a
...
...
@@ -46,16 +46,16 @@ namespace RTC { namespace RTCP
RpsiItem
(
uint8_t
payload_type
,
uint8_t
*
bit_string
,
size_t
length
);
virtual
~
RpsiItem
()
{};
bool
IsCorrect
();
uint8_t
GetPayloadType
();
uint8_t
*
GetBitString
();
size_t
GetLength
();
bool
IsCorrect
()
const
;
uint8_t
GetPayloadType
()
const
;
uint8_t
*
GetBitString
()
const
;
size_t
GetLength
()
const
;
/* Virtual methods inherited from FeedbackItem. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
Header
*
header
=
nullptr
;
...
...
@@ -73,31 +73,31 @@ namespace RTC { namespace RTCP
{}
inline
size_t
RpsiItem
::
GetSize
()
size_t
RpsiItem
::
GetSize
()
const
{
return
sizeof
(
Header
);
}
inline
uint8_t
RpsiItem
::
GetPayloadType
()
uint8_t
RpsiItem
::
GetPayloadType
()
const
{
return
this
->
header
->
payload_type
;
}
inline
uint8_t
*
RpsiItem
::
GetBitString
()
uint8_t
*
RpsiItem
::
GetBitString
()
const
{
return
this
->
header
->
bit_string
;
}
inline
size_t
RpsiItem
::
GetLength
()
size_t
RpsiItem
::
GetLength
()
const
{
return
this
->
length
;
}
inline
bool
RpsiItem
::
IsCorrect
()
bool
RpsiItem
::
IsCorrect
()
const
{
return
this
->
isCorrect
;
}
...
...
worker/include/RTC/RTCP/FeedbackPsSli.hpp
浏览文件 @
6d75382a
...
...
@@ -36,18 +36,18 @@ namespace RTC { namespace RTCP
SliItem
(
uint16_t
first
,
uint16_t
number
,
uint8_t
pictureId
);
virtual
~
SliItem
()
{};
uint16_t
GetFirst
();
uint16_t
GetFirst
()
const
;
void
SetFirst
(
uint16_t
first
);
uint16_t
GetNumber
();
uint16_t
GetNumber
()
const
;
void
SetNumber
(
uint16_t
number
);
uint8_t
GetPictureId
();
uint8_t
GetPictureId
()
const
;
void
SetPictureId
(
uint8_t
pictureId
);
/* Virtual methods inherited from FeedbackItem. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
Header
*
header
=
nullptr
;
...
...
@@ -62,13 +62,13 @@ namespace RTC { namespace RTCP
/* Inline instance methods. */
inline
size_t
SliItem
::
GetSize
()
size_t
SliItem
::
GetSize
()
const
{
return
sizeof
(
Header
);
}
inline
uint16_t
SliItem
::
GetFirst
()
uint16_t
SliItem
::
GetFirst
()
const
{
return
this
->
first
;
}
...
...
@@ -80,7 +80,7 @@ namespace RTC { namespace RTCP
}
inline
uint16_t
SliItem
::
GetNumber
()
uint16_t
SliItem
::
GetNumber
()
const
{
return
this
->
number
;
}
...
...
@@ -92,7 +92,7 @@ namespace RTC { namespace RTCP
}
inline
uint8_t
SliItem
::
GetPictureId
()
uint8_t
SliItem
::
GetPictureId
()
const
{
return
this
->
pictureId
;
}
...
...
worker/include/RTC/RTCP/FeedbackPsTst.hpp
浏览文件 @
6d75382a
...
...
@@ -43,15 +43,15 @@ namespace RTC { namespace RTCP
TstItem
(
uint32_t
ssrc
,
uint8_t
sequenceNumber
,
uint8_t
index
);
virtual
~
TstItem
()
{};
uint32_t
GetSsrc
();
uint8_t
GetSequenceNumber
();
uint8_t
GetIndex
();
uint32_t
GetSsrc
()
const
;
uint8_t
GetSequenceNumber
()
const
;
uint8_t
GetIndex
()
const
;
/* Virtual methods inherited from FeedbackItem. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
Header
*
header
=
nullptr
;
...
...
@@ -81,25 +81,25 @@ namespace RTC { namespace RTCP
{}
template
<
typename
T
>
size_t
TstItem
<
T
>::
GetSize
()
size_t
TstItem
<
T
>::
GetSize
()
const
{
return
sizeof
(
Header
);
}
template
<
typename
T
>
uint32_t
TstItem
<
T
>::
GetSsrc
()
uint32_t
TstItem
<
T
>::
GetSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
ssrc
);
}
template
<
typename
T
>
uint8_t
TstItem
<
T
>::
GetSequenceNumber
()
uint8_t
TstItem
<
T
>::
GetSequenceNumber
()
const
{
return
(
uint8_t
)
this
->
header
->
sequence_number
;
}
template
<
typename
T
>
uint8_t
TstItem
<
T
>::
GetIndex
()
uint8_t
TstItem
<
T
>::
GetIndex
()
const
{
return
(
uint8_t
)
this
->
header
->
index
;
}
...
...
worker/include/RTC/RTCP/FeedbackPsVbcm.hpp
浏览文件 @
6d75382a
...
...
@@ -47,17 +47,17 @@ namespace RTC { namespace RTCP
VbcmItem
(
uint32_t
ssrc
,
uint8_t
sequence_number
,
uint8_t
payload_type
,
uint16_t
length
,
uint8_t
*
value
);
virtual
~
VbcmItem
()
{};
uint32_t
GetSsrc
();
uint8_t
GetSequenceNumber
();
uint8_t
GetPayloadType
();
uint16_t
GetLength
();
uint8_t
*
GetValue
();
uint32_t
GetSsrc
()
const
;
uint8_t
GetSequenceNumber
()
const
;
uint8_t
GetPayloadType
()
const
;
uint16_t
GetLength
()
const
;
uint8_t
*
GetValue
()
const
;
/* Virtual methods inherited from FeedbackItem. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
Header
*
header
=
nullptr
;
...
...
@@ -79,7 +79,7 @@ namespace RTC { namespace RTCP
{}
inline
size_t
VbcmItem
::
GetSize
()
size_t
VbcmItem
::
GetSize
()
const
{
size_t
size
=
8
+
size_t
(
this
->
header
->
length
);
...
...
@@ -88,31 +88,31 @@ namespace RTC { namespace RTCP
}
inline
uint32_t
VbcmItem
::
GetSsrc
()
uint32_t
VbcmItem
::
GetSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
ssrc
);
}
inline
uint8_t
VbcmItem
::
GetSequenceNumber
()
uint8_t
VbcmItem
::
GetSequenceNumber
()
const
{
return
(
uint8_t
)
this
->
header
->
sequence_number
;
}
inline
uint8_t
VbcmItem
::
GetPayloadType
()
uint8_t
VbcmItem
::
GetPayloadType
()
const
{
return
(
uint8_t
)
this
->
header
->
payload_type
;
}
inline
uint16_t
VbcmItem
::
GetLength
()
uint16_t
VbcmItem
::
GetLength
()
const
{
return
(
uint16_t
)
ntohs
(
this
->
header
->
length
);
}
inline
uint8_t
*
VbcmItem
::
GetValue
()
uint8_t
*
VbcmItem
::
GetValue
()
const
{
return
this
->
header
->
value
;
}
...
...
worker/include/RTC/RTCP/FeedbackRtp.hpp
浏览文件 @
6d75382a
...
...
@@ -30,7 +30,7 @@ namespace RTC { namespace RTCP
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
std
::
vector
<
Item
*>
items
;
...
...
@@ -49,7 +49,7 @@ namespace RTC { namespace RTCP
{}
template
<
typename
Item
>
size_t
FeedbackRtpItemPacket
<
Item
>::
GetSize
()
size_t
FeedbackRtpItemPacket
<
Item
>::
GetSize
()
const
{
size_t
size
=
FeedbackRtpPacket
::
GetSize
();
...
...
worker/include/RTC/RTCP/FeedbackRtpEcn.hpp
浏览文件 @
6d75382a
...
...
@@ -52,19 +52,19 @@ namespace RTC { namespace RTCP
explicit
EcnItem
(
EcnItem
*
item
);
virtual
~
EcnItem
()
{};
uint32_t
GetSequenceNumber
();
uint32_t
GetEct0Counter
();
uint32_t
GetEct1Counter
();
uint16_t
GetEcnCeCounter
();
uint16_t
GetNotEctCounter
();
uint16_t
GetLostPackets
();
uint16_t
GetDuplicatedPackets
();
uint32_t
GetSequenceNumber
()
const
;
uint32_t
GetEct0Counter
()
const
;
uint32_t
GetEct1Counter
()
const
;
uint16_t
GetEcnCeCounter
()
const
;
uint16_t
GetNotEctCounter
()
const
;
uint16_t
GetLostPackets
()
const
;
uint16_t
GetDuplicatedPackets
()
const
;
/* Virtual methods inherited from FeedbackItem. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
Header
*
header
=
nullptr
;
...
...
@@ -86,49 +86,49 @@ namespace RTC { namespace RTCP
{}
inline
size_t
EcnItem
::
GetSize
()
size_t
EcnItem
::
GetSize
()
const
{
return
sizeof
(
Header
);
}
inline
uint32_t
EcnItem
::
GetSequenceNumber
()
uint32_t
EcnItem
::
GetSequenceNumber
()
const
{
return
ntohl
(
this
->
header
->
sequence_number
);
}
inline
uint32_t
EcnItem
::
GetEct0Counter
()
uint32_t
EcnItem
::
GetEct0Counter
()
const
{
return
ntohl
(
this
->
header
->
ect0_counter
);
}
inline
uint32_t
EcnItem
::
GetEct1Counter
()
uint32_t
EcnItem
::
GetEct1Counter
()
const
{
return
ntohl
(
this
->
header
->
ect1_counter
);
}
inline
uint16_t
EcnItem
::
GetEcnCeCounter
()
uint16_t
EcnItem
::
GetEcnCeCounter
()
const
{
return
ntohs
(
this
->
header
->
ecn_ce_counter
);
}
inline
uint16_t
EcnItem
::
GetNotEctCounter
()
uint16_t
EcnItem
::
GetNotEctCounter
()
const
{
return
ntohs
(
this
->
header
->
not_ect_counter
);
}
inline
uint16_t
EcnItem
::
GetLostPackets
()
uint16_t
EcnItem
::
GetLostPackets
()
const
{
return
ntohs
(
this
->
header
->
lost_packets
);
}
inline
uint16_t
EcnItem
::
GetDuplicatedPackets
()
uint16_t
EcnItem
::
GetDuplicatedPackets
()
const
{
return
ntohs
(
this
->
header
->
duplicated_packets
);
}
...
...
worker/include/RTC/RTCP/FeedbackRtpNack.hpp
浏览文件 @
6d75382a
...
...
@@ -37,14 +37,14 @@ namespace RTC { namespace RTCP
NackItem
(
uint16_t
packetId
,
uint16_t
lostPacketBitmask
);
virtual
~
NackItem
()
{};
uint16_t
GetPacketId
();
uint16_t
GetLostPacketBitmask
();
uint16_t
GetPacketId
()
const
;
uint16_t
GetLostPacketBitmask
()
const
;
/* Virtual methods inherited from FeedbackItem. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
Header
*
header
=
nullptr
;
...
...
@@ -66,19 +66,19 @@ namespace RTC { namespace RTCP
{}
inline
size_t
NackItem
::
GetSize
()
size_t
NackItem
::
GetSize
()
const
{
return
sizeof
(
Header
);
}
inline
uint16_t
NackItem
::
GetPacketId
()
uint16_t
NackItem
::
GetPacketId
()
const
{
return
(
uint16_t
)
ntohs
(
this
->
header
->
packet_id
);
}
inline
uint16_t
NackItem
::
GetLostPacketBitmask
()
uint16_t
NackItem
::
GetLostPacketBitmask
()
const
{
return
(
uint16_t
)
ntohs
(
this
->
header
->
lost_packet_bitmask
);
}
...
...
worker/include/RTC/RTCP/FeedbackRtpTllei.hpp
浏览文件 @
6d75382a
...
...
@@ -37,14 +37,14 @@ namespace RTC { namespace RTCP
TlleiItem
(
uint16_t
packetId
,
uint16_t
lostPacketBitmask
);
virtual
~
TlleiItem
()
{};
uint16_t
GetPacketId
();
uint16_t
GetLostPacketBitmask
();
uint16_t
GetPacketId
()
const
;
uint16_t
GetLostPacketBitmask
()
const
;
/* Virtual methods inherited from FeedbackItem. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
Header
*
header
=
nullptr
;
...
...
@@ -66,19 +66,19 @@ namespace RTC { namespace RTCP
{}
inline
size_t
TlleiItem
::
GetSize
()
size_t
TlleiItem
::
GetSize
()
const
{
return
sizeof
(
Header
);
}
inline
uint16_t
TlleiItem
::
GetPacketId
()
uint16_t
TlleiItem
::
GetPacketId
()
const
{
return
(
uint16_t
)
ntohs
(
this
->
header
->
packet_id
);
}
inline
uint16_t
TlleiItem
::
GetLostPacketBitmask
()
uint16_t
TlleiItem
::
GetLostPacketBitmask
()
const
{
return
(
uint16_t
)
ntohs
(
this
->
header
->
lost_packet_bitmask
);
}
...
...
worker/include/RTC/RTCP/FeedbackRtpTmmb.hpp
浏览文件 @
6d75382a
...
...
@@ -40,18 +40,18 @@ namespace RTC { namespace RTCP
TmmbItem
(
uint32_t
ssrc
,
uint64_t
bitrate
,
uint32_t
overhead
);
virtual
~
TmmbItem
()
{};
uint32_t
GetSsrc
();
uint32_t
GetSsrc
()
const
;
void
SetSsrc
(
uint32_t
ssrc
);
uint64_t
GetBitrate
();
uint64_t
GetBitrate
()
const
;
void
SetBitrate
(
uint64_t
bitrate
);
uint16_t
GetOverhead
();
uint16_t
GetOverhead
()
const
;
void
SetOverhead
(
uint16_t
overhead
);
/* Virtual methods inherited from FeedbackItem. */
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
Header
*
header
=
nullptr
;
...
...
@@ -74,13 +74,13 @@ namespace RTC { namespace RTCP
/* Inline instance methods. */
template
<
typename
T
>
size_t
TmmbItem
<
T
>::
GetSize
()
size_t
TmmbItem
<
T
>::
GetSize
()
const
{
return
sizeof
(
Header
);
}
template
<
typename
T
>
uint32_t
TmmbItem
<
T
>::
GetSsrc
()
uint32_t
TmmbItem
<
T
>::
GetSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
ssrc
);
}
...
...
@@ -92,7 +92,7 @@ namespace RTC { namespace RTCP
}
template
<
typename
T
>
uint64_t
TmmbItem
<
T
>::
GetBitrate
()
uint64_t
TmmbItem
<
T
>::
GetBitrate
()
const
{
return
this
->
bitrate
;
}
...
...
@@ -104,7 +104,7 @@ namespace RTC { namespace RTCP
}
template
<
typename
T
>
uint16_t
TmmbItem
<
T
>::
GetOverhead
()
uint16_t
TmmbItem
<
T
>::
GetOverhead
()
const
{
return
this
->
overhead
;
}
...
...
worker/include/RTC/RTCP/Packet.hpp
浏览文件 @
6d75382a
...
...
@@ -60,15 +60,15 @@ namespace RTC { namespace RTCP
virtual
~
Packet
();
void
SetNext
(
Packet
*
packet
);
Packet
*
GetNext
();
Type
GetType
();
const
uint8_t
*
GetData
();
Packet
*
GetNext
()
const
;
Type
GetType
()
const
;
const
uint8_t
*
GetData
()
const
;
public
:
virtual
void
Dump
()
=
0
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
=
0
;
virtual
size_t
GetCount
()
=
0
;
virtual
size_t
GetSize
()
=
0
;
virtual
size_t
GetCount
()
const
=
0
;
virtual
size_t
GetSize
()
const
=
0
;
private
:
Type
type
;
...
...
@@ -108,7 +108,7 @@ namespace RTC { namespace RTCP
{}
inline
Packet
*
Packet
::
GetNext
()
Packet
*
Packet
::
GetNext
()
const
{
return
this
->
next
;
}
...
...
@@ -120,19 +120,19 @@ namespace RTC { namespace RTCP
}
inline
Type
Packet
::
GetType
()
Type
Packet
::
GetType
()
const
{
return
this
->
type
;
}
inline
size_t
Packet
::
GetCount
()
size_t
Packet
::
GetCount
()
const
{
return
0
;
}
inline
const
uint8_t
*
Packet
::
GetData
()
const
uint8_t
*
Packet
::
GetData
()
const
{
return
(
uint8_t
*
)
this
->
header
;
}
...
...
worker/include/RTC/RTCP/ReceiverReport.hpp
浏览文件 @
6d75382a
...
...
@@ -36,20 +36,20 @@ namespace RTC { namespace RTCP
void
Dump
();
size_t
Serialize
(
uint8_t
*
buffer
);
size_t
GetSize
();
uint32_t
GetSsrc
();
size_t
GetSize
()
const
;
uint32_t
GetSsrc
()
const
;
void
SetSsrc
(
uint32_t
ssrc
);
uint8_t
GetFractionLost
();
uint8_t
GetFractionLost
()
const
;
void
SetFractionLost
(
uint8_t
fraction_lost
);
int32_t
GetTotalLost
();
int32_t
GetTotalLost
()
const
;
void
SetTotalLost
(
int32_t
total_lost
);
uint32_t
GetLastSeq
();
uint32_t
GetLastSeq
()
const
;
void
SetLastSeq
(
uint32_t
last_seq
);
uint32_t
GetJitter
();
uint32_t
GetJitter
()
const
;
void
SetJitter
(
uint32_t
jitter
);
uint32_t
GetLastSenderReport
();
uint32_t
GetLastSenderReport
()
const
;
void
SetLastSenderReport
(
uint32_t
lsr
);
uint32_t
GetDelaySinceLastSenderReport
();
uint32_t
GetDelaySinceLastSenderReport
()
const
;
void
SetDelaySinceLastSenderReport
(
uint32_t
dlsr
);
private
:
...
...
@@ -70,7 +70,7 @@ namespace RTC { namespace RTCP
ReceiverReportPacket
();
virtual
~
ReceiverReportPacket
();
uint32_t
GetSsrc
();
uint32_t
GetSsrc
()
const
;
void
SetSsrc
(
uint32_t
ssrc
);
void
AddReport
(
ReceiverReport
*
report
);
Iterator
Begin
();
...
...
@@ -80,8 +80,8 @@ namespace RTC { namespace RTCP
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetCount
()
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetCount
()
const
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
// SSRC of packet sender.
...
...
@@ -108,13 +108,13 @@ namespace RTC { namespace RTCP
{}
inline
size_t
ReceiverReport
::
GetSize
()
size_t
ReceiverReport
::
GetSize
()
const
{
return
sizeof
(
Header
);
}
inline
uint32_t
ReceiverReport
::
GetSsrc
()
uint32_t
ReceiverReport
::
GetSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
ssrc
);
}
...
...
@@ -126,7 +126,7 @@ namespace RTC { namespace RTCP
}
inline
uint8_t
ReceiverReport
::
GetFractionLost
()
uint8_t
ReceiverReport
::
GetFractionLost
()
const
{
return
(
uint8_t
)
Utils
::
Byte
::
Get1Byte
((
uint8_t
*
)
this
->
header
,
4
);
}
...
...
@@ -138,7 +138,7 @@ namespace RTC { namespace RTCP
}
inline
int32_t
ReceiverReport
::
GetTotalLost
()
int32_t
ReceiverReport
::
GetTotalLost
()
const
{
uint32_t
value
=
(
uint32_t
)
Utils
::
Byte
::
Get3Bytes
((
uint8_t
*
)
this
->
header
,
5
);
...
...
@@ -168,7 +168,7 @@ namespace RTC { namespace RTCP
}
inline
uint32_t
ReceiverReport
::
GetLastSeq
()
uint32_t
ReceiverReport
::
GetLastSeq
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
last_seq
);
}
...
...
@@ -180,7 +180,7 @@ namespace RTC { namespace RTCP
}
inline
uint32_t
ReceiverReport
::
GetJitter
()
uint32_t
ReceiverReport
::
GetJitter
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
jitter
);
}
...
...
@@ -192,7 +192,7 @@ namespace RTC { namespace RTCP
}
inline
uint32_t
ReceiverReport
::
GetLastSenderReport
()
uint32_t
ReceiverReport
::
GetLastSenderReport
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
lsr
);
}
...
...
@@ -204,7 +204,7 @@ namespace RTC { namespace RTCP
}
inline
uint32_t
ReceiverReport
::
GetDelaySinceLastSenderReport
()
uint32_t
ReceiverReport
::
GetDelaySinceLastSenderReport
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
dlsr
);
}
...
...
@@ -230,13 +230,13 @@ namespace RTC { namespace RTCP
}
inline
size_t
ReceiverReportPacket
::
GetCount
()
size_t
ReceiverReportPacket
::
GetCount
()
const
{
return
this
->
reports
.
size
();
}
inline
size_t
ReceiverReportPacket
::
GetSize
()
size_t
ReceiverReportPacket
::
GetSize
()
const
{
size_t
size
=
sizeof
(
Packet
::
CommonHeader
)
+
sizeof
(
this
->
ssrc
);
...
...
@@ -249,7 +249,7 @@ namespace RTC { namespace RTCP
}
inline
uint32_t
ReceiverReportPacket
::
GetSsrc
()
uint32_t
ReceiverReportPacket
::
GetSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
ssrc
);
}
...
...
worker/include/RTC/RTCP/Sdes.hpp
浏览文件 @
6d75382a
...
...
@@ -46,11 +46,11 @@ namespace RTC { namespace RTCP
void
Dump
();
size_t
Serialize
(
uint8_t
*
buffer
);
size_t
GetSize
();
size_t
GetSize
()
const
;
SdesItem
::
Type
GetType
();
uint8_t
GetLength
();
char
*
GetValue
();
SdesItem
::
Type
GetType
()
const
;
uint8_t
GetLength
()
const
;
char
*
GetValue
()
const
;
private
:
// Passed by argument.
...
...
@@ -77,8 +77,8 @@ namespace RTC { namespace RTCP
void
Dump
();
void
Serialize
();
size_t
Serialize
(
uint8_t
*
buffer
);
size_t
GetSize
();
uint32_t
GetSsrc
();
size_t
GetSize
()
const
;
uint32_t
GetSsrc
()
const
;
void
SetSsrc
(
uint32_t
ssrc
);
void
AddItem
(
SdesItem
*
item
);
Iterator
Begin
();
...
...
@@ -110,8 +110,8 @@ namespace RTC { namespace RTCP
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetCount
()
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetCount
()
const
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
std
::
vector
<
SdesChunk
*>
chunks
;
...
...
@@ -135,25 +135,25 @@ namespace RTC { namespace RTCP
}
inline
size_t
SdesItem
::
GetSize
()
size_t
SdesItem
::
GetSize
()
const
{
return
2
+
size_t
(
this
->
header
->
length
);
}
inline
SdesItem
::
Type
SdesItem
::
GetType
()
SdesItem
::
Type
SdesItem
::
GetType
()
const
{
return
(
SdesItem
::
Type
)
this
->
header
->
type
;
}
inline
uint8_t
SdesItem
::
GetLength
()
uint8_t
SdesItem
::
GetLength
()
const
{
return
this
->
header
->
length
;
}
inline
char
*
SdesItem
::
GetValue
()
char
*
SdesItem
::
GetValue
()
const
{
return
this
->
header
->
value
;
}
...
...
@@ -187,7 +187,7 @@ namespace RTC { namespace RTCP
}
inline
size_t
SdesChunk
::
GetSize
()
size_t
SdesChunk
::
GetSize
()
const
{
size_t
size
=
sizeof
(
this
->
ssrc
);
...
...
@@ -202,7 +202,7 @@ namespace RTC { namespace RTCP
}
inline
uint32_t
SdesChunk
::
GetSsrc
()
uint32_t
SdesChunk
::
GetSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
ssrc
);
}
...
...
@@ -248,13 +248,13 @@ namespace RTC { namespace RTCP
}
inline
size_t
SdesPacket
::
GetCount
()
size_t
SdesPacket
::
GetCount
()
const
{
return
this
->
chunks
.
size
();
}
inline
size_t
SdesPacket
::
GetSize
()
size_t
SdesPacket
::
GetSize
()
const
{
size_t
size
=
sizeof
(
Packet
::
CommonHeader
);
...
...
worker/include/RTC/RTCP/SenderReport.hpp
浏览文件 @
6d75382a
...
...
@@ -34,18 +34,18 @@ namespace RTC { namespace RTCP
void
Dump
();
size_t
Serialize
(
uint8_t
*
buffer
);
size_t
GetSize
();
uint32_t
GetSsrc
();
size_t
GetSize
()
const
;
uint32_t
GetSsrc
()
const
;
void
SetSsrc
(
uint32_t
ssrc
);
uint32_t
GetNtpSec
();
uint32_t
GetNtpSec
()
const
;
void
SetNtpSec
(
uint32_t
ntp_sec
);
uint32_t
GetNtpFrac
();
uint32_t
GetNtpFrac
()
const
;
void
SetNtpFrac
(
uint32_t
ntp_frac
);
uint32_t
GetRtpTs
();
uint32_t
GetRtpTs
()
const
;
void
SetRtpTs
(
uint32_t
rtp_ts
);
uint32_t
GetPacketCount
();
uint32_t
GetPacketCount
()
const
;
void
SetPacketCount
(
uint32_t
packet_count
);
uint32_t
GetOctetCount
();
uint32_t
GetOctetCount
()
const
;
void
SetOctetCount
(
uint32_t
octet_count
);
private
:
...
...
@@ -74,8 +74,8 @@ namespace RTC { namespace RTCP
public
:
virtual
void
Dump
()
override
;
virtual
size_t
Serialize
(
uint8_t
*
buffer
)
override
;
virtual
size_t
GetCount
()
override
;
virtual
size_t
GetSize
()
override
;
virtual
size_t
GetCount
()
const
override
;
virtual
size_t
GetSize
()
const
override
;
private
:
std
::
vector
<
SenderReport
*>
reports
;
...
...
@@ -100,13 +100,13 @@ namespace RTC { namespace RTCP
{}
inline
size_t
SenderReport
::
GetSize
()
size_t
SenderReport
::
GetSize
()
const
{
return
sizeof
(
Header
);
}
inline
uint32_t
SenderReport
::
GetSsrc
()
uint32_t
SenderReport
::
GetSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
ssrc
);
}
...
...
@@ -118,7 +118,7 @@ namespace RTC { namespace RTCP
}
inline
uint32_t
SenderReport
::
GetNtpSec
()
uint32_t
SenderReport
::
GetNtpSec
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
ntp_sec
);
}
...
...
@@ -130,7 +130,7 @@ namespace RTC { namespace RTCP
}
inline
uint32_t
SenderReport
::
GetNtpFrac
()
uint32_t
SenderReport
::
GetNtpFrac
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
ntp_frac
);
}
...
...
@@ -142,7 +142,7 @@ namespace RTC { namespace RTCP
}
inline
uint32_t
SenderReport
::
GetRtpTs
()
uint32_t
SenderReport
::
GetRtpTs
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
rtp_ts
);
}
...
...
@@ -155,7 +155,7 @@ namespace RTC { namespace RTCP
inline
uint32_t
SenderReport
::
GetPacketCount
()
uint32_t
SenderReport
::
GetPacketCount
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
packet_count
);
}
...
...
@@ -167,7 +167,7 @@ namespace RTC { namespace RTCP
}
inline
uint32_t
SenderReport
::
GetOctetCount
()
uint32_t
SenderReport
::
GetOctetCount
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
octet_count
);
}
...
...
@@ -195,13 +195,13 @@ namespace RTC { namespace RTCP
}
inline
size_t
SenderReportPacket
::
GetCount
()
size_t
SenderReportPacket
::
GetCount
()
const
{
return
this
->
reports
.
size
();
}
inline
size_t
SenderReportPacket
::
GetSize
()
size_t
SenderReportPacket
::
GetSize
()
const
{
size_t
size
=
sizeof
(
Packet
::
CommonHeader
);
...
...
worker/include/RTC/Room.hpp
浏览文件 @
6d75382a
...
...
@@ -42,12 +42,12 @@ namespace RTC
virtual
~
Room
();
void
Close
();
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
void
HandleRequest
(
Channel
::
Request
*
request
);
RTC
::
RtpCapabilities
&
GetCapabilities
()
;
const
RTC
::
RtpCapabilities
&
GetCapabilities
()
const
;
private
:
RTC
::
Peer
*
GetPeerFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
peerId
=
nullptr
);
RTC
::
Peer
*
GetPeerFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
peerId
=
nullptr
)
const
;
void
SetCapabilities
(
std
::
vector
<
RTC
::
RtpCodecParameters
>&
mediaCodecs
);
/* Pure virtual methods inherited from RTC::Peer::Listener. */
...
...
@@ -81,7 +81,7 @@ namespace RTC
/* Inline static methods. */
inline
RTC
::
RtpCapabilities
&
Room
::
GetCapabilities
()
const
RTC
::
RtpCapabilities
&
Room
::
GetCapabilities
()
const
{
return
this
->
capabilities
;
}
...
...
worker/include/RTC/RtpDataCounter.hpp
浏览文件 @
6d75382a
...
...
@@ -51,8 +51,8 @@ namespace RTC
public
:
void
Update
(
RTC
::
RtpPacket
*
packet
);
uint32_t
GetRate
(
uint64_t
now
);
size_t
GetPacketCount
();
size_t
GetBytes
();
size_t
GetPacketCount
()
const
;
size_t
GetBytes
()
const
;
private
:
RateCalculator
rate
;
...
...
@@ -82,19 +82,19 @@ namespace RTC
}
inline
size_t
RtpDataCounter
::
GetPacketCount
(
)
uint32_t
RtpDataCounter
::
GetRate
(
uint64_t
now
)
{
return
this
->
packets
;
return
this
->
rate
.
GetRate
(
now
)
;
}
inline
uint32_t
RtpDataCounter
::
GetRate
(
uint64_t
now
)
size_t
RtpDataCounter
::
GetPacketCount
()
const
{
return
this
->
rate
.
GetRate
(
now
)
;
return
this
->
packets
;
}
inline
size_t
RtpDataCounter
::
GetBytes
()
size_t
RtpDataCounter
::
GetBytes
()
const
{
return
this
->
bytes
;
}
...
...
worker/include/RTC/RtpDictionaries.hpp
浏览文件 @
6d75382a
...
...
@@ -84,34 +84,34 @@ namespace RTC
public
:
RtpCodecMime
()
{};
bool
operator
==
(
const
RtpCodecMime
&
other
)
bool
operator
==
(
const
RtpCodecMime
&
other
)
const
{
return
this
->
type
==
other
.
type
&&
this
->
subtype
==
other
.
subtype
;
}
bool
operator
!=
(
const
RtpCodecMime
&
other
)
bool
operator
!=
(
const
RtpCodecMime
&
other
)
const
{
return
!
(
*
this
==
other
);
}
void
SetName
(
std
::
string
&
name
);
std
::
string
&
GetName
()
const
std
::
string
&
GetName
()
const
{
return
this
->
name
;
}
bool
IsMediaCodec
()
bool
IsMediaCodec
()
const
{
return
this
->
subtype
>=
Subtype
(
100
)
&&
this
->
subtype
<
(
Subtype
)
300
;
}
bool
IsComplementaryCodec
()
bool
IsComplementaryCodec
()
const
{
return
this
->
subtype
>=
Subtype
(
300
)
&&
this
->
subtype
<
(
Subtype
)
400
;
}
bool
IsFeatureCodec
()
bool
IsFeatureCodec
()
const
{
return
this
->
subtype
>=
Subtype
(
400
);
}
...
...
@@ -147,7 +147,7 @@ namespace RTC
public
:
explicit
RtcpFeedback
(
Json
::
Value
&
data
);
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
public
:
std
::
string
type
;
...
...
@@ -160,7 +160,7 @@ namespace RTC
RtpCodecParameters
()
{};
RtpCodecParameters
(
Json
::
Value
&
data
,
RTC
::
Scope
scope
);
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
bool
Matches
(
RtpCodecParameters
&
codec
,
bool
checkPayloadType
=
false
);
void
ReduceRtcpFeedback
(
std
::
vector
<
RtcpFeedback
>&
supportedRtcpFeedback
);
...
...
@@ -188,7 +188,7 @@ namespace RTC
public
:
explicit
RtpHeaderExtension
(
Json
::
Value
&
data
);
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
public
:
Media
::
Kind
kind
=
Media
::
Kind
::
ALL
;
...
...
@@ -204,7 +204,7 @@ namespace RTC
RtpCapabilities
()
{};
RtpCapabilities
(
Json
::
Value
&
data
,
RTC
::
Scope
scope
);
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
void
ReduceHeaderExtensions
(
std
::
vector
<
RtpHeaderExtension
>&
supportedHeaderExtensions
);
void
ReduceFecMechanisms
(
std
::
vector
<
std
::
string
>&
supportedFecMechanisms
);
...
...
@@ -223,7 +223,7 @@ namespace RTC
RtpFecParameters
()
{};
explicit
RtpFecParameters
(
Json
::
Value
&
data
);
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
public
:
std
::
string
mechanism
;
...
...
@@ -236,7 +236,7 @@ namespace RTC
RtpRtxParameters
()
{};
explicit
RtpRtxParameters
(
Json
::
Value
&
data
);
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
public
:
uint32_t
ssrc
=
0
;
...
...
@@ -248,7 +248,7 @@ namespace RTC
RtpEncodingParameters
()
{};
explicit
RtpEncodingParameters
(
Json
::
Value
&
data
);
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
public
:
uint32_t
ssrc
=
0
;
...
...
@@ -271,7 +271,7 @@ namespace RTC
public
:
explicit
RtpHeaderExtensionParameters
(
Json
::
Value
&
data
);
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
public
:
std
::
string
uri
;
...
...
@@ -287,7 +287,7 @@ namespace RTC
RtcpParameters
()
{};
explicit
RtcpParameters
(
Json
::
Value
&
data
);
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
public
:
std
::
string
cname
;
...
...
@@ -301,10 +301,10 @@ namespace RTC
explicit
RtpParameters
(
Json
::
Value
&
data
);
explicit
RtpParameters
(
const
RtpParameters
*
RtpParameters
);
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
void
ReduceCodecsAndEncodings
(
RtpCapabilities
&
capabilities
);
void
ReduceHeaderExtensions
(
std
::
vector
<
RtpHeaderExtension
>&
supportedHeaderExtensions
);
uint32_t
GetClockRateForEncoding
(
RtpEncodingParameters
&
encoding
);
uint32_t
GetClockRateForEncoding
(
RtpEncodingParameters
&
encoding
)
const
;
private
:
void
ValidateCodecs
();
...
...
worker/include/RTC/RtpListener.hpp
浏览文件 @
6d75382a
...
...
@@ -13,10 +13,10 @@ namespace RTC
class
RtpListener
{
public
:
Json
::
Value
toJson
();
bool
HasSsrc
(
uint32_t
ssrc
,
RTC
::
RtpReceiver
*
rtpReceiver
);
bool
HasMuxId
(
std
::
string
&
muxId
,
RTC
::
RtpReceiver
*
rtpReceiver
);
bool
HasPayloadType
(
uint8_t
payloadType
,
RTC
::
RtpReceiver
*
rtpReceiver
);
Json
::
Value
toJson
()
const
;
bool
HasSsrc
(
uint32_t
ssrc
,
RTC
::
RtpReceiver
*
rtpReceiver
)
const
;
bool
HasMuxId
(
std
::
string
&
muxId
,
RTC
::
RtpReceiver
*
rtpReceiver
)
const
;
bool
HasPayloadType
(
uint8_t
payloadType
,
RTC
::
RtpReceiver
*
rtpReceiver
)
const
;
void
AddRtpReceiver
(
RTC
::
RtpReceiver
*
rtpReceiver
);
void
RemoveRtpReceiver
(
RTC
::
RtpReceiver
*
rtpReceiver
);
RTC
::
RtpReceiver
*
GetRtpReceiver
(
RTC
::
RtpPacket
*
packet
);
...
...
@@ -37,7 +37,7 @@ namespace RTC
/* Inline instance methods. */
inline
bool
RtpListener
::
HasSsrc
(
uint32_t
ssrc
,
RTC
::
RtpReceiver
*
rtpReceiver
)
bool
RtpListener
::
HasSsrc
(
uint32_t
ssrc
,
RTC
::
RtpReceiver
*
rtpReceiver
)
const
{
auto
it
=
this
->
ssrcTable
.
find
(
ssrc
);
...
...
@@ -52,7 +52,7 @@ namespace RTC
}
inline
bool
RtpListener
::
HasMuxId
(
std
::
string
&
muxId
,
RTC
::
RtpReceiver
*
rtpReceiver
)
bool
RtpListener
::
HasMuxId
(
std
::
string
&
muxId
,
RTC
::
RtpReceiver
*
rtpReceiver
)
const
{
auto
it
=
this
->
muxIdTable
.
find
(
muxId
);
...
...
@@ -67,7 +67,7 @@ namespace RTC
}
inline
bool
RtpListener
::
HasPayloadType
(
uint8_t
payloadType
,
RTC
::
RtpReceiver
*
rtpReceiver
)
bool
RtpListener
::
HasPayloadType
(
uint8_t
payloadType
,
RTC
::
RtpReceiver
*
rtpReceiver
)
const
{
auto
it
=
this
->
ptTable
.
find
(
payloadType
);
...
...
worker/include/RTC/RtpPacket.hpp
浏览文件 @
6d75382a
...
...
@@ -77,31 +77,31 @@ namespace RTC
RtpPacket
(
Header
*
header
,
ExtensionHeader
*
extensionHeader
,
const
uint8_t
*
payload
,
size_t
payloadLen
,
uint8_t
payloadPadding
,
size_t
size
);
~
RtpPacket
();
void
Dump
();
const
uint8_t
*
GetData
();
size_t
GetSize
();
uint8_t
GetPayloadType
();
void
Dump
()
const
;
const
uint8_t
*
GetData
()
const
;
size_t
GetSize
()
const
;
uint8_t
GetPayloadType
()
const
;
void
SetPayloadType
(
uint8_t
payload_type
);
bool
HasMarker
();
bool
HasMarker
()
const
;
void
SetMarker
(
bool
marker
);
uint16_t
GetSequenceNumber
();
uint16_t
GetSequenceNumber
()
const
;
void
SetSequenceNumber
(
uint16_t
seq
);
uint32_t
GetTimestamp
();
uint32_t
GetTimestamp
()
const
;
void
SetTimestamp
(
uint32_t
timestamp
);
uint32_t
GetSsrc
();
uint32_t
GetSsrc
()
const
;
void
SetSsrc
(
uint32_t
ssrc
);
bool
HasExtensionHeader
();
uint16_t
GetExtensionHeaderId
();
size_t
GetExtensionHeaderLength
();
uint8_t
*
GetExtensionHeaderValue
();
bool
HasExtensionHeader
()
const
;
uint16_t
GetExtensionHeaderId
()
const
;
size_t
GetExtensionHeaderLength
()
const
;
uint8_t
*
GetExtensionHeaderValue
()
const
;
void
ParseExtensionElements
();
bool
HasOneByteExtensionElements
();
bool
HasTwoBytesExtensionElements
();
bool
HasOneByteExtensionElements
()
const
;
bool
HasTwoBytesExtensionElements
()
const
;
uint8_t
GetExtensionElementLength
(
uint8_t
id
);
uint8_t
*
GetExtensionElementValue
(
uint8_t
id
);
void
SetExtensionElementId
(
uint8_t
old_id
,
uint8_t
new_id
);
uint8_t
*
GetPayload
();
size_t
GetPayloadLength
();
uint8_t
*
GetPayload
()
const
;
size_t
GetPayloadLength
()
const
;
void
Serialize
(
uint8_t
*
buffer
);
RtpPacket
*
Clone
(
uint8_t
*
buffer
);
...
...
@@ -139,19 +139,19 @@ namespace RTC
/* Inline instance methods. */
inline
const
uint8_t
*
RtpPacket
::
GetData
()
const
uint8_t
*
RtpPacket
::
GetData
()
const
{
return
(
const
uint8_t
*
)
this
->
header
;
}
inline
size_t
RtpPacket
::
GetSize
()
size_t
RtpPacket
::
GetSize
()
const
{
return
this
->
size
;
}
inline
uint8_t
RtpPacket
::
GetPayloadType
()
uint8_t
RtpPacket
::
GetPayloadType
()
const
{
return
this
->
header
->
payload_type
;
}
...
...
@@ -163,7 +163,7 @@ namespace RTC
}
inline
bool
RtpPacket
::
HasMarker
()
bool
RtpPacket
::
HasMarker
()
const
{
return
this
->
header
->
marker
;
}
...
...
@@ -175,7 +175,7 @@ namespace RTC
}
inline
uint16_t
RtpPacket
::
GetSequenceNumber
()
uint16_t
RtpPacket
::
GetSequenceNumber
()
const
{
return
(
uint16_t
)
ntohs
(
this
->
header
->
sequence_number
);
}
...
...
@@ -187,7 +187,7 @@ namespace RTC
}
inline
uint32_t
RtpPacket
::
GetTimestamp
()
uint32_t
RtpPacket
::
GetTimestamp
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
timestamp
);
}
...
...
@@ -199,7 +199,7 @@ namespace RTC
}
inline
uint32_t
RtpPacket
::
GetSsrc
()
uint32_t
RtpPacket
::
GetSsrc
()
const
{
return
(
uint32_t
)
ntohl
(
this
->
header
->
ssrc
);
}
...
...
@@ -211,13 +211,13 @@ namespace RTC
}
inline
bool
RtpPacket
::
HasExtensionHeader
()
bool
RtpPacket
::
HasExtensionHeader
()
const
{
return
(
this
->
extensionHeader
?
true
:
false
);
}
inline
uint16_t
RtpPacket
::
GetExtensionHeaderId
()
uint16_t
RtpPacket
::
GetExtensionHeaderId
()
const
{
if
(
!
this
->
extensionHeader
)
return
0
;
...
...
@@ -226,7 +226,7 @@ namespace RTC
}
inline
size_t
RtpPacket
::
GetExtensionHeaderLength
()
size_t
RtpPacket
::
GetExtensionHeaderLength
()
const
{
if
(
!
this
->
extensionHeader
)
return
0
;
...
...
@@ -235,7 +235,7 @@ namespace RTC
}
inline
uint8_t
*
RtpPacket
::
GetExtensionHeaderValue
()
uint8_t
*
RtpPacket
::
GetExtensionHeaderValue
()
const
{
if
(
!
this
->
extensionHeader
)
return
nullptr
;
...
...
@@ -244,13 +244,13 @@ namespace RTC
}
inline
bool
RtpPacket
::
HasOneByteExtensionElements
()
bool
RtpPacket
::
HasOneByteExtensionElements
()
const
{
return
GetExtensionHeaderId
()
==
0xBEDE
;
}
inline
bool
RtpPacket
::
HasTwoBytesExtensionElements
()
bool
RtpPacket
::
HasTwoBytesExtensionElements
()
const
{
return
(
GetExtensionHeaderId
()
&
0
b1111111111110000
)
==
0
b0001000000000000
;
}
...
...
@@ -329,13 +329,13 @@ namespace RTC
}
inline
uint8_t
*
RtpPacket
::
GetPayload
()
uint8_t
*
RtpPacket
::
GetPayload
()
const
{
return
this
->
payload
;
}
inline
size_t
RtpPacket
::
GetPayloadLength
()
size_t
RtpPacket
::
GetPayloadLength
()
const
{
return
this
->
payloadLength
;
}
...
...
worker/include/RTC/RtpReceiver.hpp
浏览文件 @
6d75382a
...
...
@@ -44,12 +44,12 @@ namespace RTC
virtual
~
RtpReceiver
();
void
Close
();
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
void
HandleRequest
(
Channel
::
Request
*
request
);
void
SetTransport
(
RTC
::
Transport
*
transport
);
RTC
::
Transport
*
GetTransport
();
RTC
::
Transport
*
GetTransport
()
const
;
void
RemoveTransport
(
RTC
::
Transport
*
transport
);
RTC
::
RtpParameters
*
GetParameters
();
RTC
::
RtpParameters
*
GetParameters
()
const
;
void
ReceiveRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
ReceiveRtcpSenderReport
(
RTC
::
RTCP
::
SenderReport
*
report
);
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
);
...
...
@@ -93,7 +93,7 @@ namespace RTC
}
inline
RTC
::
Transport
*
RtpReceiver
::
GetTransport
()
RTC
::
Transport
*
RtpReceiver
::
GetTransport
()
const
{
return
this
->
transport
;
}
...
...
@@ -106,7 +106,7 @@ namespace RTC
}
inline
RTC
::
RtpParameters
*
RtpReceiver
::
GetParameters
()
RTC
::
RtpParameters
*
RtpReceiver
::
GetParameters
()
const
{
return
this
->
rtpParameters
;
}
...
...
worker/include/RTC/RtpSender.hpp
浏览文件 @
6d75382a
...
...
@@ -49,15 +49,15 @@ namespace RTC
virtual
~
RtpSender
();
void
Close
();
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
void
HandleRequest
(
Channel
::
Request
*
request
);
void
SetPeerCapabilities
(
RTC
::
RtpCapabilities
*
peerCapabilities
);
void
Send
(
RTC
::
RtpParameters
*
rtpParameters
);
void
SetTransport
(
RTC
::
Transport
*
transport
);
RTC
::
Transport
*
GetTransport
();
RTC
::
Transport
*
GetTransport
()
const
;
void
RemoveTransport
(
RTC
::
Transport
*
transport
);
RTC
::
RtpParameters
*
GetParameters
();
bool
GetActive
();
RTC
::
RtpParameters
*
GetParameters
()
const
;
bool
GetActive
()
const
;
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
);
void
ReceiveNack
(
RTC
::
RTCP
::
FeedbackRtpNackPacket
*
nackPacket
);
...
...
@@ -65,7 +65,7 @@ namespace RTC
private
:
void
RetransmitRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
EmitActiveChange
();
void
EmitActiveChange
()
const
;
public
:
// Passed by argument.
...
...
@@ -110,7 +110,7 @@ namespace RTC
}
inline
RTC
::
Transport
*
RtpSender
::
GetTransport
()
RTC
::
Transport
*
RtpSender
::
GetTransport
()
const
{
return
this
->
transport
;
}
...
...
@@ -128,13 +128,13 @@ namespace RTC
}
inline
RTC
::
RtpParameters
*
RtpSender
::
GetParameters
()
RTC
::
RtpParameters
*
RtpSender
::
GetParameters
()
const
{
return
this
->
rtpParameters
;
}
inline
bool
RtpSender
::
GetActive
()
bool
RtpSender
::
GetActive
()
const
{
return
(
this
->
available
&&
this
->
transport
&&
!
this
->
disabled
);
}
...
...
worker/include/RTC/RtpStream.hpp
浏览文件 @
6d75382a
...
...
@@ -3,6 +3,7 @@
#include "common.hpp"
#include "RTC/RtpPacket.hpp"
#include <json/json.h>
namespace
RTC
{
...
...
@@ -12,6 +13,7 @@ namespace RTC
explicit
RtpStream
(
uint32_t
ssrc
,
uint32_t
clockRate
);
virtual
~
RtpStream
();
virtual
Json
::
Value
toJson
()
const
=
0
;
uint32_t
GetSsrc
();
virtual
bool
ReceivePacket
(
RTC
::
RtpPacket
*
packet
);
...
...
worker/include/RTC/RtpStreamRecv.hpp
浏览文件 @
6d75382a
...
...
@@ -4,7 +4,6 @@
#include "RTC/RtpStream.hpp"
#include "RTC/RTCP/ReceiverReport.hpp"
#include "RTC/RTCP/SenderReport.hpp"
#include <json/json.h>
namespace
RTC
{
...
...
@@ -22,7 +21,7 @@ namespace RTC
explicit
RtpStreamRecv
(
Listener
*
listener
,
uint32_t
ssrc
,
uint32_t
clockRate
,
bool
useNack
);
virtual
~
RtpStreamRecv
();
Json
::
Value
toJson
()
;
virtual
Json
::
Value
toJson
()
const
override
;
virtual
bool
ReceivePacket
(
RTC
::
RtpPacket
*
packet
)
override
;
RTC
::
RTCP
::
ReceiverReport
*
GetRtcpReceiverReport
();
void
ReceiveRtcpSenderReport
(
RTC
::
RTCP
::
SenderReport
*
report
);
...
...
worker/include/RTC/RtpStreamSend.hpp
浏览文件 @
6d75382a
...
...
@@ -5,7 +5,6 @@
#include "RTC/RTCP/SenderReport.hpp"
#include <vector>
#include <list>
#include <json/json.h>
namespace
RTC
{
...
...
@@ -29,7 +28,7 @@ namespace RTC
RtpStreamSend
(
uint32_t
ssrc
,
uint32_t
clockRate
,
size_t
bufferSize
);
virtual
~
RtpStreamSend
();
Json
::
Value
toJson
()
;
virtual
Json
::
Value
toJson
()
const
override
;
bool
ReceivePacket
(
RTC
::
RtpPacket
*
packet
)
override
;
void
RequestRtpRetransmission
(
uint16_t
seq
,
uint16_t
bitmask
,
std
::
vector
<
RTC
::
RtpPacket
*>&
container
);
RTC
::
RTCP
::
SenderReport
*
GetRtcpSenderReport
(
uint64_t
now
);
...
...
worker/include/RTC/StunMessage.hpp
浏览文件 @
6d75382a
...
...
@@ -63,11 +63,11 @@ namespace RTC
StunMessage
(
Class
klass
,
Method
method
,
const
uint8_t
*
transactionId
,
const
uint8_t
*
data
,
size_t
size
);
~
StunMessage
();
void
Dump
();
Class
GetClass
();
Method
GetMethod
();
const
uint8_t
*
GetData
();
size_t
GetSize
();
void
Dump
()
const
;
Class
GetClass
()
const
;
Method
GetMethod
()
const
;
const
uint8_t
*
GetData
()
const
;
size_t
GetSize
()
const
;
void
SetUsername
(
const
char
*
username
,
size_t
len
);
void
SetPriority
(
const
uint32_t
priority
);
void
SetIceControlling
(
const
uint64_t
iceControlling
);
...
...
@@ -77,14 +77,14 @@ namespace RTC
void
SetErrorCode
(
uint16_t
errorCode
);
void
SetMessageIntegrity
(
const
uint8_t
*
messageIntegrity
);
void
SetFingerprint
();
const
std
::
string
&
GetUsername
();
uint32_t
GetPriority
();
uint64_t
GetIceControlling
();
uint64_t
GetIceControlled
();
bool
HasUseCandidate
();
uint16_t
GetErrorCode
();
bool
HasMessageIntegrity
();
bool
HasFingerprint
();
const
std
::
string
&
GetUsername
()
const
;
uint32_t
GetPriority
()
const
;
uint64_t
GetIceControlling
()
const
;
uint64_t
GetIceControlled
()
const
;
bool
HasUseCandidate
()
const
;
uint16_t
GetErrorCode
()
const
;
bool
HasMessageIntegrity
()
const
;
bool
HasFingerprint
()
const
;
Authentication
CheckAuthentication
(
const
std
::
string
&
local_username
,
const
std
::
string
&
local_password
);
StunMessage
*
CreateSuccessResponse
();
StunMessage
*
CreateErrorResponse
(
uint16_t
errorCode
);
...
...
@@ -111,7 +111,7 @@ namespace RTC
std
::
string
password
;
};
/* Inline methods. */
/* Inline
class
methods. */
inline
bool
StunMessage
::
IsStun
(
const
uint8_t
*
data
,
size_t
len
)
...
...
@@ -129,26 +129,28 @@ namespace RTC
);
}
/* Inline instance methods. */
inline
StunMessage
::
Class
StunMessage
::
GetClass
()
StunMessage
::
Class
StunMessage
::
GetClass
()
const
{
return
this
->
klass
;
}
inline
StunMessage
::
Method
StunMessage
::
GetMethod
()
StunMessage
::
Method
StunMessage
::
GetMethod
()
const
{
return
this
->
method
;
}
inline
const
uint8_t
*
StunMessage
::
GetData
()
const
uint8_t
*
StunMessage
::
GetData
()
const
{
return
this
->
data
;
}
inline
size_t
StunMessage
::
GetSize
()
size_t
StunMessage
::
GetSize
()
const
{
return
this
->
size
;
}
...
...
@@ -214,49 +216,49 @@ namespace RTC
}
inline
const
std
::
string
&
StunMessage
::
GetUsername
()
const
std
::
string
&
StunMessage
::
GetUsername
()
const
{
return
this
->
username
;
}
inline
uint32_t
StunMessage
::
GetPriority
()
uint32_t
StunMessage
::
GetPriority
()
const
{
return
this
->
priority
;
}
inline
uint64_t
StunMessage
::
GetIceControlling
()
uint64_t
StunMessage
::
GetIceControlling
()
const
{
return
this
->
iceControlling
;
}
inline
uint64_t
StunMessage
::
GetIceControlled
()
uint64_t
StunMessage
::
GetIceControlled
()
const
{
return
this
->
iceControlled
;
}
inline
bool
StunMessage
::
HasUseCandidate
()
bool
StunMessage
::
HasUseCandidate
()
const
{
return
this
->
hasUseCandidate
;
}
inline
uint16_t
StunMessage
::
GetErrorCode
()
uint16_t
StunMessage
::
GetErrorCode
()
const
{
return
this
->
errorCode
;
}
inline
bool
StunMessage
::
HasMessageIntegrity
()
bool
StunMessage
::
HasMessageIntegrity
()
const
{
return
(
this
->
messageIntegrity
?
true
:
false
);
}
inline
bool
StunMessage
::
HasFingerprint
()
bool
StunMessage
::
HasFingerprint
()
const
{
return
this
->
hasFingerprint
;
}
...
...
worker/include/RTC/Transport.hpp
浏览文件 @
6d75382a
...
...
@@ -44,7 +44,7 @@ namespace RTC
virtual
~
Transport
();
void
Close
();
Json
::
Value
toJson
();
Json
::
Value
toJson
()
const
;
void
HandleRequest
(
Channel
::
Request
*
request
);
void
AddRtpReceiver
(
RTC
::
RtpReceiver
*
rtpReceiver
);
void
RemoveRtpReceiver
(
RTC
::
RtpReceiver
*
rtpReceiver
);
...
...
worker/include/RTC/TransportTuple.hpp
浏览文件 @
6d75382a
...
...
@@ -23,14 +23,14 @@ namespace RTC
explicit
TransportTuple
(
RTC
::
TcpConnection
*
tcpConnection
);
void
Close
();
Json
::
Value
toJson
();
void
Dump
();
Json
::
Value
toJson
()
const
;
void
Dump
()
const
;
void
StoreUdpRemoteAddress
();
bool
Compare
(
TransportTuple
*
tuple
);
bool
Compare
(
TransportTuple
*
tuple
)
const
;
void
Send
(
const
uint8_t
*
data
,
size_t
len
);
Protocol
GetProtocol
();
const
struct
sockaddr
*
GetLocalAddress
();
const
struct
sockaddr
*
GetRemoteAddress
();
Protocol
GetProtocol
()
const
;
const
struct
sockaddr
*
GetLocalAddress
()
const
;
const
struct
sockaddr
*
GetRemoteAddress
()
const
;
private
:
// Passed by argument.
...
...
@@ -74,13 +74,13 @@ namespace RTC
}
inline
TransportTuple
::
Protocol
TransportTuple
::
GetProtocol
()
TransportTuple
::
Protocol
TransportTuple
::
GetProtocol
()
const
{
return
this
->
protocol
;
}
inline
bool
TransportTuple
::
Compare
(
TransportTuple
*
tuple
)
bool
TransportTuple
::
Compare
(
TransportTuple
*
tuple
)
const
{
if
(
this
->
protocol
==
Protocol
::
UDP
&&
tuple
->
GetProtocol
()
==
Protocol
::
UDP
)
{
...
...
@@ -106,7 +106,7 @@ namespace RTC
}
inline
const
struct
sockaddr
*
TransportTuple
::
GetLocalAddress
()
const
struct
sockaddr
*
TransportTuple
::
GetLocalAddress
()
const
{
if
(
this
->
protocol
==
Protocol
::
UDP
)
return
this
->
udpSocket
->
GetLocalAddress
();
...
...
@@ -115,7 +115,7 @@ namespace RTC
}
inline
const
struct
sockaddr
*
TransportTuple
::
GetRemoteAddress
()
const
struct
sockaddr
*
TransportTuple
::
GetRemoteAddress
()
const
{
if
(
this
->
protocol
==
Protocol
::
UDP
)
return
(
const
struct
sockaddr
*
)
this
->
udpRemoteAddr
;
...
...
worker/include/handles/TcpConnection.hpp
浏览文件 @
6d75382a
...
...
@@ -33,21 +33,21 @@ public:
virtual
~
TcpConnection
();
void
Close
();
virtual
void
Dump
();
virtual
void
Dump
()
const
;
void
Setup
(
Listener
*
listener
,
struct
sockaddr_storage
*
localAddr
,
const
std
::
string
&
localIP
,
uint16_t
localPort
);
bool
IsClosing
();
uv_tcp_t
*
GetUvHandle
();
bool
IsClosing
()
const
;
uv_tcp_t
*
GetUvHandle
()
const
;
void
Start
();
void
Write
(
const
uint8_t
*
data
,
size_t
len
);
void
Write
(
const
uint8_t
*
data1
,
size_t
len1
,
const
uint8_t
*
data2
,
size_t
len2
);
void
Write
(
const
std
::
string
&
data
);
const
struct
sockaddr
*
GetLocalAddress
();
int
GetLocalFamily
();
const
std
::
string
&
GetLocalIP
();
uint16_t
GetLocalPort
();
const
struct
sockaddr
*
GetPeerAddress
();
const
std
::
string
&
GetPeerIP
();
uint16_t
GetPeerPort
();
const
struct
sockaddr
*
GetLocalAddress
()
const
;
int
GetLocalFamily
()
const
;
const
std
::
string
&
GetLocalIP
()
const
;
uint16_t
GetLocalPort
()
const
;
const
struct
sockaddr
*
GetPeerAddress
()
const
;
const
std
::
string
&
GetPeerIP
()
const
;
uint16_t
GetPeerPort
()
const
;
private
:
bool
SetPeerAddress
();
...
...
@@ -92,13 +92,13 @@ protected:
/* Inline methods. */
inline
bool
TcpConnection
::
IsClosing
()
bool
TcpConnection
::
IsClosing
()
const
{
return
this
->
isClosing
;
}
inline
uv_tcp_t
*
TcpConnection
::
GetUvHandle
()
uv_tcp_t
*
TcpConnection
::
GetUvHandle
()
const
{
return
this
->
uvHandle
;
}
...
...
@@ -110,43 +110,43 @@ void TcpConnection::Write(const std::string &data)
}
inline
const
struct
sockaddr
*
TcpConnection
::
GetLocalAddress
()
const
struct
sockaddr
*
TcpConnection
::
GetLocalAddress
()
const
{
return
(
const
struct
sockaddr
*
)
this
->
localAddr
;
}
inline
int
TcpConnection
::
GetLocalFamily
()
int
TcpConnection
::
GetLocalFamily
()
const
{
return
((
const
struct
sockaddr
*
)
&
this
->
localAddr
)
->
sa_family
;
}
inline
const
std
::
string
&
TcpConnection
::
GetLocalIP
()
const
std
::
string
&
TcpConnection
::
GetLocalIP
()
const
{
return
this
->
localIP
;
}
inline
uint16_t
TcpConnection
::
GetLocalPort
()
uint16_t
TcpConnection
::
GetLocalPort
()
const
{
return
this
->
localPort
;
}
inline
const
struct
sockaddr
*
TcpConnection
::
GetPeerAddress
()
const
struct
sockaddr
*
TcpConnection
::
GetPeerAddress
()
const
{
return
(
const
struct
sockaddr
*
)
&
this
->
peerAddr
;
}
inline
const
std
::
string
&
TcpConnection
::
GetPeerIP
()
const
std
::
string
&
TcpConnection
::
GetPeerIP
()
const
{
return
this
->
peerIP
;
}
inline
uint16_t
TcpConnection
::
GetPeerPort
()
uint16_t
TcpConnection
::
GetPeerPort
()
const
{
return
this
->
peerPort
;
}
...
...
worker/include/handles/TcpServer.hpp
浏览文件 @
6d75382a
...
...
@@ -18,13 +18,13 @@ public:
virtual
~
TcpServer
();
void
Close
();
virtual
void
Dump
();
bool
IsClosing
();
const
struct
sockaddr
*
GetLocalAddress
();
int
GetLocalFamily
();
const
std
::
string
&
GetLocalIP
();
uint16_t
GetLocalPort
();
size_t
GetNumConnections
();
virtual
void
Dump
()
const
;
bool
IsClosing
()
const
;
const
struct
sockaddr
*
GetLocalAddress
()
const
;
int
GetLocalFamily
()
const
;
const
std
::
string
&
GetLocalIP
()
const
;
uint16_t
GetLocalPort
()
const
;
size_t
GetNumConnections
()
const
;
private
:
bool
SetLocalAddress
();
...
...
@@ -61,37 +61,37 @@ protected:
/* Inline methods. */
inline
bool
TcpServer
::
IsClosing
()
bool
TcpServer
::
IsClosing
()
const
{
return
this
->
isClosing
;
}
inline
size_t
TcpServer
::
GetNumConnections
()
size_t
TcpServer
::
GetNumConnections
()
const
{
return
this
->
connections
.
size
();
}
inline
const
struct
sockaddr
*
TcpServer
::
GetLocalAddress
()
const
struct
sockaddr
*
TcpServer
::
GetLocalAddress
()
const
{
return
(
const
struct
sockaddr
*
)
&
this
->
localAddr
;
}
inline
int
TcpServer
::
GetLocalFamily
()
int
TcpServer
::
GetLocalFamily
()
const
{
return
((
const
struct
sockaddr
*
)
&
this
->
localAddr
)
->
sa_family
;
}
inline
const
std
::
string
&
TcpServer
::
GetLocalIP
()
const
std
::
string
&
TcpServer
::
GetLocalIP
()
const
{
return
this
->
localIP
;
}
inline
uint16_t
TcpServer
::
GetLocalPort
()
uint16_t
TcpServer
::
GetLocalPort
()
const
{
return
this
->
localPort
;
}
...
...
worker/include/handles/UdpSocket.hpp
浏览文件 @
6d75382a
...
...
@@ -30,15 +30,15 @@ public:
virtual
~
UdpSocket
();
void
Close
();
virtual
void
Dump
();
virtual
void
Dump
()
const
;
void
Send
(
const
uint8_t
*
data
,
size_t
len
,
const
struct
sockaddr
*
addr
);
void
Send
(
const
std
::
string
&
data
,
const
struct
sockaddr
*
addr
);
void
Send
(
const
uint8_t
*
data
,
size_t
len
,
const
std
::
string
&
ip
,
uint16_t
port
);
void
Send
(
const
std
::
string
&
data
,
const
std
::
string
&
ip
,
uint16_t
port
);
const
struct
sockaddr
*
GetLocalAddress
();
int
GetLocalFamily
();
const
std
::
string
&
GetLocalIP
();
uint16_t
GetLocalPort
();
const
struct
sockaddr
*
GetLocalAddress
()
const
;
int
GetLocalFamily
()
const
;
const
std
::
string
&
GetLocalIP
()
const
;
uint16_t
GetLocalPort
()
const
;
private
:
bool
SetLocalAddress
();
...
...
@@ -82,25 +82,25 @@ void UdpSocket::Send(const std::string &data, const std::string &ip, uint16_t po
}
inline
const
struct
sockaddr
*
UdpSocket
::
GetLocalAddress
()
const
struct
sockaddr
*
UdpSocket
::
GetLocalAddress
()
const
{
return
(
const
struct
sockaddr
*
)
&
this
->
localAddr
;
}
inline
int
UdpSocket
::
GetLocalFamily
()
int
UdpSocket
::
GetLocalFamily
()
const
{
return
((
const
struct
sockaddr
*
)
&
this
->
localAddr
)
->
sa_family
;
}
inline
const
std
::
string
&
UdpSocket
::
GetLocalIP
()
const
std
::
string
&
UdpSocket
::
GetLocalIP
()
const
{
return
this
->
localIP
;
}
inline
uint16_t
UdpSocket
::
GetLocalPort
()
uint16_t
UdpSocket
::
GetLocalPort
()
const
{
return
this
->
localPort
;
}
...
...
worker/include/handles/UnixStreamSocket.hpp
浏览文件 @
6d75382a
...
...
@@ -23,7 +23,7 @@ public:
virtual
~
UnixStreamSocket
();
void
Close
();
bool
IsClosing
();
bool
IsClosing
()
const
;
void
Write
(
const
uint8_t
*
data
,
size_t
len
);
void
Write
(
const
std
::
string
&
data
);
...
...
@@ -60,7 +60,7 @@ protected:
/* Inline methods. */
inline
bool
UnixStreamSocket
::
IsClosing
()
bool
UnixStreamSocket
::
IsClosing
()
const
{
return
this
->
isClosing
;
}
...
...
worker/src/RTC/DtlsTransport.cpp
浏览文件 @
6d75382a
...
...
@@ -558,7 +558,7 @@ namespace RTC
delete
this
;
}
void
DtlsTransport
::
Dump
()
void
DtlsTransport
::
Dump
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/IceServer.cpp
浏览文件 @
6d75382a
...
...
@@ -187,7 +187,7 @@ namespace RTC
}
}
bool
IceServer
::
IsValidTuple
(
RTC
::
TransportTuple
*
tuple
)
bool
IceServer
::
IsValidTuple
(
RTC
::
TransportTuple
*
tuple
)
const
{
MS_TRACE
();
...
...
@@ -441,7 +441,7 @@ namespace RTC
}
inline
RTC
::
TransportTuple
*
IceServer
::
HasTuple
(
RTC
::
TransportTuple
*
tuple
)
RTC
::
TransportTuple
*
IceServer
::
HasTuple
(
RTC
::
TransportTuple
*
tuple
)
const
{
MS_TRACE
();
...
...
@@ -457,7 +457,7 @@ namespace RTC
// Otherwise check other stored tuples.
for
(
auto
it
=
this
->
tuples
.
begin
();
it
!=
this
->
tuples
.
end
();
++
it
)
{
RTC
::
TransportTuple
*
stored_tuple
=
std
::
addressof
(
*
it
);
RTC
::
TransportTuple
*
stored_tuple
=
const_cast
<
RTC
::
TransportTuple
*>
(
std
::
addressof
(
*
it
)
);
if
(
stored_tuple
->
Compare
(
tuple
))
return
stored_tuple
;
...
...
worker/src/RTC/Peer.cpp
浏览文件 @
6d75382a
...
...
@@ -87,7 +87,7 @@ namespace RTC
delete
this
;
}
Json
::
Value
Peer
::
toJson
()
Json
::
Value
Peer
::
toJson
()
const
{
MS_TRACE
();
...
...
@@ -517,7 +517,7 @@ namespace RTC
this
->
notifier
->
Emit
(
this
->
peerId
,
"newrtpsender"
,
event_data
);
}
RTC
::
RtpSender
*
Peer
::
GetRtpSender
(
uint32_t
ssrc
)
RTC
::
RtpSender
*
Peer
::
GetRtpSender
(
uint32_t
ssrc
)
const
{
MS_TRACE
();
...
...
@@ -612,7 +612,7 @@ namespace RTC
}
}
RTC
::
Transport
*
Peer
::
GetTransportFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
transportId
)
RTC
::
Transport
*
Peer
::
GetTransportFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
transportId
)
const
{
MS_TRACE
();
...
...
@@ -639,7 +639,7 @@ namespace RTC
}
}
RTC
::
RtpReceiver
*
Peer
::
GetRtpReceiverFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
rtpReceiverId
)
RTC
::
RtpReceiver
*
Peer
::
GetRtpReceiverFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
rtpReceiverId
)
const
{
MS_TRACE
();
...
...
@@ -666,7 +666,7 @@ namespace RTC
}
}
RTC
::
RtpSender
*
Peer
::
GetRtpSenderFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
rtpSenderId
)
RTC
::
RtpSender
*
Peer
::
GetRtpSenderFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
rtpSenderId
)
const
{
MS_TRACE
();
...
...
worker/src/RTC/Room.cpp
浏览文件 @
6d75382a
...
...
@@ -140,7 +140,7 @@ namespace RTC
delete
this
;
}
Json
::
Value
Room
::
toJson
()
Json
::
Value
Room
::
toJson
()
const
{
MS_TRACE
();
...
...
@@ -330,7 +330,7 @@ namespace RTC
}
}
RTC
::
Peer
*
Room
::
GetPeerFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
peerId
)
RTC
::
Peer
*
Room
::
GetPeerFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
peerId
)
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpDictionaries/Parameters.cpp
浏览文件 @
6d75382a
...
...
@@ -8,7 +8,7 @@ namespace RTC
{
/* Instance methods. */
Json
::
Value
Parameters
::
toJson
()
Json
::
Value
Parameters
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpDictionaries/RtcpFeedback.cpp
浏览文件 @
6d75382a
...
...
@@ -30,7 +30,7 @@ namespace RTC
this
->
parameter
=
data
[
k_parameter
].
asString
();
}
Json
::
Value
RtcpFeedback
::
toJson
()
Json
::
Value
RtcpFeedback
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpDictionaries/RtcpParameters.cpp
浏览文件 @
6d75382a
...
...
@@ -37,7 +37,7 @@ namespace RTC
this
->
reducedSize
=
data
[
k_reducedSize
].
asBool
();
}
Json
::
Value
RtcpParameters
::
toJson
()
Json
::
Value
RtcpParameters
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpDictionaries/RtpCapabilities.cpp
浏览文件 @
6d75382a
...
...
@@ -67,7 +67,7 @@ namespace RTC
ValidateCodecs
(
scope
);
}
Json
::
Value
RtpCapabilities
::
toJson
()
Json
::
Value
RtpCapabilities
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpDictionaries/RtpCodecParameters.cpp
浏览文件 @
6d75382a
...
...
@@ -112,7 +112,7 @@ namespace RTC
CheckCodec
();
}
Json
::
Value
RtpCodecParameters
::
toJson
()
Json
::
Value
RtpCodecParameters
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpDictionaries/RtpEncodingParameters.cpp
浏览文件 @
6d75382a
...
...
@@ -88,7 +88,7 @@ namespace RTC
}
}
Json
::
Value
RtpEncodingParameters
::
toJson
()
Json
::
Value
RtpEncodingParameters
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpDictionaries/RtpFecParameters.cpp
浏览文件 @
6d75382a
...
...
@@ -30,7 +30,7 @@ namespace RTC
this
->
ssrc
=
(
uint32_t
)
data
[
k_ssrc
].
asUInt
();
}
Json
::
Value
RtpFecParameters
::
toJson
()
Json
::
Value
RtpFecParameters
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpDictionaries/RtpHeaderExtension.cpp
浏览文件 @
6d75382a
...
...
@@ -52,7 +52,7 @@ namespace RTC
this
->
preferredEncrypt
=
data
[
k_preferredEncrypt
].
asBool
();
}
Json
::
Value
RtpHeaderExtension
::
toJson
()
Json
::
Value
RtpHeaderExtension
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpDictionaries/RtpHeaderExtensionParameters.cpp
浏览文件 @
6d75382a
...
...
@@ -47,7 +47,7 @@ namespace RTC
this
->
parameters
.
Set
(
data
[
k_parameters
]);
}
Json
::
Value
RtpHeaderExtensionParameters
::
toJson
()
Json
::
Value
RtpHeaderExtensionParameters
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpDictionaries/RtpParameters.cpp
浏览文件 @
6d75382a
...
...
@@ -107,7 +107,7 @@ namespace RTC
MS_TRACE
();
}
Json
::
Value
RtpParameters
::
toJson
()
Json
::
Value
RtpParameters
::
toJson
()
const
{
MS_TRACE
();
...
...
@@ -247,7 +247,7 @@ namespace RTC
this
->
headerExtensions
=
updatedHeaderExtensions
;
}
uint32_t
RtpParameters
::
GetClockRateForEncoding
(
RtpEncodingParameters
&
encoding
)
uint32_t
RtpParameters
::
GetClockRateForEncoding
(
RtpEncodingParameters
&
encoding
)
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpDictionaries/RtpRtxParameters.cpp
浏览文件 @
6d75382a
...
...
@@ -23,7 +23,7 @@ namespace RTC
this
->
ssrc
=
(
uint32_t
)
data
[
k_ssrc
].
asUInt
();
}
Json
::
Value
RtpRtxParameters
::
toJson
()
Json
::
Value
RtpRtxParameters
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpListener.cpp
浏览文件 @
6d75382a
...
...
@@ -9,7 +9,7 @@ namespace RTC
{
/* Instance methods. */
Json
::
Value
RtpListener
::
toJson
()
Json
::
Value
RtpListener
::
toJson
()
const
{
MS_TRACE
();
...
...
@@ -323,7 +323,7 @@ namespace RTC
}
}
// TODO: We may emit
"unhandledrtp"
event.
// TODO: We may emit
'unhandledrtp'
event.
return
nullptr
;
}
...
...
worker/src/RTC/RtpPacket.cpp
浏览文件 @
6d75382a
...
...
@@ -142,7 +142,7 @@ namespace RTC
MS_TRACE
();
}
void
RtpPacket
::
Dump
()
void
RtpPacket
::
Dump
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpReceiver.cpp
浏览文件 @
6d75382a
...
...
@@ -58,7 +58,7 @@ namespace RTC
delete
this
;
}
Json
::
Value
RtpReceiver
::
toJson
()
Json
::
Value
RtpReceiver
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpSender.cpp
浏览文件 @
6d75382a
...
...
@@ -60,7 +60,7 @@ namespace RTC
delete
this
;
}
Json
::
Value
RtpSender
::
toJson
()
Json
::
Value
RtpSender
::
toJson
()
const
{
MS_TRACE
();
...
...
@@ -423,7 +423,7 @@ namespace RTC
}
inline
void
RtpSender
::
EmitActiveChange
()
void
RtpSender
::
EmitActiveChange
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpStreamRecv.cpp
浏览文件 @
6d75382a
...
...
@@ -23,7 +23,7 @@ namespace RTC
MS_TRACE
();
}
Json
::
Value
RtpStreamRecv
::
toJson
()
Json
::
Value
RtpStreamRecv
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/RtpStreamSend.cpp
浏览文件 @
6d75382a
...
...
@@ -28,7 +28,7 @@ namespace RTC
ClearBuffer
();
}
Json
::
Value
RtpStreamSend
::
toJson
()
Json
::
Value
RtpStreamSend
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/StunMessage.cpp
浏览文件 @
6d75382a
...
...
@@ -240,7 +240,7 @@ namespace RTC
MS_TRACE
();
}
void
StunMessage
::
Dump
()
void
StunMessage
::
Dump
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/Transport.cpp
浏览文件 @
6d75382a
...
...
@@ -247,7 +247,7 @@ namespace RTC
}
}
Json
::
Value
Transport
::
toJson
()
Json
::
Value
Transport
::
toJson
()
const
{
MS_TRACE
();
...
...
worker/src/RTC/TransportTuple.cpp
浏览文件 @
6d75382a
...
...
@@ -10,7 +10,7 @@ namespace RTC
{
/* Instance methods. */
Json
::
Value
TransportTuple
::
toJson
()
Json
::
Value
TransportTuple
::
toJson
()
const
{
MS_TRACE
();
...
...
@@ -42,7 +42,7 @@ namespace RTC
return
json
;
}
void
TransportTuple
::
Dump
()
void
TransportTuple
::
Dump
()
const
{
MS_TRACE
();
...
...
worker/src/handles/TcpConnection.cpp
浏览文件 @
6d75382a
...
...
@@ -131,7 +131,7 @@ void TcpConnection::Close()
}
}
void
TcpConnection
::
Dump
()
void
TcpConnection
::
Dump
()
const
{
MS_DUMP
(
"<TcpConnection>"
);
MS_DUMP
(
" [TCP, local:%s :%"
PRIu16
", remote:%s :%"
PRIu16
", status:%s]"
,
...
...
worker/src/handles/TcpServer.cpp
浏览文件 @
6d75382a
...
...
@@ -152,7 +152,7 @@ void TcpServer::Close()
}
}
void
TcpServer
::
Dump
()
void
TcpServer
::
Dump
()
const
{
MS_DUMP
(
"<TcpServer>"
);
MS_DUMP
(
" [TCP, local:%s :%"
PRIu16
", status:%s, connections:%zu]"
,
...
...
worker/src/handles/UdpSocket.cpp
浏览文件 @
6d75382a
...
...
@@ -170,7 +170,7 @@ void UdpSocket::Close()
uv_close
((
uv_handle_t
*
)
this
->
uvHandle
,
(
uv_close_cb
)
on_close
);
}
void
UdpSocket
::
Dump
()
void
UdpSocket
::
Dump
()
const
{
MS_DUMP
(
"<UdpSocket>"
);
MS_DUMP
(
" [UDP, local:%s :%"
PRIu16
", status:%s]"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论