Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
685ef99e
提交
685ef99e
authored
3月 27, 2019
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Some pending stuff in Consumer classes
上级
3bd4f807
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
27 行增加
和
16 行删除
+27
-16
PipeConsumer.cpp
worker/src/RTC/PipeConsumer.cpp
+19
-7
Producer.cpp
worker/src/RTC/Producer.cpp
+0
-8
SimulcastConsumer.cpp
worker/src/RTC/SimulcastConsumer.cpp
+8
-1
没有找到文件。
worker/src/RTC/PipeConsumer.cpp
浏览文件 @
685ef99e
...
...
@@ -25,6 +25,14 @@ namespace RTC
PipeConsumer
::~
PipeConsumer
()
{
MS_TRACE
();
for
(
auto
&
kv
:
this
->
mapMappedSsrcRtpStream
)
{
auto
*
rtpStream
=
kv
.
second
;
delete
rtpStream
;
}
this
->
mapMappedSsrcRtpStream
.
clear
();
}
void
PipeConsumer
::
FillJson
(
json
&
jsonObject
)
const
...
...
@@ -166,9 +174,7 @@ namespace RTC
{
MS_TRACE
();
// Do nothing.
// TODO: Not sure yet.
// Do nothing since we do not enable NACK.
}
void
PipeConsumer
::
ReceiveKeyFrameRequest
(
RTC
::
RTCP
::
FeedbackPs
::
MessageType
messageType
)
...
...
@@ -191,7 +197,11 @@ namespace RTC
auto
&
rtpStream
=
kv
.
second
;
if
(
report
->
GetSsrc
()
==
ssrc
)
{
rtpStream
->
ReceiveRtcpReceiverReport
(
report
);
break
;
}
}
}
...
...
@@ -208,7 +218,7 @@ namespace RTC
rate
+=
rtpStream
->
GetRate
(
now
);
}
return
rate
/
this
->
mapMappedSsrcRtpStream
.
size
()
;
return
rate
;
}
float
PipeConsumer
::
GetLossPercentage
()
const
...
...
@@ -294,6 +304,7 @@ namespace RTC
for
(
auto
&
fb
:
mediaCodec
->
rtcpFeedback
)
{
// NOTE: Do not consider NACK in PipeConsumer.
if
(
!
params
.
usePli
&&
fb
.
type
==
"nack"
&&
fb
.
parameter
==
"pli"
)
{
MS_DEBUG_TAG
(
rtcp
,
"PLI supported"
);
...
...
@@ -309,8 +320,9 @@ namespace RTC
}
// Create a RtpStreamSend for sending a single media stream.
size_t
bufferSize
=
params
.
useNack
?
1500
:
0
;
auto
*
rtpStream
=
new
RTC
::
RtpStreamSend
(
this
,
params
,
bufferSize
);
// NOTE: PipeConsumer does not support NACK.
size_t
bufferSize
{
0
};
auto
*
rtpStream
=
new
RTC
::
RtpStreamSend
(
this
,
params
,
bufferSize
);
// If the Consumer is paused, tell the RtpStreamSend.
if
(
IsPaused
()
||
IsProducerPaused
())
...
...
@@ -344,7 +356,7 @@ namespace RTC
{
MS_TRACE
();
//
TODO: Not sure if we must do something here
.
//
Do nothing
.
}
inline
void
PipeConsumer
::
OnRtpStreamRetransmitRtpPacket
(
...
...
worker/src/RTC/Producer.cpp
浏览文件 @
685ef99e
...
...
@@ -322,7 +322,6 @@ namespace RTC
jsonObject
[
"rtpStreams"
]
=
json
::
array
();
auto
jsonRtpStreamsIt
=
jsonObject
.
find
(
"rtpStreams"
);
size_t
rtpStreamIdx
{
0
};
float
lossPercentage
{
0
};
for
(
auto
&
kv
:
this
->
mapSsrcRtpStream
)
{
...
...
@@ -333,16 +332,9 @@ namespace RTC
rtpStream
->
FillJson
(
jsonEntry
);
lossPercentage
+=
rtpStream
->
GetLossPercentage
();
++
rtpStreamIdx
;
}
if
(
!
this
->
mapSsrcRtpStream
.
empty
())
lossPercentage
=
lossPercentage
/
this
->
mapSsrcRtpStream
.
size
();
// Add lossPercentage.
jsonObject
[
"lossPercentage"
]
=
lossPercentage
;
// Add paused.
jsonObject
[
"paused"
]
=
this
->
paused
;
}
...
...
worker/src/RTC/SimulcastConsumer.cpp
浏览文件 @
685ef99e
...
...
@@ -63,7 +63,14 @@ namespace RTC
// Add rtpStream.
this
->
rtpStream
->
FillJson
(
jsonObject
[
"rtpStream"
]);
// TODO: Add layers, etc.
// Add preferredSpatialLayer.
jsonObject
[
"preferredSpatialLayer"
]
=
this
->
preferredSpatialLayer
;
// Add targetSpatialLayer.
jsonObject
[
"targetSpatialLayer"
]
=
this
->
targetSpatialLayer
;
// Add currentSpatialLayer.
jsonObject
[
"currentSpatialLayer"
]
=
this
->
currentSpatialLayer
;
}
void
SimulcastConsumer
::
FillJsonStats
(
json
&
jsonArray
)
const
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论