Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
1be3f4f9
提交
1be3f4f9
authored
4月 20, 2020
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
WIP: revert DepLibUV int64 helpers
上级
dbb45993
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
39 行增加
和
35 行删除
+39
-35
transport_feedback_adapter.cc
...s/congestion_controller/rtp/transport_feedback_adapter.cc
+29
-2
DepLibUV.hpp
worker/include/DepLibUV.hpp
+6
-30
FeedbackRtpTransport.cpp
worker/src/RTC/RTCP/FeedbackRtpTransport.cpp
+1
-1
TransportCongestionControlServer.cpp
worker/src/RTC/TransportCongestionControlServer.cpp
+3
-2
没有找到文件。
worker/deps/libwebrtc/libwebrtc/modules/congestion_controller/rtp/transport_feedback_adapter.cc
浏览文件 @
1be3f4f9
...
...
@@ -25,6 +25,10 @@
#include <cmath>
#include <utility>
// TODO: Issue 357 stuff.
static
uint8_t
Issue357LastFeedbackBuffer
[
65536
];
static
size_t
Issue357LastFeedbackSize
{
0u
};
namespace
webrtc
{
namespace
{
...
...
@@ -184,7 +188,7 @@ std::vector<PacketFeedback> TransportFeedbackAdapter::GetPacketFeedbackVector(
mediasoup_helpers
::
FeedbackRtpTransport
::
GetBaseDeltaUs
(
&
feedback
,
last_timestamp_us_
)
/
1000
;
}
//
NOTE: Debug for https://github.com/versatica/mediasoup/issues/357
.
//
TODO (issue 357)
.
int64_t
prev_last_timestamp_us
=
last_timestamp_us_
;
last_timestamp_us_
=
...
...
@@ -222,7 +226,7 @@ std::vector<PacketFeedback> TransportFeedbackAdapter::GetPacketFeedbackVector(
// NOTE: Debug for https://github.com/versatica/mediasoup/issues/357.
if
(
timestamp_ms
<
0
)
{
MS_ERROR
(
"timestamps_ms < 0 [timestamp_ms:%"
PRIi64
MS_ERROR
(
"
[ISSUE 357]
timestamps_ms < 0 [timestamp_ms:%"
PRIi64
", current_offset_ms_:%"
PRIi64
", offset_us:%"
PRIi64
", last_timestamp_us_:%"
PRIi64
...
...
@@ -235,6 +239,24 @@ std::vector<PacketFeedback> TransportFeedbackAdapter::GetPacketFeedbackVector(
prev_last_timestamp_us
,
feedback
.
GetReferenceTimestamp
()
);
if
(
Issue357LastFeedbackSize
>
0
)
{
auto
*
previousFeedback
=
RTC
::
RTCP
::
FeedbackRtpTransportPacket
::
Parse
(
Issue357LastFeedbackBuffer
,
Issue357LastFeedbackSize
);
MS_ERROR
(
"[ISSUE 357] previousFeedback.dump():"
);
previousFeedback
->
Dump
();
MS_ERROR
(
"[ISSUE 357] MS_DUMP_DATA(previousFeedback):"
);
MS_DUMP_DATA
(
previousFeedback
->
GetData
(),
previousFeedback
->
GetSize
());
delete
previousFeedback
;
}
// TODO: TMP for issue 357.
MS_ERROR
(
"[ISSUE 357] feedback.dump():"
);
feedback
.
Dump
();
MS_ERROR
(
"[ISSUE 357] MS_DUMP_DATA(feedback):"
);
MS_DUMP_DATA
(
feedback
.
GetData
(),
feedback
.
GetSize
());
}
PacketFeedback
packet_feedback
(
timestamp_ms
,
packet
.
sequence_number
());
...
...
@@ -254,6 +276,11 @@ std::vector<PacketFeedback> TransportFeedbackAdapter::GetPacketFeedbackVector(
(
failed_lookups
>
1
?
"s"
:
""
));
}
}
// TODO (issue 357): Store this feedback.
std
::
memcpy
(
Issue357LastFeedbackBuffer
,
feedback
.
GetData
(),
feedback
.
GetSize
());
Issue357LastFeedbackSize
=
feedback
.
GetSize
();
return
packet_feedback_vector
;
}
...
...
worker/include/DepLibUV.hpp
浏览文件 @
1be3f4f9
...
...
@@ -3,7 +3,6 @@
#include "common.hpp"
#include <uv.h>
#include <limits>
class
DepLibUV
{
...
...
@@ -28,40 +27,17 @@ public:
{
return
uv_hrtime
();
}
// Used within libwebrtc dependency which uses int64_t
possitive values for
//
time
representation.
// Used within libwebrtc dependency which uses int64_t
values for time
// representation.
static
int64_t
GetTimeMsInt64
()
{
static
constexpr
uint64_t
MaxInt64
{
std
::
numeric_limits
<
int64_t
>::
max
()
};
uint64_t
time
=
DepLibUV
::
GetTimeMs
();
if
(
time
>
MaxInt64
)
time
-=
MaxInt64
-
1
;
return
static_cast
<
int64_t
>
(
time
);
return
static_cast
<
int64_t
>
(
DepLibUV
::
GetTimeMs
());
}
// Used within libwebrtc dependency which uses int64_t
possitive values for
//
time
representation.
// Used within libwebrtc dependency which uses int64_t
values for time
// representation.
static
int64_t
GetTimeUsInt64
()
{
static
constexpr
uint64_t
MaxInt64
{
std
::
numeric_limits
<
int64_t
>::
max
()
};
uint64_t
time
=
DepLibUV
::
GetTimeUs
();
if
(
time
>
MaxInt64
)
time
-=
MaxInt64
-
1
;
return
static_cast
<
int64_t
>
(
time
);
}
static
int64_t
TimeMs2TimeMsInt64
(
uint64_t
time
)
{
static
constexpr
uint64_t
MaxInt64
{
std
::
numeric_limits
<
int64_t
>::
max
()
};
if
(
time
>
MaxInt64
)
time
-=
MaxInt64
-
1
;
return
static_cast
<
int64_t
>
(
time
);
return
static_cast
<
int64_t
>
(
DepLibUV
::
GetTimeUs
());
}
private
:
...
...
worker/src/RTC/RTCP/FeedbackRtpTransport.cpp
浏览文件 @
1be3f4f9
...
...
@@ -116,7 +116,7 @@ namespace RTC
this
->
baseSequenceNumber
=
Utils
::
Byte
::
Get2Bytes
(
data
,
0
);
this
->
packetStatusCount
=
Utils
::
Byte
::
Get2Bytes
(
data
,
2
);
this
->
referenceTime
=
parseReferenceTime
(
data
+
4
u
);
this
->
referenceTime
=
parseReferenceTime
(
data
+
4
);
this
->
feedbackPacketCount
=
Utils
::
Byte
::
Get1Byte
(
data
,
7
);
this
->
size
=
len
;
...
...
worker/src/RTC/TransportCongestionControlServer.cpp
浏览文件 @
1be3f4f9
...
...
@@ -181,8 +181,9 @@ namespace RTC
break
;
// NOTE: nowMs is uint64_t but we need to "convert" it to int64_t before
// we give it to libwebrtc lib.
auto
nowMsInt64
=
DepLibUV
::
TimeMs2TimeMsInt64
(
nowMs
);
// we give it to libwebrtc lib (althought this is implicit in the
// conversion so it would be converted within the method call).
auto
nowMsInt64
=
static_cast
<
int64_t
>
(
nowMs
);
this
->
rembServer
->
IncomingPacket
(
nowMsInt64
,
packet
->
GetPayloadLength
(),
*
packet
,
absSendTime
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论