Index: webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc |
index 3f4c401a19d5c43ff9f64c6a9e3bd14d60ff9fb6..41af62b9faa3c6622d7d00086371b9a8c4774e33 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc |
@@ -304,6 +304,7 @@ bool RTPSenderVideo::SendVideo(RtpVideoCodecTypes video_type, |
auto last_packet = rtc::MakeUnique<RtpPacketToSend>(*rtp_header); |
size_t fec_packet_overhead; |
+ bool is_timing_frame = false; |
bool red_enabled; |
int32_t retransmission_settings; |
{ |
@@ -332,6 +333,11 @@ bool RTPSenderVideo::SendVideo(RtpVideoCodecTypes video_type, |
last_packet->SetExtension<VideoContentTypeExtension>( |
video_header->content_type); |
} |
+ if (video_header->video_timing.is_timing_frame) { |
+ last_packet->SetExtension<VideoTimingExtension>( |
+ video_header->video_timing); |
+ is_timing_frame = true; |
+ } |
} |
// FEC settings. |
@@ -388,6 +394,11 @@ bool RTPSenderVideo::SendVideo(RtpVideoCodecTypes video_type, |
if (!rtp_sender_->AssignSequenceNumber(packet.get())) |
return false; |
+ // Put packetization finish timestamp into extension. |
+ if (last && is_timing_frame) { |
+ packet->set_packetization_finish_time_ms(clock_->TimeInMilliseconds()); |
+ } |
+ |
const bool protect_packet = |
(packetizer->GetProtectionType() == kProtectedPacket); |
if (flexfec_enabled()) { |