Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
820e9564
提交
820e9564
authored
9月 01, 2017
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix ortc.getConsumerRtpParameters()
上级
1369b9f5
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
17 行增加
和
25 行删除
+17
-25
ortc.js
lib/ortc.js
+14
-15
Consumer.cpp
worker/src/RTC/Consumer.cpp
+2
-8
Router.cpp
worker/src/RTC/Router.cpp
+1
-2
没有找到文件。
lib/ortc.js
浏览文件 @
820e9564
...
@@ -379,10 +379,8 @@ exports.getConsumableRtpParameters = function(params, caps, rtpMapping)
...
@@ -379,10 +379,8 @@ exports.getConsumableRtpParameters = function(params, caps, rtpMapping)
/**
/**
* Generate RTP parameters for a specific Consumer.
* Generate RTP parameters for a specific Consumer.
*
*
* NOTE: All the codecs of the consumable RTP parameters are copied verbatim
* NOTE: It's up to theremote Consumer to check the codecs and decide whether it
* (all but RTX codecs in case the Peer does not support RTX). It's up to the
* can enable this Consumer or not.
* remote Consumer to check the codecs and decide whether it can enable this
* Consumer or not.
*
*
* @param {RTCRtpParameters} consumableRtpParameters - Consumable RTP parameters.
* @param {RTCRtpParameters} consumableRtpParameters - Consumable RTP parameters.
* @param {RTCRtpCapabilities} rtpCapabilities - Peer RTP capabilities.
* @param {RTCRtpCapabilities} rtpCapabilities - Peer RTP capabilities.
...
@@ -400,24 +398,25 @@ exports.getConsumerRtpParameters = function(consumableRtpParameters, rtpCapabili
...
@@ -400,24 +398,25 @@ exports.getConsumerRtpParameters = function(consumableRtpParameters, rtpCapabili
rtcp
:
consumableRtpParameters
.
rtcp
rtcp
:
consumableRtpParameters
.
rtcp
};
};
const
consumableCodecs
=
utils
.
cloneObject
(
consumableRtpParameters
.
codecs
);
let
rtxSupported
=
false
;
let
rtxSupported
=
false
;
consumerParams
.
codecs
=
consumableRtpParameters
.
codecs
for
(
const
codec
of
consumableCodecs
)
.
filter
((
codec
)
=>
{
{
if
(
codec
.
name
.
toLowerCase
()
!==
'rtx'
)
const
matchedCapCodec
=
rtpCapabilities
.
codecs
return
true
;
.
find
((
capCodec
)
=>
capCodec
.
preferredPayloadType
===
codec
.
payloadType
)
;
const
hasRtxCodec
=
rtpCapabilities
.
codecs
if
(
!
matchedCapCodec
)
.
some
((
capCodec
)
=>
capCodec
.
preferredPayloadType
===
codec
.
payloadType
)
;
continue
;
if
(
hasRtxCodec
)
// Reduce RTCP feedbacks.
{
codec
.
rtcpFeedback
=
matchedCapCodec
.
rtcpFeedback
;
rtxSupported
=
true
;
return
true
;
consumerParams
.
codecs
.
push
(
codec
);
if
(
!
rtxSupported
&&
codec
.
name
.
toLowerCase
()
===
'rtx'
)
rtxSupported
=
true
;
}
}
});
consumerParams
.
headerExtensions
=
consumableRtpParameters
.
headerExtensions
consumerParams
.
headerExtensions
=
consumableRtpParameters
.
headerExtensions
.
filter
((
ext
)
=>
.
filter
((
ext
)
=>
...
...
worker/src/RTC/Consumer.cpp
浏览文件 @
820e9564
...
@@ -18,14 +18,8 @@ namespace RTC
...
@@ -18,14 +18,8 @@ namespace RTC
/* Instance methods. */
/* Instance methods. */
Consumer
::
Consumer
(
Consumer
::
Consumer
(
Channel
::
Notifier
*
notifier
,
Channel
::
Notifier
*
notifier
,
uint32_t
consumerId
,
RTC
::
Media
::
Kind
kind
,
uint32_t
sourceProducerId
)
uint32_t
consumerId
,
:
consumerId
(
consumerId
),
kind
(
kind
),
sourceProducerId
(
sourceProducerId
),
notifier
(
notifier
)
RTC
::
Media
::
Kind
kind
,
uint32_t
sourceProducerId
)
:
consumerId
(
consumerId
),
kind
(
kind
),
sourceProducerId
(
sourceProducerId
),
notifier
(
notifier
)
{
{
MS_TRACE
();
MS_TRACE
();
...
...
worker/src/RTC/Router.cpp
浏览文件 @
820e9564
...
@@ -455,8 +455,7 @@ namespace RTC
...
@@ -455,8 +455,7 @@ namespace RTC
return
;
return
;
}
}
consumer
=
new
RTC
::
Consumer
(
consumer
=
new
RTC
::
Consumer
(
this
->
notifier
,
consumerId
,
kind
,
producer
->
producerId
);
this
->
notifier
,
consumerId
,
kind
,
producer
->
producerId
);
// If the Producer is paused tell it to the new Consumer.
// If the Producer is paused tell it to the new Consumer.
if
(
producer
->
IsPaused
())
if
(
producer
->
IsPaused
())
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论