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

Unified Diff: webrtc/modules/video_coding/frame_object.cc

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Fix uninitialized variables memcheck errors Created 3 years, 7 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/video_coding/frame_object.cc
diff --git a/webrtc/modules/video_coding/frame_object.cc b/webrtc/modules/video_coding/frame_object.cc
index f2a5ab27192ad33db16e2acf3517e1b2dede1219..1ca533a3c3174cd7b827fb0300cd177d8128005b 100644
--- a/webrtc/modules/video_coding/frame_object.cc
+++ b/webrtc/modules/video_coding/frame_object.cc
@@ -111,6 +111,30 @@ RtpFrameObject::RtpFrameObject(PacketBuffer* packet_buffer,
rotation_ = last_packet->video_header.rotation;
_rotation_set = true;
content_type_ = last_packet->video_header.content_type;
+ if (last_packet->video_header.video_timing.is_timing_frame) {
+ // ntp_time_ms_ may be -1 if not estimated yet. This is not a problem,
+ // as this will be dealt with at the time of reporting.
+ timing_.is_timing_frame = true;
+ timing_.encode_start_ms =
+ ntp_time_ms_ +
+ last_packet->video_header.video_timing.encode_start_ms_delta;
+ timing_.encode_finish_ms =
+ ntp_time_ms_ +
+ last_packet->video_header.video_timing.encode_finish_ms_delta;
+ timing_.packetization_finish_ms =
+ ntp_time_ms_ +
+ last_packet->video_header.video_timing.packetization_finish_ms_delta;
+ timing_.pacer_exit_ms =
+ ntp_time_ms_ +
+ last_packet->video_header.video_timing.pacer_exit_ms_delta;
+ timing_.network_timestamp_ms =
+ ntp_time_ms_ +
+ last_packet->video_header.video_timing.network_timstamp_ms_delta;
+ timing_.receive_start_ms = first_packet->receive_time_ms;
+ timing_.receive_finish_ms = last_packet->receive_time_ms;
+ } else {
+ timing_.is_timing_frame = false;
+ }
}
RtpFrameObject::~RtpFrameObject() {

Powered by Google App Engine
This is Rietveld 408576698