Add a flags field to video timing extension.
The rtp header extension for video timing shuold have an additional
field for signaling metadata, such as what triggered the extension for
this particular frame. This will allow separating frames select because
of outlier sizes from regular frames, for more accurate stats.
This implementation is backwards compatible in that it can read video
timing extensions without the new flag field, but it always sends with
it included.
BUG=webrtc:7594
Review-Url: https://codereview.webrtc.org/3000753002
Cr-Commit-Position: refs/heads/master@{#19353}
diff --git a/webrtc/modules/video_coding/frame_buffer.cc b/webrtc/modules/video_coding/frame_buffer.cc
index f67210f..41c7fc8 100644
--- a/webrtc/modules/video_coding/frame_buffer.cc
+++ b/webrtc/modules/video_coding/frame_buffer.cc
@@ -164,8 +164,7 @@
rotation_ = packet.video_header.rotation;
_rotation_set = true;
content_type_ = packet.video_header.content_type;
- if (packet.video_header.video_timing.is_timing_frame) {
- timing_.is_timing_frame = true;
+ if (packet.video_header.video_timing.flags != TimingFrameFlags::kInvalid) {
timing_.encode_start_ms =
ntp_time_ms_ + packet.video_header.video_timing.encode_start_delta_ms;
timing_.encode_finish_ms =
@@ -182,9 +181,8 @@
timing_.network2_timestamp_ms =
ntp_time_ms_ +
packet.video_header.video_timing.network2_timstamp_delta_ms;
- } else {
- timing_.is_timing_frame = false;
}
+ timing_.flags = packet.video_header.video_timing.flags;
}
if (packet.is_first_packet_in_frame) {