Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
5fb2e7fe
提交
5fb2e7fe
authored
6月 27, 2016
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RTP works...
上级
f0db9781
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
210 行增加
和
106 行删除
+210
-106
package.json
package.json
+1
-1
test_RtpReceiver.js
test/test_RtpReceiver.js
+64
-60
Peer.h
worker/include/RTC/Peer.h
+1
-1
RtpSender.h
worker/include/RTC/RtpSender.h
+5
-7
Peer.cpp
worker/src/RTC/Peer.cpp
+4
-3
Room.cpp
worker/src/RTC/Room.cpp
+4
-7
RtpCodecParameters.cpp
worker/src/RTC/RtpDictionaries/RtpCodecParameters.cpp
+27
-27
RtpSender.cpp
worker/src/RTC/RtpSender.cpp
+100
-0
SrtpSession.cpp
worker/src/RTC/SrtpSession.cpp
+4
-0
没有找到文件。
package.json
浏览文件 @
5fb2e7fe
{
{
"name"
:
"
mediasoup
"
,
"name"
:
"
mediasoup
"
,
"version"
:
"0.1.0-pre
9
"
,
"version"
:
"0.1.0-pre
10
"
,
"description"
:
"Powerful WebRTC SFU for Node.js"
,
"description"
:
"Powerful WebRTC SFU for Node.js"
,
"main"
:
"lib/mediasoup.js"
,
"main"
:
"lib/mediasoup.js"
,
"repository"
:
{
"repository"
:
{
...
...
test/test_RtpReceiver.js
浏览文件 @
5fb2e7fe
...
@@ -147,18 +147,20 @@ tap.test('rtpReceiver.receive() with full rtpParameters must succeed', { timeout
...
@@ -147,18 +147,20 @@ tap.test('rtpReceiver.receive() with full rtpParameters must succeed', { timeout
maxptime
:
80
,
maxptime
:
80
,
ptime
:
60
,
ptime
:
60
,
numChannels
:
2
,
numChannels
:
2
,
rtx
:
// TODO: uncomment when RTX and RTCP implemented
{
rtcpFeedback
:
[],
payloadType
:
96
,
// rtx :
rtxTime
:
500
// {
},
// payloadType : 96,
rtcpFeedback
:
// rtxTime : 500
[
// },
{
type
:
'ccm'
,
parameter
:
'fir'
},
// rtcpFeedback :
{
type
:
'nack'
,
parameter
:
''
},
// [
{
type
:
'nack'
,
parameter
:
'pli'
},
// { type: 'ccm', parameter: 'fir' },
{
type
:
'google-remb'
,
parameter
:
''
}
// { type: 'nack', parameter: '' },
],
// { type: 'nack', parameter: 'pli' },
// { type: 'google-remb', parameter: '' }
// ],
parameters
:
parameters
:
{
{
profileLevelId
:
2
,
profileLevelId
:
2
,
...
@@ -448,26 +450,27 @@ tap.test('rtpReceiver.receive() with wrong codecs must fail', { timeout: 2000 },
...
@@ -448,26 +450,27 @@ tap.test('rtpReceiver.receive() with wrong codecs must fail', { timeout: 2000 },
});
});
});
});
funcs
.
push
(
function
()
// TODO: uncomment when RTX implemented
{
// funcs.push(function()
return
rtpReceiver
.
receive
(
// {
{
// return rtpReceiver.receive(
codecs
:
// {
[
// codecs :
{
// [
name
:
'audio/opus'
,
// {
payloadType
:
100
,
// name : 'audio/opus',
clockRate
:
48000
,
// payloadType : 100,
rtx
:
{}
// clockRate : 48000,
}
// rtx : {}
]
// }
})
// ]
.
then
(()
=>
t
.
fail
(
'rtpReceiver.receive() succeeded'
))
// })
.
catch
((
error
)
=>
// .then(() => t.fail('rtpReceiver.receive() succeeded'))
{
// .catch((error) =>
t
.
pass
(
`rtpReceiver.receive() without codec.rtx.payloadType failed:
${
error
}
`
);
// {
});
// t.pass(`rtpReceiver.receive() without codec.rtx.payloadType failed: ${error}`);
});
// });
// });
funcs
.
push
(
function
()
funcs
.
push
(
function
()
{
{
...
@@ -494,34 +497,35 @@ tap.test('rtpReceiver.receive() with wrong codecs must fail', { timeout: 2000 },
...
@@ -494,34 +497,35 @@ tap.test('rtpReceiver.receive() with wrong codecs must fail', { timeout: 2000 },
});
});
});
});
funcs
.
push
(
function
()
// TODO: uncomment when RTX implemented
{
// funcs.push(function()
return
rtpReceiver
.
receive
(
// {
{
// return rtpReceiver.receive(
codecs
:
// {
[
// codecs :
{
// [
name
:
'audio/opus'
,
// {
payloadType
:
100
,
// name : 'audio/opus',
clockRate
:
48000
,
// payloadType : 100,
rtx
:
// clockRate : 48000,
{
// rtx :
payloadType
:
0
// {
}
// payloadType : 0
},
// }
{
// },
name
:
'audio/PCMU'
,
// {
payloadType
:
0
,
// name : 'audio/PCMU',
clockRate
:
8000
// payloadType : 0,
}
// clockRate : 8000
]
// }
})
// ]
.
then
(()
=>
t
.
fail
(
'rtpReceiver.receive() succeeded'
))
// })
.
catch
((
error
)
=>
// .then(() => t.fail('rtpReceiver.receive() succeeded'))
{
// .catch((error) =>
t
.
pass
(
`rtpReceiver.receive() with duplicated RTX payloadType failed:
${
error
}
`
);
// {
});
// t.pass(`rtpReceiver.receive() with duplicated RTX payloadType failed: ${error}`);
});
// });
// });
return
promiseSeries
(
funcs
);
return
promiseSeries
(
funcs
);
});
});
...
...
worker/include/RTC/Peer.h
浏览文件 @
5fb2e7fe
...
@@ -49,7 +49,7 @@ namespace RTC
...
@@ -49,7 +49,7 @@ namespace RTC
* @param rtpSender Instance of RtpSender.
* @param rtpSender Instance of RtpSender.
* @param peerName Name of the receiver Peer.
* @param peerName Name of the receiver Peer.
*/
*/
void
AddRtpSender
(
RTC
::
RtpSender
*
rtpSender
,
std
::
string
&
peerName
);
void
AddRtpSender
(
RTC
::
RtpSender
*
rtpSender
,
std
::
string
&
peerName
,
RTC
::
RtpParameters
*
rtpParameters
);
private
:
private
:
RTC
::
Transport
*
GetTransportFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
transportId
=
nullptr
);
RTC
::
Transport
*
GetTransportFromRequest
(
Channel
::
Request
*
request
,
uint32_t
*
transportId
=
nullptr
);
...
...
worker/include/RTC/RtpSender.h
浏览文件 @
5fb2e7fe
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include "RTC/RtcpPacket.h"
#include "RTC/RtcpPacket.h"
#include "Channel/Request.h"
#include "Channel/Request.h"
#include "Channel/Notifier.h"
#include "Channel/Notifier.h"
#include <unordered_map>
#include <json/json.h>
#include <json/json.h>
namespace
RTC
namespace
RTC
...
@@ -38,6 +39,9 @@ namespace RTC
...
@@ -38,6 +39,9 @@ namespace RTC
RTC
::
RtpParameters
*
GetParameters
();
RTC
::
RtpParameters
*
GetParameters
();
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
);
private
:
void
SetPayloadTypesMapping
();
public
:
public
:
// Passed by argument.
// Passed by argument.
uint32_t
rtpSenderId
;
uint32_t
rtpSenderId
;
...
@@ -52,6 +56,7 @@ namespace RTC
...
@@ -52,6 +56,7 @@ namespace RTC
// Allocated by this.
// Allocated by this.
RTC
::
RtpParameters
*
rtpParameters
=
nullptr
;
RTC
::
RtpParameters
*
rtpParameters
=
nullptr
;
// Others.
// Others.
std
::
unordered_map
<
uint8_t
,
uint8_t
>
mapPayloadTypes
;
// Whether this RtpSender is valid according to Peer capabilities.
// Whether this RtpSender is valid according to Peer capabilities.
bool
available
=
false
;
bool
available
=
false
;
};
};
...
@@ -76,13 +81,6 @@ namespace RTC
...
@@ -76,13 +81,6 @@ namespace RTC
{
{
return
this
->
rtpParameters
;
return
this
->
rtpParameters
;
}
}
inline
void
RtpSender
::
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
{
if
(
this
->
available
&&
this
->
transport
)
this
->
transport
->
SendRtpPacket
(
packet
);
}
}
}
#endif
#endif
worker/src/RTC/Peer.cpp
浏览文件 @
5fb2e7fe
...
@@ -438,7 +438,7 @@ namespace RTC
...
@@ -438,7 +438,7 @@ namespace RTC
}
}
}
}
void
Peer
::
AddRtpSender
(
RTC
::
RtpSender
*
rtpSender
,
std
::
string
&
peerName
)
void
Peer
::
AddRtpSender
(
RTC
::
RtpSender
*
rtpSender
,
std
::
string
&
peerName
,
RTC
::
RtpParameters
*
rtpParameters
)
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -448,11 +448,12 @@ namespace RTC
...
@@ -448,11 +448,12 @@ namespace RTC
MS_ASSERT
(
this
->
rtpSenders
.
find
(
rtpSender
->
rtpSenderId
)
==
this
->
rtpSenders
.
end
(),
MS_ASSERT
(
this
->
rtpSenders
.
find
(
rtpSender
->
rtpSenderId
)
==
this
->
rtpSenders
.
end
(),
"given RtpSender already exists in this Peer"
);
"given RtpSender already exists in this Peer"
);
MS_ASSERT
(
rtpSender
->
GetParameters
(),
"given RtpSender does not have RtpParameters"
);
// Provide the RtpSender with peer's capabilities.
// Provide the RtpSender with peer's capabilities.
rtpSender
->
SetPeerCapabilities
(
std
::
addressof
(
this
->
capabilities
));
rtpSender
->
SetPeerCapabilities
(
std
::
addressof
(
this
->
capabilities
));
// Provide the RtpSender with the received RTP parameters.
rtpSender
->
Send
(
rtpParameters
);
// Store it.
// Store it.
this
->
rtpSenders
[
rtpSender
->
rtpSenderId
]
=
rtpSender
;
this
->
rtpSenders
[
rtpSender
->
rtpSenderId
]
=
rtpSender
;
...
...
worker/src/RTC/Room.cpp
浏览文件 @
5fb2e7fe
...
@@ -438,11 +438,11 @@ namespace RTC
...
@@ -438,11 +438,11 @@ namespace RTC
// Store into the map.
// Store into the map.
this
->
mapRtpReceiverRtpSenders
[
rtpReceiver
].
insert
(
rtpSender
);
this
->
mapRtpReceiverRtpSenders
[
rtpReceiver
].
insert
(
rtpSender
);
// Attach the RtpSender to peer.
peer
->
AddRtpSender
(
rtpSender
,
receiver_peer
->
peerName
,
rtpReceiver
->
GetParameters
());
// Provide the RtpSender with the parameters of the RtpReceiver.
// Provide the RtpSender with the parameters of the RtpReceiver.
rtpSender
->
Send
(
rtpReceiver
->
GetParameters
());
rtpSender
->
Send
(
rtpReceiver
->
GetParameters
());
// Attach the RtpSender to peer.
peer
->
AddRtpSender
(
rtpSender
,
receiver_peer
->
peerName
);
}
}
}
}
}
}
...
@@ -506,11 +506,8 @@ namespace RTC
...
@@ -506,11 +506,8 @@ namespace RTC
// Store into the map.
// Store into the map.
this
->
mapRtpReceiverRtpSenders
[
rtpReceiver
].
insert
(
rtpSender
);
this
->
mapRtpReceiverRtpSenders
[
rtpReceiver
].
insert
(
rtpSender
);
// Provide the RtpSender with the parameters of the RtpReceiver.
rtpSender
->
Send
(
rtpReceiver
->
GetParameters
());
// Attach the RtpSender to sender_peer.
// Attach the RtpSender to sender_peer.
sender_peer
->
AddRtpSender
(
rtpSender
,
peer
->
peerName
);
sender_peer
->
AddRtpSender
(
rtpSender
,
peer
->
peerName
,
rtpReceiver
->
GetParameters
()
);
}
}
}
}
// If this is not a new RtpReceiver let's retrieve its updated parameters
// If this is not a new RtpReceiver let's retrieve its updated parameters
...
...
worker/src/RTC/RtpDictionaries/RtpCodecParameters.cpp
浏览文件 @
5fb2e7fe
...
@@ -85,33 +85,33 @@ namespace RTC
...
@@ -85,33 +85,33 @@ namespace RTC
if
(
data
[
k_parameters
].
isObject
())
if
(
data
[
k_parameters
].
isObject
())
this
->
parameters
.
Set
(
data
[
k_parameters
]);
this
->
parameters
.
Set
(
data
[
k_parameters
]);
if
(
this
->
scope
==
RTC
::
Scope
::
RECEIVE
)
//
if (this->scope == RTC::Scope::RECEIVE)
{
//
{
// `rtx` is optional.
//
// `rtx` is optional.
if
(
data
[
k_rtx
].
isObject
())
//
if (data[k_rtx].isObject())
{
//
{
this
->
rtx
=
RTC
::
RTCRtpCodecRtxParameters
(
data
[
k_rtx
]);
//
this->rtx = RTC::RTCRtpCodecRtxParameters(data[k_rtx]);
this
->
hasRtx
=
true
;
//
this->hasRtx = true;
}
//
}
}
//
}
if
(
this
->
scope
==
RTC
::
Scope
::
PEER_CAPABILITY
||
//
if (this->scope == RTC::Scope::PEER_CAPABILITY ||
this
->
scope
==
RTC
::
Scope
::
RECEIVE
)
//
this->scope == RTC::Scope::RECEIVE)
{
//
{
// `rtcpFeedback` is optional.
//
// `rtcpFeedback` is optional.
if
(
data
[
k_rtcpFeedback
].
isArray
())
//
if (data[k_rtcpFeedback].isArray())
{
//
{
auto
&
json_rtcpFeedback
=
data
[
k_rtcpFeedback
];
//
auto& json_rtcpFeedback = data[k_rtcpFeedback];
for
(
Json
::
UInt
i
=
0
;
i
<
json_rtcpFeedback
.
size
();
i
++
)
//
for (Json::UInt i = 0; i < json_rtcpFeedback.size(); i++)
{
//
{
RTC
::
RtcpFeedback
rtcpFeedback
(
json_rtcpFeedback
[
i
]);
//
RTC::RtcpFeedback rtcpFeedback(json_rtcpFeedback[i]);
// Append to the rtcpFeedback vector.
//
// Append to the rtcpFeedback vector.
this
->
rtcpFeedback
.
push_back
(
rtcpFeedback
);
//
this->rtcpFeedback.push_back(rtcpFeedback);
}
//
}
}
//
}
}
//
}
// Check codec.
// Check codec.
CheckCodec
();
CheckCodec
();
...
...
worker/src/RTC/RtpSender.cpp
浏览文件 @
5fb2e7fe
...
@@ -52,6 +52,8 @@ namespace RTC
...
@@ -52,6 +52,8 @@ namespace RTC
static
const
Json
::
StaticString
k_rtpParameters
(
"rtpParameters"
);
static
const
Json
::
StaticString
k_rtpParameters
(
"rtpParameters"
);
static
const
Json
::
StaticString
k_hasTransport
(
"hasTransport"
);
static
const
Json
::
StaticString
k_hasTransport
(
"hasTransport"
);
static
const
Json
::
StaticString
k_available
(
"available"
);
static
const
Json
::
StaticString
k_available
(
"available"
);
// TODO: TMP
static
const
Json
::
StaticString
k_mapPayloadTypes
(
"mapPayloadTypes"
);
Json
::
Value
json
(
Json
::
objectValue
);
Json
::
Value
json
(
Json
::
objectValue
);
...
@@ -68,6 +70,13 @@ namespace RTC
...
@@ -68,6 +70,13 @@ namespace RTC
json
[
k_available
]
=
this
->
available
;
json
[
k_available
]
=
this
->
available
;
// TODO: TMP
json
[
k_mapPayloadTypes
]
=
Json
::
objectValue
;
for
(
auto
&
kv
:
this
->
mapPayloadTypes
)
{
json
[
k_mapPayloadTypes
][
std
::
to_string
(
kv
.
first
)]
=
kv
.
second
;
}
return
json
;
return
json
;
}
}
...
@@ -99,6 +108,8 @@ namespace RTC
...
@@ -99,6 +108,8 @@ namespace RTC
{
{
MS_TRACE
();
MS_TRACE
();
MS_ASSERT
(
peerCapabilities
,
"given peerCapabilities are null"
);
this
->
peerCapabilities
=
peerCapabilities
;
this
->
peerCapabilities
=
peerCapabilities
;
}
}
...
@@ -110,6 +121,8 @@ namespace RTC
...
@@ -110,6 +121,8 @@ namespace RTC
static
const
Json
::
StaticString
k_rtpParameters
(
"rtpParameters"
);
static
const
Json
::
StaticString
k_rtpParameters
(
"rtpParameters"
);
static
const
Json
::
StaticString
k_available
(
"available"
);
static
const
Json
::
StaticString
k_available
(
"available"
);
MS_ASSERT
(
rtpParameters
,
"no RTP parameters given"
);
auto
previousRtpParameters
=
this
->
rtpParameters
;
auto
previousRtpParameters
=
this
->
rtpParameters
;
// Free the previous rtpParameters.
// Free the previous rtpParameters.
...
@@ -119,6 +132,9 @@ namespace RTC
...
@@ -119,6 +132,9 @@ namespace RTC
// Clone given RTP parameters so we manage our own sender parameters.
// Clone given RTP parameters so we manage our own sender parameters.
this
->
rtpParameters
=
new
RTC
::
RtpParameters
(
rtpParameters
);
this
->
rtpParameters
=
new
RTC
::
RtpParameters
(
rtpParameters
);
// Build the payload types map.
SetPayloadTypesMapping
();
// TODO: Must check new parameters and:
// TODO: Must check new parameters and:
// - remove unsuported capabilities,
// - remove unsuported capabilities,
// - set this->available if at least there is a capable encoding.
// - set this->available if at least there is a capable encoding.
...
@@ -137,4 +153,88 @@ namespace RTC
...
@@ -137,4 +153,88 @@ namespace RTC
this
->
notifier
->
Emit
(
this
->
rtpSenderId
,
"parameterschange"
,
event_data
);
this
->
notifier
->
Emit
(
this
->
rtpSenderId
,
"parameterschange"
,
event_data
);
}
}
}
}
void
RtpSender
::
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
{
MS_TRACE
();
if
(
!
this
->
available
||
!
this
->
transport
)
return
;
// Map the payload type.
uint8_t
originalPayloadType
=
packet
->
GetPayloadType
();
uint8_t
mappedPayloadType
;
auto
it
=
this
->
mapPayloadTypes
.
find
(
originalPayloadType
);
// TODO: This should never happen.
if
(
it
==
this
->
mapPayloadTypes
.
end
())
{
MS_ERROR
(
"payload type not mapped [payloadType:%"
PRIu8
"]"
,
originalPayloadType
);
return
;
}
mappedPayloadType
=
this
->
mapPayloadTypes
[
originalPayloadType
];
// Map the packet payload type.
packet
->
SetPayloadType
(
mappedPayloadType
);
// Send the packet.
this
->
transport
->
SendRtpPacket
(
packet
);
// Recover the original packet payload type.
packet
->
SetPayloadType
(
originalPayloadType
);
}
void
RtpSender
::
SetPayloadTypesMapping
()
{
MS_TRACE
();
MS_ASSERT
(
this
->
peerCapabilities
,
"peer RTP capabilities are null"
);
this
->
mapPayloadTypes
.
clear
();
for
(
auto
&
codec
:
this
->
rtpParameters
->
codecs
)
{
auto
it
=
this
->
peerCapabilities
->
codecs
.
begin
();
for
(;
it
!=
this
->
peerCapabilities
->
codecs
.
end
();
++
it
)
{
auto
&
codecCapability
=
*
it
;
if
(
codecCapability
.
Matches
(
codec
))
{
auto
originalPayloadType
=
codec
.
payloadType
;
auto
mappedPayloadType
=
codecCapability
.
payloadType
;
// Set the mapping.
this
->
mapPayloadTypes
[
originalPayloadType
]
=
mappedPayloadType
;
// Override the codec payload type.
codec
.
payloadType
=
mappedPayloadType
;
// Override encoding.codecPayloadType.
for
(
auto
&
encoding
:
this
->
rtpParameters
->
encodings
)
{
// TODO: remove when confirmed
MS_ASSERT
(
encoding
.
hasCodecPayloadType
,
"encoding without codecPayloadType"
);
if
(
encoding
.
codecPayloadType
==
originalPayloadType
)
encoding
.
codecPayloadType
=
mappedPayloadType
;
}
break
;
}
}
if
(
it
==
this
->
peerCapabilities
->
codecs
.
end
())
{
// TODO: Let's see. Theoretically unsupported codecs has been
// already removed in Send(), but it's not done yet.
// Once done, this should be a MS_THROW.
MS_ERROR
(
"no matching room codec found [payloadType:%"
PRIu8
"]"
,
codec
.
payloadType
);
}
}
}
}
}
worker/src/RTC/SrtpSession.cpp
浏览文件 @
5fb2e7fe
...
@@ -138,6 +138,7 @@ namespace RTC
...
@@ -138,6 +138,7 @@ namespace RTC
err
=
srtp_protect
(
this
->
session
,
(
void
*
)
SrtpSession
::
encryptBuffer
,
(
int
*
)
len
);
err
=
srtp_protect
(
this
->
session
,
(
void
*
)
SrtpSession
::
encryptBuffer
,
(
int
*
)
len
);
if
(
DepLibSRTP
::
IsError
(
err
))
if
(
DepLibSRTP
::
IsError
(
err
))
{
{
// TODO
MS_WARN
(
"srtp_protect() failed: %s"
,
DepLibSRTP
::
GetErrorString
(
err
));
MS_WARN
(
"srtp_protect() failed: %s"
,
DepLibSRTP
::
GetErrorString
(
err
));
return
false
;
return
false
;
...
@@ -158,6 +159,7 @@ namespace RTC
...
@@ -158,6 +159,7 @@ namespace RTC
err
=
srtp_unprotect
(
this
->
session
,
(
void
*
)
data
,
(
int
*
)
len
);
err
=
srtp_unprotect
(
this
->
session
,
(
void
*
)
data
,
(
int
*
)
len
);
if
(
DepLibSRTP
::
IsError
(
err
))
if
(
DepLibSRTP
::
IsError
(
err
))
{
{
// TODO
MS_WARN
(
"srtp_unprotect() failed: %s"
,
DepLibSRTP
::
GetErrorString
(
err
));
MS_WARN
(
"srtp_unprotect() failed: %s"
,
DepLibSRTP
::
GetErrorString
(
err
));
return
false
;
return
false
;
...
@@ -185,6 +187,7 @@ namespace RTC
...
@@ -185,6 +187,7 @@ namespace RTC
err
=
srtp_protect_rtcp
(
this
->
session
,
(
void
*
)
SrtpSession
::
encryptBuffer
,
(
int
*
)
len
);
err
=
srtp_protect_rtcp
(
this
->
session
,
(
void
*
)
SrtpSession
::
encryptBuffer
,
(
int
*
)
len
);
if
(
DepLibSRTP
::
IsError
(
err
))
if
(
DepLibSRTP
::
IsError
(
err
))
{
{
// TODO
MS_WARN
(
"srtp_protect_rtcp() failed: %s"
,
DepLibSRTP
::
GetErrorString
(
err
));
MS_WARN
(
"srtp_protect_rtcp() failed: %s"
,
DepLibSRTP
::
GetErrorString
(
err
));
return
false
;
return
false
;
...
@@ -205,6 +208,7 @@ namespace RTC
...
@@ -205,6 +208,7 @@ namespace RTC
err
=
srtp_unprotect_rtcp
(
this
->
session
,
(
void
*
)
data
,
(
int
*
)
len
);
err
=
srtp_unprotect_rtcp
(
this
->
session
,
(
void
*
)
data
,
(
int
*
)
len
);
if
(
DepLibSRTP
::
IsError
(
err
))
if
(
DepLibSRTP
::
IsError
(
err
))
{
{
// TODO
MS_WARN
(
"srtp_unprotect_rtcp() failed: %s"
,
DepLibSRTP
::
GetErrorString
(
err
));
MS_WARN
(
"srtp_unprotect_rtcp() failed: %s"
,
DepLibSRTP
::
GetErrorString
(
err
));
return
false
;
return
false
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论