Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Implement Holmer@ comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()) {
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698