Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
06687592
提交
06687592
authored
9月 04, 2017
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Match H264 params.
上级
b80cda02
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
27 行增加
和
28 行删除
+27
-28
TODO_V2.md
TODO_V2.md
+0
-2
ortc.js
lib/ortc.js
+23
-20
supportedRtpCapabilities.js
lib/supportedRtpCapabilities.js
+2
-2
Transport.cpp
worker/src/RTC/Transport.cpp
+2
-4
没有找到文件。
TODO_V2.md
浏览文件 @
06687592
...
@@ -40,8 +40,6 @@ mediasoup:WARN:mediasoup-worker [id:bnicjuxw#1] RTC::Transport::HandleConsumer()
...
@@ -40,8 +40,6 @@ mediasoup:WARN:mediasoup-worker [id:bnicjuxw#1] RTC::Transport::HandleConsumer()
*
Implement
`mandatoryCodecPayloadTypes`
.
*
Implement
`mandatoryCodecPayloadTypes`
.
*
Check H246 parameters.
*
JS: Remove tons of useless debugs (for example in
`Peer._createProducer()`
).
*
JS: Remove tons of useless debugs (for example in
`Peer._createProducer()`
).
*
Producer JS API to request fullframe.
*
Producer JS API to request fullframe.
lib/ortc.js
浏览文件 @
06687592
...
@@ -44,7 +44,7 @@ exports.generateRoomRtpCapabilities = function(mediaCodecs)
...
@@ -44,7 +44,7 @@ exports.generateRoomRtpCapabilities = function(mediaCodecs)
const
matchedSupportedCodec
=
supportedCodecs
const
matchedSupportedCodec
=
supportedCodecs
.
find
((
supportedCodec
)
=>
.
find
((
supportedCodec
)
=>
{
{
return
matchCodec
(
mediaCodec
,
supportedCodec
);
return
matchCodec
s
(
mediaCodec
,
supportedCodec
);
});
});
if
(
!
matchedSupportedCodec
)
if
(
!
matchedSupportedCodec
)
...
@@ -124,7 +124,7 @@ exports.assertCapabilitiesSubset = function(capsA, capsB)
...
@@ -124,7 +124,7 @@ exports.assertCapabilitiesSubset = function(capsA, capsB)
{
{
return
(
return
(
codecA
.
preferredPayloadType
===
codecB
.
preferredPayloadType
&&
codecA
.
preferredPayloadType
===
codecB
.
preferredPayloadType
&&
matchCodec
(
codecA
,
codecB
)
matchCodec
s
(
codecA
,
codecB
)
);
);
});
});
...
@@ -178,7 +178,7 @@ exports.getProducerRtpParametersMapping = function(params, caps)
...
@@ -178,7 +178,7 @@ exports.getProducerRtpParametersMapping = function(params, caps)
// Search for the same media codec in capabilities.
// Search for the same media codec in capabilities.
const
matchedCapCodec
=
caps
.
codecs
const
matchedCapCodec
=
caps
.
codecs
.
find
((
capCodec
)
=>
matchCodec
(
codec
,
capCodec
,
true
));
.
find
((
capCodec
)
=>
matchCodec
s
(
codec
,
capCodec
));
if
(
!
matchedCapCodec
)
if
(
!
matchedCapCodec
)
{
{
...
@@ -240,7 +240,7 @@ exports.getProducerRtpParametersMapping = function(params, caps)
...
@@ -240,7 +240,7 @@ exports.getProducerRtpParametersMapping = function(params, caps)
for
(
const
ext
of
params
.
headerExtensions
)
for
(
const
ext
of
params
.
headerExtensions
)
{
{
const
matchedCapExt
=
caps
.
headerExtensions
const
matchedCapExt
=
caps
.
headerExtensions
.
find
((
capExt
)
=>
matchHeaderExtensions
(
ext
,
capExt
,
true
));
.
find
((
capExt
)
=>
matchHeaderExtensions
(
ext
,
capExt
));
if
(
!
matchedCapExt
)
if
(
!
matchedCapExt
)
{
{
...
@@ -455,41 +455,44 @@ function assertCodecCapability(codec)
...
@@ -455,41 +455,44 @@ function assertCodecCapability(codec)
throw
new
TypeError
(
'invalid RTCCodecCapability'
);
throw
new
TypeError
(
'invalid RTCCodecCapability'
);
}
}
function
matchCodec
(
codecA
,
codecB
,
leftIsParam
=
false
)
function
matchCodec
s
(
aCodec
,
bCodec
)
{
{
if
(
!
leftIsParam
)
const
aName
=
aCodec
.
name
.
toLowerCase
();
const
bName
=
bCodec
.
name
.
toLowerCase
();
if
(
aCodec
.
kind
&&
bCodec
.
kind
&&
aCodec
.
kind
!==
bCodec
.
kind
)
{
{
if
(
codecA
.
kind
!==
codecB
.
kind
)
return
false
;
return
false
;
}
}
if
(
codecA
.
name
.
toLowerCase
()
!==
codecB
.
name
.
toLowerCase
())
if
(
aName
!==
bName
)
return
false
;
if
(
aCodec
.
clockRate
!==
bCodec
.
clockRate
)
return
false
;
return
false
;
if
(
codecA
.
clockRate
!==
codecB
.
clockRate
)
if
(
aCodec
.
channels
!==
bCodec
.
channels
)
return
false
;
return
false
;
if
(
// Match H264 parameters.
(
codecA
.
channels
>
1
||
codecB
.
channels
>
1
)
&&
if
(
aName
===
'h264'
)
codecA
.
channels
!==
codecB
.
channels
)
{
{
const
aPacketizationMode
=
(
aCodec
.
parameters
||
{})[
'packetization-mode'
]
||
0
;
const
bPacketizationMode
=
(
bCodec
.
parameters
||
{})[
'packetization-mode'
]
||
0
;
if
(
aPacketizationMode
!==
bPacketizationMode
)
return
false
;
return
false
;
}
}
// TODO: Check H264 parameters.
return
true
;
return
true
;
}
}
function
matchHeaderExtensions
(
extA
,
extB
,
leftIsParam
=
false
)
function
matchHeaderExtensions
(
aExt
,
bExt
)
{
{
if
(
!
leftIsParam
)
if
(
aExt
.
kind
&&
bExt
.
kind
&&
aExt
.
kind
!==
bExt
.
kind
)
{
if
(
extA
.
kind
!==
extB
.
kind
)
return
false
;
return
false
;
}
if
(
extA
.
uri
!==
extB
.
uri
)
if
(
aExt
.
uri
!==
bExt
.
uri
)
return
false
;
return
false
;
return
true
;
return
true
;
...
...
lib/supportedRtpCapabilities.js
浏览文件 @
06687592
...
@@ -173,7 +173,7 @@ const supportedRtpCapabilities =
...
@@ -173,7 +173,7 @@ const supportedRtpCapabilities =
clockRate
:
90000
,
clockRate
:
90000
,
parameters
:
parameters
:
{
{
packetizationMode
:
0
'packetization-mode'
:
0
},
},
rtcpFeedback
:
rtcpFeedback
:
[
[
...
@@ -195,7 +195,7 @@ const supportedRtpCapabilities =
...
@@ -195,7 +195,7 @@ const supportedRtpCapabilities =
clockRate
:
90000
,
clockRate
:
90000
,
parameters
:
parameters
:
{
{
packetizationMode
:
1
'packetization-mode'
:
1
},
},
rtcpFeedback
:
rtcpFeedback
:
[
[
...
...
worker/src/RTC/Transport.cpp
浏览文件 @
06687592
...
@@ -622,8 +622,7 @@ namespace RTC
...
@@ -622,8 +622,7 @@ namespace RTC
if
(
consumer
->
kind
==
RTC
::
Media
::
Kind
::
VIDEO
)
if
(
consumer
->
kind
==
RTC
::
Media
::
Kind
::
VIDEO
)
{
{
MS_DEBUG_TAG
(
MS_DEBUG_TAG
(
rtcp
,
rtcp
,
"requesting full frame for new Consumer since Transport already connected"
);
"requesting full frame for new Consumer since Transport already connected"
);
}
}
consumer
->
RequestFullFrame
();
consumer
->
RequestFullFrame
();
...
@@ -722,8 +721,7 @@ namespace RTC
...
@@ -722,8 +721,7 @@ namespace RTC
this
->
iceServer
->
GetState
()
==
RTC
::
IceServer
::
IceState
::
COMPLETED
)
this
->
iceServer
->
GetState
()
==
RTC
::
IceServer
::
IceState
::
COMPLETED
)
{
{
MS_DEBUG_TAG
(
MS_DEBUG_TAG
(
dtls
,
dtls
,
"transition from DTLS local role 'auto' to 'server' and running DTLS transport"
);
"transition from DTLS local role 'auto' to 'server' and running DTLS transport"
);
this
->
dtlsLocalRole
=
RTC
::
DtlsTransport
::
Role
::
SERVER
;
this
->
dtlsLocalRole
=
RTC
::
DtlsTransport
::
Role
::
SERVER
;
this
->
dtlsTransport
->
Run
(
RTC
::
DtlsTransport
::
Role
::
SERVER
);
this
->
dtlsTransport
->
Run
(
RTC
::
DtlsTransport
::
Role
::
SERVER
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论