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 个修改的文件
包含
26 行增加
和
15 行删除
+26
-15
PipeConsumer.cpp
worker/src/RTC/PipeConsumer.cpp
+18
-6
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
...
@@ -25,6 +25,14 @@ namespace RTC
PipeConsumer
::~
PipeConsumer
()
PipeConsumer
::~
PipeConsumer
()
{
{
MS_TRACE
();
MS_TRACE
();
for
(
auto
&
kv
:
this
->
mapMappedSsrcRtpStream
)
{
auto
*
rtpStream
=
kv
.
second
;
delete
rtpStream
;
}
this
->
mapMappedSsrcRtpStream
.
clear
();
}
}
void
PipeConsumer
::
FillJson
(
json
&
jsonObject
)
const
void
PipeConsumer
::
FillJson
(
json
&
jsonObject
)
const
...
@@ -166,9 +174,7 @@ namespace RTC
...
@@ -166,9 +174,7 @@ namespace RTC
{
{
MS_TRACE
();
MS_TRACE
();
// Do nothing.
// Do nothing since we do not enable NACK.
// TODO: Not sure yet.
}
}
void
PipeConsumer
::
ReceiveKeyFrameRequest
(
RTC
::
RTCP
::
FeedbackPs
::
MessageType
messageType
)
void
PipeConsumer
::
ReceiveKeyFrameRequest
(
RTC
::
RTCP
::
FeedbackPs
::
MessageType
messageType
)
...
@@ -191,7 +197,11 @@ namespace RTC
...
@@ -191,7 +197,11 @@ namespace RTC
auto
&
rtpStream
=
kv
.
second
;
auto
&
rtpStream
=
kv
.
second
;
if
(
report
->
GetSsrc
()
==
ssrc
)
if
(
report
->
GetSsrc
()
==
ssrc
)
{
rtpStream
->
ReceiveRtcpReceiverReport
(
report
);
rtpStream
->
ReceiveRtcpReceiverReport
(
report
);
break
;
}
}
}
}
}
...
@@ -208,7 +218,7 @@ namespace RTC
...
@@ -208,7 +218,7 @@ namespace RTC
rate
+=
rtpStream
->
GetRate
(
now
);
rate
+=
rtpStream
->
GetRate
(
now
);
}
}
return
rate
/
this
->
mapMappedSsrcRtpStream
.
size
()
;
return
rate
;
}
}
float
PipeConsumer
::
GetLossPercentage
()
const
float
PipeConsumer
::
GetLossPercentage
()
const
...
@@ -294,6 +304,7 @@ namespace RTC
...
@@ -294,6 +304,7 @@ namespace RTC
for
(
auto
&
fb
:
mediaCodec
->
rtcpFeedback
)
for
(
auto
&
fb
:
mediaCodec
->
rtcpFeedback
)
{
{
// NOTE: Do not consider NACK in PipeConsumer.
// NOTE: Do not consider NACK in PipeConsumer.
if
(
!
params
.
usePli
&&
fb
.
type
==
"nack"
&&
fb
.
parameter
==
"pli"
)
if
(
!
params
.
usePli
&&
fb
.
type
==
"nack"
&&
fb
.
parameter
==
"pli"
)
{
{
MS_DEBUG_TAG
(
rtcp
,
"PLI supported"
);
MS_DEBUG_TAG
(
rtcp
,
"PLI supported"
);
...
@@ -309,7 +320,8 @@ namespace RTC
...
@@ -309,7 +320,8 @@ namespace RTC
}
}
// Create a RtpStreamSend for sending a single media stream.
// Create a RtpStreamSend for sending a single media stream.
size_t
bufferSize
=
params
.
useNack
?
1500
:
0
;
// NOTE: PipeConsumer does not support NACK.
size_t
bufferSize
{
0
};
auto
*
rtpStream
=
new
RTC
::
RtpStreamSend
(
this
,
params
,
bufferSize
);
auto
*
rtpStream
=
new
RTC
::
RtpStreamSend
(
this
,
params
,
bufferSize
);
// If the Consumer is paused, tell the RtpStreamSend.
// If the Consumer is paused, tell the RtpStreamSend.
...
@@ -344,7 +356,7 @@ namespace RTC
...
@@ -344,7 +356,7 @@ namespace RTC
{
{
MS_TRACE
();
MS_TRACE
();
//
TODO: Not sure if we must do something here
.
//
Do nothing
.
}
}
inline
void
PipeConsumer
::
OnRtpStreamRetransmitRtpPacket
(
inline
void
PipeConsumer
::
OnRtpStreamRetransmitRtpPacket
(
...
...
worker/src/RTC/Producer.cpp
浏览文件 @
685ef99e
...
@@ -322,7 +322,6 @@ namespace RTC
...
@@ -322,7 +322,6 @@ namespace RTC
jsonObject
[
"rtpStreams"
]
=
json
::
array
();
jsonObject
[
"rtpStreams"
]
=
json
::
array
();
auto
jsonRtpStreamsIt
=
jsonObject
.
find
(
"rtpStreams"
);
auto
jsonRtpStreamsIt
=
jsonObject
.
find
(
"rtpStreams"
);
size_t
rtpStreamIdx
{
0
};
size_t
rtpStreamIdx
{
0
};
float
lossPercentage
{
0
};
for
(
auto
&
kv
:
this
->
mapSsrcRtpStream
)
for
(
auto
&
kv
:
this
->
mapSsrcRtpStream
)
{
{
...
@@ -333,16 +332,9 @@ namespace RTC
...
@@ -333,16 +332,9 @@ namespace RTC
rtpStream
->
FillJson
(
jsonEntry
);
rtpStream
->
FillJson
(
jsonEntry
);
lossPercentage
+=
rtpStream
->
GetLossPercentage
();
++
rtpStreamIdx
;
++
rtpStreamIdx
;
}
}
if
(
!
this
->
mapSsrcRtpStream
.
empty
())
lossPercentage
=
lossPercentage
/
this
->
mapSsrcRtpStream
.
size
();
// Add lossPercentage.
jsonObject
[
"lossPercentage"
]
=
lossPercentage
;
// Add paused.
// Add paused.
jsonObject
[
"paused"
]
=
this
->
paused
;
jsonObject
[
"paused"
]
=
this
->
paused
;
}
}
...
...
worker/src/RTC/SimulcastConsumer.cpp
浏览文件 @
685ef99e
...
@@ -63,7 +63,14 @@ namespace RTC
...
@@ -63,7 +63,14 @@ namespace RTC
// Add rtpStream.
// Add rtpStream.
this
->
rtpStream
->
FillJson
(
jsonObject
[
"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
void
SimulcastConsumer
::
FillJsonStats
(
json
&
jsonArray
)
const
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论