Skip to content

Commit 7cdf66f

Browse files
Olov BrändströmWebRTC LUCI CQ
authored andcommitted
Add local capture clock offset to video RtpPacketInfos
Start to save local capture clock offset for video. This is part of a effort to add End 2 End metric on Android. Bug: None Change-Id: Icd6e567faf66f1dc200d8661344708356bda470b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320300 Reviewed-by: Philip Eliasson <[email protected]> Reviewed-by: Rasmus Brandt <[email protected]> Commit-Queue: Olov Brändström <[email protected]> Cr-Commit-Position: refs/heads/main@{#40764}
1 parent b916a70 commit 7cdf66f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

video/rtp_video_stream_receiver2.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,13 @@ void RtpVideoStreamReceiver2::OnReceivedPayloadData(
562562
// Assume frequency is the same one for all video frames.
563563
kVideoPayloadTypeFrequency,
564564
rtp_packet.GetExtension<AbsoluteCaptureTimeExtension>()));
565-
565+
if (packet_info.absolute_capture_time().has_value()) {
566+
packet_info.set_local_capture_clock_offset(
567+
capture_clock_offset_updater_.ConvertsToTimeDela(
568+
capture_clock_offset_updater_.AdjustEstimatedCaptureClockOffset(
569+
packet_info.absolute_capture_time()
570+
->estimated_capture_clock_offset)));
571+
}
566572
RTPVideoHeader& video_header = packet->video_header;
567573
video_header.rotation = kVideoRotation_0;
568574
video_header.content_type = VideoContentType::UNSPECIFIED;

0 commit comments

Comments
 (0)