Set the local capture clock offset on RtpPacketInfo when depacketizing frames.
Bug: b/150859541 Change-Id: I09f871bef8523cdef31ebd88d1cf25307463f380 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235360 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Paul Hallak <phallak@google.com> Cr-Commit-Position: refs/heads/main@{#35219}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
ad22572986
commit
8a2e375eb7
@ -652,13 +652,20 @@ void RtpVideoStreamReceiver::OnReceivedPayloadData(
|
|||||||
.first->second;
|
.first->second;
|
||||||
|
|
||||||
// Try to extrapolate absolute capture time if it is missing.
|
// Try to extrapolate absolute capture time if it is missing.
|
||||||
packet_info.set_absolute_capture_time(
|
absl::optional<AbsoluteCaptureTime> absolute_capture_time =
|
||||||
absolute_capture_time_interpolator_.OnReceivePacket(
|
absolute_capture_time_interpolator_.OnReceivePacket(
|
||||||
AbsoluteCaptureTimeInterpolator::GetSource(packet_info.ssrc(),
|
AbsoluteCaptureTimeInterpolator::GetSource(packet_info.ssrc(),
|
||||||
packet_info.csrcs()),
|
packet_info.csrcs()),
|
||||||
packet_info.rtp_timestamp(),
|
packet_info.rtp_timestamp(),
|
||||||
// Assume frequency is the same one for all video frames.
|
// Assume frequency is the same one for all video frames.
|
||||||
kVideoPayloadTypeFrequency, packet_info.absolute_capture_time()));
|
kVideoPayloadTypeFrequency, packet_info.absolute_capture_time());
|
||||||
|
packet_info.set_absolute_capture_time(absolute_capture_time);
|
||||||
|
|
||||||
|
if (absolute_capture_time.has_value()) {
|
||||||
|
packet_info.set_local_capture_clock_offset(
|
||||||
|
capture_clock_offset_updater_.AdjustEstimatedCaptureClockOffset(
|
||||||
|
absolute_capture_time->estimated_capture_clock_offset));
|
||||||
|
}
|
||||||
|
|
||||||
insert_result = packet_buffer_.InsertPacket(std::move(packet));
|
insert_result = packet_buffer_.InsertPacket(std::move(packet));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user