| Index: webrtc/modules/video_coding/generic_encoder.cc
|
| diff --git a/webrtc/modules/video_coding/generic_encoder.cc b/webrtc/modules/video_coding/generic_encoder.cc
|
| index 78eeef288a2e7046c00adc934d438769ab9177a3..4c2a69964a5d17edeb769adcc5db560373a9c318 100644
|
| --- a/webrtc/modules/video_coding/generic_encoder.cc
|
| +++ b/webrtc/modules/video_coding/generic_encoder.cc
|
| @@ -231,7 +231,7 @@ EncodedImageCallback::Result VCMEncodedFrameCallback::OnEncodedImage(
|
|
|
| rtc::Optional<size_t> outlier_frame_size;
|
| rtc::Optional<int64_t> encode_start_ms;
|
| - bool is_timing_frame = false;
|
| + uint8_t timing_flags = TimingFrameFlags::kInvalid;
|
| {
|
| rtc::CritScope crit(&timing_params_lock_);
|
|
|
| @@ -274,14 +274,16 @@ EncodedImageCallback::Result VCMEncodedFrameCallback::OnEncodedImage(
|
| if (last_timing_frame_time_ms_ == -1 ||
|
| timing_frame_delay_ms >= timing_frames_thresholds_.delay_ms ||
|
| timing_frame_delay_ms == 0) {
|
| - is_timing_frame = true;
|
| + timing_flags = TimingFrameFlags::kTriggeredByTimer;
|
| last_timing_frame_time_ms_ = encoded_image.capture_time_ms_;
|
| }
|
|
|
| // Outliers trigger timing frames, but do not affect scheduled timing
|
| // frames.
|
| if (outlier_frame_size && encoded_image._length >= *outlier_frame_size) {
|
| - is_timing_frame = true;
|
| + if (timing_flags == TimingFrameFlags::kInvalid)
|
| + timing_flags = 0;
|
| + timing_flags |= TimingFrameFlags::kTriggeredBySize;
|
| }
|
| }
|
|
|
| @@ -290,9 +292,10 @@ EncodedImageCallback::Result VCMEncodedFrameCallback::OnEncodedImage(
|
| // drift relative to rtc::TimeMillis(). We can't use it for Timing frames,
|
| // because to being sent in the network capture time required to be less than
|
| // all the other timestamps.
|
| - if (is_timing_frame && encode_start_ms) {
|
| + if (timing_flags != TimingFrameFlags::kInvalid && encode_start_ms) {
|
| encoded_image.SetEncodeTime(*encode_start_ms, rtc::TimeMillis());
|
| }
|
| + encoded_image.timing_.flags = timing_flags;
|
|
|
| Result result = post_encode_callback_->OnEncodedImage(
|
| encoded_image, codec_specific, fragmentation_header);
|
|
|