Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
3b4330ca
提交
3b4330ca
authored
5月 03, 2019
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
WIP
上级
b9f7a216
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
17 行增加
和
16 行删除
+17
-16
RtpStreamSend.cpp
worker/src/RTC/RtpStreamSend.cpp
+16
-15
TestRtpStreamSend.cpp
worker/test/src/RTC/TestRtpStreamSend.cpp
+1
-1
没有找到文件。
worker/src/RTC/RtpStreamSend.cpp
浏览文件 @
3b4330ca
...
@@ -79,8 +79,6 @@ namespace RTC
...
@@ -79,8 +79,6 @@ namespace RTC
{
{
MS_TRACE
();
MS_TRACE
();
MS_ERROR
(
"--begin--"
);
this
->
nackCount
++
;
this
->
nackCount
++
;
for
(
auto
it
=
nackPacket
->
Begin
();
it
!=
nackPacket
->
End
();
++
it
)
for
(
auto
it
=
nackPacket
->
Begin
();
it
!=
nackPacket
->
End
();
++
it
)
...
@@ -93,8 +91,6 @@ namespace RTC
...
@@ -93,8 +91,6 @@ namespace RTC
for
(
auto
*
bufferItem
:
RetransmissionContainer
)
for
(
auto
*
bufferItem
:
RetransmissionContainer
)
{
{
MS_ERROR
(
"-- . --"
);
if
(
bufferItem
==
nullptr
)
if
(
bufferItem
==
nullptr
)
break
;
break
;
...
@@ -116,8 +112,6 @@ namespace RTC
...
@@ -116,8 +112,6 @@ namespace RTC
RTC
::
RtpStream
::
PacketRepaired
(
packet
);
RTC
::
RtpStream
::
PacketRepaired
(
packet
);
}
}
}
}
MS_ERROR
(
"--end--"
);
}
}
void
RtpStreamSend
::
ReceiveKeyFrameRequest
(
RTC
::
RTCP
::
FeedbackPs
::
MessageType
messageType
)
void
RtpStreamSend
::
ReceiveKeyFrameRequest
(
RTC
::
RTCP
::
FeedbackPs
::
MessageType
messageType
)
...
@@ -238,8 +232,6 @@ namespace RTC
...
@@ -238,8 +232,6 @@ namespace RTC
*/
*/
inline
void
RtpStreamSend
::
UpdateBufferStartIdx
()
inline
void
RtpStreamSend
::
UpdateBufferStartIdx
()
{
{
MS_ERROR
(
"------- start ------"
);
uint16_t
seq
=
this
->
bufferStartIdx
+
1
;
uint16_t
seq
=
this
->
bufferStartIdx
+
1
;
for
(
uint32_t
idx
{
0
};
idx
<
65536
;
++
idx
,
++
seq
)
for
(
uint32_t
idx
{
0
};
idx
<
65536
;
++
idx
,
++
seq
)
...
@@ -255,8 +247,6 @@ namespace RTC
...
@@ -255,8 +247,6 @@ namespace RTC
break
;
break
;
}
}
}
}
MS_ERROR
(
"------- end ------"
);
}
}
void
RtpStreamSend
::
ClearRetransmissionBuffer
()
void
RtpStreamSend
::
ClearRetransmissionBuffer
()
...
@@ -334,7 +324,7 @@ namespace RTC
...
@@ -334,7 +324,7 @@ namespace RTC
UpdateBufferStartIdx
();
UpdateBufferStartIdx
();
}
}
// Buffer not yet full, add an entry.
// Buffer not yet full, add an entry.
else
if
(
this
->
bufferSize
<
this
->
storage
.
size
()
-
1
)
else
if
(
this
->
bufferSize
<
this
->
storage
.
size
())
{
{
MS_ERROR
(
"--3-- seq:%"
PRIu16
", buffer not full yet"
,
packet
->
GetSequenceNumber
());
MS_ERROR
(
"--3-- seq:%"
PRIu16
", buffer not full yet"
,
packet
->
GetSequenceNumber
());
...
@@ -366,6 +356,21 @@ namespace RTC
...
@@ -366,6 +356,21 @@ namespace RTC
bufferItem
.
packet
=
packet
->
Clone
(
store
);
bufferItem
.
packet
=
packet
->
Clone
(
store
);
MS_ERROR
(
"--end-- seq:%"
PRIu16
,
packet
->
GetSequenceNumber
());
MS_ERROR
(
"--end-- seq:%"
PRIu16
,
packet
->
GetSequenceNumber
());
// TODO
MS_ERROR
(
"<BUFFER DUMP> bufferStartIdx:%"
PRIu16
", bufferSize:%zu"
,
this
->
bufferStartIdx
,
this
->
bufferSize
);
for
(
size_t
seq
{
0
};
seq
<
this
->
buffer
.
size
();
++
seq
)
{
auto
&
bufferItem
=
this
->
buffer
[
seq
];
if
(
bufferItem
.
packet
)
MS_ERROR
(
" - item buffer with packet: seq:%zu"
,
seq
);
}
MS_ERROR
(
"</BUFFER DUMP>"
);
}
}
// This method looks for the requested RTP packets and inserts them into the
// This method looks for the requested RTP packets and inserts them into the
...
@@ -377,8 +382,6 @@ namespace RTC
...
@@ -377,8 +382,6 @@ namespace RTC
{
{
MS_TRACE
();
MS_TRACE
();
MS_ERROR
(
"--begin-- seq:%"
PRIu16
,
seq
);
// Ensure the container's first element is 0.
// Ensure the container's first element is 0.
RetransmissionContainer
[
0
]
=
nullptr
;
RetransmissionContainer
[
0
]
=
nullptr
;
...
@@ -527,8 +530,6 @@ namespace RTC
...
@@ -527,8 +530,6 @@ namespace RTC
// Set the next container element to null.
// Set the next container element to null.
RetransmissionContainer
[
containerIdx
]
=
nullptr
;
RetransmissionContainer
[
containerIdx
]
=
nullptr
;
MS_ERROR
(
"--end-- seq:%"
PRIu16
,
seq
);
}
}
void
RtpStreamSend
::
UpdateScore
(
RTC
::
RTCP
::
ReceiverReport
*
report
)
void
RtpStreamSend
::
UpdateScore
(
RTC
::
RTCP
::
ReceiverReport
*
report
)
...
...
worker/test/src/RTC/TestRtpStreamSend.cpp
浏览文件 @
3b4330ca
...
@@ -94,7 +94,7 @@ SCENARIO("NACK and RTP packets retransmission", "[rtp][rtcp]")
...
@@ -94,7 +94,7 @@ SCENARIO("NACK and RTP packets retransmission", "[rtp][rtcp]")
params
.
useNack
=
true
;
params
.
useNack
=
true
;
// Create a RtpStreamSend.
// Create a RtpStreamSend.
RtpStreamSend
*
stream
=
new
RtpStreamSend
(
&
testRtpStreamListener
,
params
,
3
);
RtpStreamSend
*
stream
=
new
RtpStreamSend
(
&
testRtpStreamListener
,
params
,
5
);
// Receive all the packets (some of them not in order and/or duplicated).
// Receive all the packets (some of them not in order and/or duplicated).
stream
->
ReceivePacket
(
packet1
);
stream
->
ReceivePacket
(
packet1
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论