Add absolute capture time property to rtp sources.

This part of the effort to implement A/V sync metric.

Bug: webrtc:10739
Change-Id: I4adba1b99b37b31868168e37d9aa8e03f8ea6d4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159886
Commit-Queue: Ruslan Burakov <kuddai@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ruslan Burakov <kuddai@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29849}
This commit is contained in:
Ruslan Burakov
2019-11-20 16:48:34 +01:00
committed by Commit Bot
parent bb55e0bc72
commit d51cc7bd71
5 changed files with 86 additions and 28 deletions

View File

@ -34,6 +34,7 @@ void SourceTracker::OnFrameDelivered(const RtpPacketInfos& packet_infos) {
entry.timestamp_ms = now_ms;
entry.audio_level = packet_info.audio_level();
entry.absolute_capture_time = packet_info.absolute_capture_time();
entry.rtp_timestamp = packet_info.rtp_timestamp();
}
@ -42,6 +43,7 @@ void SourceTracker::OnFrameDelivered(const RtpPacketInfos& packet_infos) {
entry.timestamp_ms = now_ms;
entry.audio_level = packet_info.audio_level();
entry.absolute_capture_time = packet_info.absolute_capture_time();
entry.rtp_timestamp = packet_info.rtp_timestamp();
}
@ -60,8 +62,9 @@ std::vector<RtpSource> SourceTracker::GetSources() const {
const SourceKey& key = pair.first;
const SourceEntry& entry = pair.second;
sources.emplace_back(entry.timestamp_ms, key.source, key.source_type,
entry.audio_level, entry.rtp_timestamp);
sources.emplace_back(
entry.timestamp_ms, key.source, key.source_type, entry.rtp_timestamp,
RtpSource::Extensions{entry.audio_level, entry.absolute_capture_time});
}
return sources;