Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
e7e645b0
提交
e7e645b0
authored
12月 29, 2016
作者:
José Luis Millán
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Retrieve RTP packets requested in NACK request
上级
38549e17
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
22 行增加
和
16 行删除
+22
-16
RtpReceiver.h
worker/include/RTC/RtpReceiver.h
+1
-1
RtpStream.h
worker/include/RTC/RtpStream.h
+1
-1
RtpReceiver.cpp
worker/src/RTC/RtpReceiver.cpp
+2
-2
RtpStream.cpp
worker/src/RTC/RtpStream.cpp
+18
-12
没有找到文件。
worker/include/RTC/RtpReceiver.h
浏览文件 @
e7e645b0
...
@@ -46,7 +46,7 @@ namespace RTC
...
@@ -46,7 +46,7 @@ namespace RTC
void
RemoveTransport
(
RTC
::
Transport
*
transport
);
void
RemoveTransport
(
RTC
::
Transport
*
transport
);
RTC
::
RtpParameters
*
GetParameters
();
RTC
::
RtpParameters
*
GetParameters
();
void
ReceiveRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
ReceiveRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
RequestRtpRetransmission
(
uint16_t
seq
,
uint16_t
count
,
std
::
vector
<
RTC
::
RtpPacket
*>&
container
);
void
RequestRtpRetransmission
(
uint16_t
seq
,
uint16_t
bitmask
,
std
::
vector
<
RTC
::
RtpPacket
*>&
container
);
// TODO
// TODO
void
ReceiveRtcpReceiverReport
(
RTC
::
RTCP
::
ReceiverReport
*
report
);
void
ReceiveRtcpReceiverReport
(
RTC
::
RTCP
::
ReceiverReport
*
report
);
RTC
::
RTCP
::
ReceiverReport
*
GetRtcpReceiverReport
();
RTC
::
RTCP
::
ReceiverReport
*
GetRtcpReceiverReport
();
...
...
worker/include/RTC/RtpStream.h
浏览文件 @
e7e645b0
...
@@ -28,7 +28,7 @@ namespace RTC
...
@@ -28,7 +28,7 @@ namespace RTC
~
RtpStream
();
~
RtpStream
();
bool
ReceivePacket
(
RTC
::
RtpPacket
*
packet
);
bool
ReceivePacket
(
RTC
::
RtpPacket
*
packet
);
void
RequestRtpRetransmission
(
uint16_t
seq
,
uint16_t
count
,
std
::
vector
<
RTC
::
RtpPacket
*>&
container
);
void
RequestRtpRetransmission
(
uint16_t
seq
,
uint16_t
bitmask
,
std
::
vector
<
RTC
::
RtpPacket
*>&
container
);
private
:
private
:
void
InitSeq
(
uint16_t
seq
);
void
InitSeq
(
uint16_t
seq
);
...
...
worker/src/RTC/RtpReceiver.cpp
浏览文件 @
e7e645b0
...
@@ -265,13 +265,13 @@ namespace RTC
...
@@ -265,13 +265,13 @@ namespace RTC
}
}
}
}
void
RtpReceiver
::
RequestRtpRetransmission
(
uint16_t
seq
,
uint16_t
count
,
std
::
vector
<
RTC
::
RtpPacket
*>&
container
)
void
RtpReceiver
::
RequestRtpRetransmission
(
uint16_t
seq
,
uint16_t
bitmask
,
std
::
vector
<
RTC
::
RtpPacket
*>&
container
)
{
{
MS_TRACE
();
MS_TRACE
();
// Proxy the request to the RtpStream.
// Proxy the request to the RtpStream.
if
(
this
->
rtpStream
)
if
(
this
->
rtpStream
)
this
->
rtpStream
->
RequestRtpRetransmission
(
seq
,
count
,
container
);
this
->
rtpStream
->
RequestRtpRetransmission
(
seq
,
bitmask
,
container
);
}
}
void
RtpReceiver
::
FillRtpParameters
()
void
RtpReceiver
::
FillRtpParameters
()
...
...
worker/src/RTC/RtpStream.cpp
浏览文件 @
e7e645b0
...
@@ -66,10 +66,13 @@ namespace RTC
...
@@ -66,10 +66,13 @@ namespace RTC
// 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
// given container (and set to null the next container position).
// given container (and set to null the next container position).
void
RtpStream
::
RequestRtpRetransmission
(
uint16_t
seq
,
uint16_t
count
,
std
::
vector
<
RTC
::
RtpPacket
*>&
container
)
void
RtpStream
::
RequestRtpRetransmission
(
uint16_t
seq
,
uint16_t
bitmask
,
std
::
vector
<
RTC
::
RtpPacket
*>&
container
)
{
{
MS_TRACE
();
MS_TRACE
();
// 17: 16 bit mask + the initial sequence number.
static
size_t
maxRequestedPackets
=
17
;
// First of all, set the first element of the container to null so, in case
// First of all, set the first element of the container to null so, in case
// no packet is inserted into it, the reader will know it.
// no packet is inserted into it, the reader will know it.
container
[
0
]
=
nullptr
;
container
[
0
]
=
nullptr
;
...
@@ -80,13 +83,11 @@ namespace RTC
...
@@ -80,13 +83,11 @@ namespace RTC
// Convert the given sequence numbers to 32 bits.
// Convert the given sequence numbers to 32 bits.
uint32_t
first_seq32
=
(
uint32_t
)
seq
+
this
->
cycles
;
uint32_t
first_seq32
=
(
uint32_t
)
seq
+
this
->
cycles
;
uint32_t
last_seq32
=
first_seq32
+
(
uint32_t
)
count
-
1
;
uint32_t
last_seq32
=
first_seq32
+
maxRequestedPackets
-
1
;
size_t
container_idx
=
0
;
size_t
container_idx
=
0
;
// Number of requested packets cannot be greater than the container size - 1
// Number of requested packets cannot be greater than the container size - 1
// (note: leave the last element be null). If so, remove the younger ones.
MS_ASSERT
(
container
.
size
()
-
1
>=
maxRequestedPackets
,
"RtpPacket container is too small"
);
if
((
size_t
)
count
>
container
.
size
()
-
1
)
first_seq32
=
last_seq32
-
uint32_t
(
container
.
size
()
-
1
);
auto
buffer_it
=
this
->
buffer
.
begin
();
auto
buffer_it
=
this
->
buffer
.
begin
();
auto
buffer_it_r
=
this
->
buffer
.
rbegin
();
auto
buffer_it_r
=
this
->
buffer
.
rbegin
();
...
@@ -113,15 +114,15 @@ namespace RTC
...
@@ -113,15 +114,15 @@ namespace RTC
}
}
}
}
// Filter non present packets.
if
(
first_seq32
<
buffer_first_seq32
)
first_seq32
=
buffer_first_seq32
;
if
(
last_seq32
>
buffer_last_seq32
)
last_seq32
=
buffer_last_seq32
;
// Look for each requested packet.
// Look for each requested packet.
for
(
uint32_t
seq32
=
first_seq32
;
seq32
<=
last_seq32
;
seq32
++
)
uint32_t
seq32
=
first_seq32
;
bool
requested
=
true
;
do
{
{
if
(
!
requested
)
continue
;
for
(;
buffer_it
!=
this
->
buffer
.
end
();
buffer_it
++
)
for
(;
buffer_it
!=
this
->
buffer
.
end
();
buffer_it
++
)
{
{
auto
current_seq32
=
(
*
buffer_it
).
seq32
;
auto
current_seq32
=
(
*
buffer_it
).
seq32
;
...
@@ -137,7 +138,12 @@ namespace RTC
...
@@ -137,7 +138,12 @@ namespace RTC
break
;
break
;
}
}
}
}
requested
=
(
bitmask
&
1
)
?
true
:
false
;
bitmask
>>=
1
;
seq32
++
;
}
}
while
(
bitmask
!=
0
);
// Set the next container element to null.
// Set the next container element to null.
container
[
container_idx
]
=
nullptr
;
container
[
container_idx
]
=
nullptr
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论