Don't attempt to unwrap RTP timestamps for RTX stream.

This fixes a bug where the event_log_visualizer hits a DCHECK when the RTP timestamp jumps.

TBR = kwiberg

Bug: webrtc:10170
Change-Id: I127a8e6165265d0726892a912f5bcdc33d98ced5
Reviewed-on: https://webrtc-review.googlesource.com/c/119664
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26410}
This commit is contained in:
Bjorn Terelius
2019-01-25 11:05:04 +01:00
committed by Commit Bot
parent 44b31d64ed
commit 18f65dc20a
2 changed files with 13 additions and 7 deletions

View File

@ -1891,12 +1891,18 @@ std::vector<LoggedPacketInfo> ParsedRtcEventLog::GetPacketInfos(
auto rtp_handler = [&](const LoggedRtpPacket& rtp) {
advance_time(Timestamp::ms(rtp.log_time_ms()));
MediaStreamInfo* stream = &streams[rtp.header.ssrc];
Timestamp capture_time = Timestamp::MinusInfinity();
if (!stream->rtx) {
// RTX copy the timestamp of the retransmitted packets. This means that
// RTX streams don't have a unique clock offset and frequency, so
// the RTP timstamps can't be unwrapped.
uint64_t capture_ticks =
stream->unwrap_capture_ticks.Unwrap(rtp.header.timestamp);
// TODO(srte): Use logged sample rate when it is added to the format.
Timestamp capture_time = Timestamp::seconds(
capture_time = Timestamp::seconds(
capture_ticks /
(stream->media_type == LoggedMediaType::kAudio ? 48000.0 : 90000.0));
}
LoggedPacketInfo logged(rtp, stream->media_type, stream->rtx, capture_time);
logged.overhead = current_overhead;
if (rtp.header.extension.hasTransportSequenceNumber) {

View File

@ -23,7 +23,7 @@ namespace webrtc {
namespace rtc_units_impl {
// UnitBase is a base class for implementing custom value types with a specific
// unit. It provides type safety and sommonly useful operations. The undelying
// unit. It provides type safety and commonly useful operations. The underlying
// storage is always an int64_t, it's up to the unit implementation to choose
// what scale it represents.
//