Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
85160d6b
提交
85160d6b
authored
5月 04, 2019
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove debugging logs
上级
8721a713
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
0 行增加
和
55 行删除
+0
-55
RtpStreamSend.cpp
worker/src/RTC/RtpStreamSend.cpp
+0
-55
没有找到文件。
worker/src/RTC/RtpStreamSend.cpp
浏览文件 @
85160d6b
...
@@ -99,8 +99,6 @@ namespace RTC
...
@@ -99,8 +99,6 @@ namespace RTC
// (FillRetransmissionContainer() did it).
// (FillRetransmissionContainer() did it).
auto
*
packet
=
storageItem
->
packet
;
auto
*
packet
=
storageItem
->
packet
;
MS_ERROR
(
"----- RETRANSMITTING PACKET seq:%"
PRIu16
,
packet
->
GetSequenceNumber
());
// Retransmit the packet.
// Retransmit the packet.
static_cast
<
RTC
::
RtpStreamSend
::
Listener
*>
(
this
->
listener
)
static_cast
<
RTC
::
RtpStreamSend
::
Listener
*>
(
this
->
listener
)
->
OnRtpStreamRetransmitRtpPacket
(
this
,
packet
);
->
OnRtpStreamRetransmitRtpPacket
(
this
,
packet
);
...
@@ -229,8 +227,6 @@ namespace RTC
...
@@ -229,8 +227,6 @@ namespace RTC
void
RtpStreamSend
::
StorePacket
(
RTC
::
RtpPacket
*
packet
)
void
RtpStreamSend
::
StorePacket
(
RTC
::
RtpPacket
*
packet
)
{
{
MS_ERROR
(
"<begin> seq:%"
PRIu16
,
packet
->
GetSequenceNumber
());
MS_TRACE
();
MS_TRACE
();
if
(
packet
->
GetSize
()
>
RTC
::
MtuSize
)
if
(
packet
->
GetSize
()
>
RTC
::
MtuSize
)
...
@@ -251,11 +247,6 @@ namespace RTC
...
@@ -251,11 +247,6 @@ namespace RTC
// Buffer is empty.
// Buffer is empty.
if
(
this
->
bufferSize
==
0
)
if
(
this
->
bufferSize
==
0
)
{
{
MS_ERROR
(
" --1-- seq:%"
PRIu16
", buffer empty, first item"
,
packet
->
GetSequenceNumber
());
MS_ASSERT
(
this
->
bufferStartIdx
==
0
,
"bufferStartIdx be 0"
);
MS_ASSERT
(
storageItem
==
nullptr
,
"storageItem should be nullptr"
);
// Take the first storage position.
// Take the first storage position.
storageItem
=
std
::
addressof
(
this
->
storage
[
0
]);
storageItem
=
std
::
addressof
(
this
->
storage
[
0
]);
this
->
buffer
[
seq
]
=
storageItem
;
this
->
buffer
[
seq
]
=
storageItem
;
...
@@ -268,18 +259,10 @@ namespace RTC
...
@@ -268,18 +259,10 @@ namespace RTC
// storage with the new packet or just ignore it (if duplicated packet).
// storage with the new packet or just ignore it (if duplicated packet).
else
if
(
storageItem
)
else
if
(
storageItem
)
{
{
MS_ERROR
(
" --2-- seq:%"
PRIu16
", buffer item used"
,
packet
->
GetSequenceNumber
());
auto
*
storedPacket
=
storageItem
->
packet
;
auto
*
storedPacket
=
storageItem
->
packet
;
if
(
packet
->
GetTimestamp
()
==
storedPacket
->
GetTimestamp
())
if
(
packet
->
GetTimestamp
()
==
storedPacket
->
GetTimestamp
())
{
MS_ERROR
(
" --2.1-- seq:%"
PRIu16
", duplicated packet, ignore"
,
packet
->
GetSequenceNumber
());
return
;
return
;
}
MS_ERROR
(
" --2.2-- seq:%"
PRIu16
", replacing stored packet"
,
packet
->
GetSequenceNumber
());
// Reset the storage item.
// Reset the storage item.
ResetStorageItem
(
storageItem
);
ResetStorageItem
(
storageItem
);
...
@@ -292,8 +275,6 @@ namespace RTC
...
@@ -292,8 +275,6 @@ namespace RTC
// Buffer not yet full, add an entry.
// Buffer not yet full, add an entry.
else
if
(
this
->
bufferSize
<
this
->
storage
.
size
())
else
if
(
this
->
bufferSize
<
this
->
storage
.
size
())
{
{
MS_ERROR
(
" --3-- seq:%"
PRIu16
", buffer not full yet"
,
packet
->
GetSequenceNumber
());
// Take the next storage position.
// Take the next storage position.
storageItem
=
std
::
addressof
(
this
->
storage
[
this
->
bufferSize
]);
storageItem
=
std
::
addressof
(
this
->
storage
[
this
->
bufferSize
]);
this
->
buffer
[
seq
]
=
storageItem
;
this
->
buffer
[
seq
]
=
storageItem
;
...
@@ -304,8 +285,6 @@ namespace RTC
...
@@ -304,8 +285,6 @@ namespace RTC
// Buffer full, remove oldest entry and add new one.
// Buffer full, remove oldest entry and add new one.
else
else
{
{
MS_ERROR
(
" --4-- seq:%"
PRIu16
", buffer full, removing oldest entry"
,
packet
->
GetSequenceNumber
());
auto
*
firstStorageItem
=
this
->
buffer
[
this
->
bufferStartIdx
];
auto
*
firstStorageItem
=
this
->
buffer
[
this
->
bufferStartIdx
];
// Reset the first storage item.
// Reset the first storage item.
...
@@ -322,40 +301,8 @@ namespace RTC
...
@@ -322,40 +301,8 @@ namespace RTC
this
->
buffer
[
seq
]
=
storageItem
;
this
->
buffer
[
seq
]
=
storageItem
;
}
}
// TODO: TMP
MS_ASSERT
(
storageItem
,
"upps 1"
);
MS_ASSERT
(
storageItem
->
packet
==
nullptr
,
"upps 2"
);
MS_ASSERT
(
storageItem
->
resentAtTime
==
0
,
"upps 3"
);
MS_ASSERT
(
storageItem
->
sentTimes
==
0
,
"upps 4"
);
MS_ASSERT
(
storageItem
->
rtxEncoded
==
false
,
"upps 5"
);
// Clone the packet into the retrieved storage item.
// Clone the packet into the retrieved storage item.
storageItem
->
packet
=
packet
->
Clone
(
storageItem
->
store
);
storageItem
->
packet
=
packet
->
Clone
(
storageItem
->
store
);
// TODO
MS_ERROR
(
"<BUFFER DUMP> bufferStartIdx:%"
PRIu16
", bufferSize:%zu"
,
this
->
bufferStartIdx
,
this
->
bufferSize
);
size_t
bufferItemCount
{
0
};
for
(
size_t
seq
{
0
};
seq
<
this
->
buffer
.
size
();
++
seq
)
{
auto
*
storageItem
=
this
->
buffer
[
seq
];
if
(
storageItem
)
{
// MS_ERROR(
// " - buffer item with storage item [seq:%zu, packet.seq:%" PRIu16 "]",
// seq, storageItem->packet->GetSequenceNumber());
bufferItemCount
++
;
}
}
MS_ERROR
(
"</BUFFER DUMP> items:%zu"
,
bufferItemCount
);
MS_ERROR
(
"<end> seq:%"
PRIu16
,
packet
->
GetSequenceNumber
());
}
}
void
RtpStreamSend
::
ClearBuffer
()
void
RtpStreamSend
::
ClearBuffer
()
...
@@ -417,8 +364,6 @@ namespace RTC
...
@@ -417,8 +364,6 @@ namespace RTC
if
(
storageItem
)
if
(
storageItem
)
{
{
MS_ERROR
(
"new bufferStartIdx: %"
PRIu16
,
seq
);
this
->
bufferStartIdx
=
seq
;
this
->
bufferStartIdx
=
seq
;
break
;
break
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论