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 <philipel@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Olov Brändström <brandstrom@google.com> Cr-Commit-Position: refs/heads/main@{#40764}
diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc index 70c11e5..2890b9b 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc
@@ -562,7 +562,13 @@ // Assume frequency is the same one for all video frames. kVideoPayloadTypeFrequency, rtp_packet.GetExtension<AbsoluteCaptureTimeExtension>())); - + if (packet_info.absolute_capture_time().has_value()) { + packet_info.set_local_capture_clock_offset( + capture_clock_offset_updater_.ConvertsToTimeDela( + capture_clock_offset_updater_.AdjustEstimatedCaptureClockOffset( + packet_info.absolute_capture_time() + ->estimated_capture_clock_offset))); + } RTPVideoHeader& video_header = packet->video_header; video_header.rotation = kVideoRotation_0; video_header.content_type = VideoContentType::UNSPECIFIED;