| Index: content/browser/media/capture/video_capture_oracle.cc
|
| diff --git a/content/browser/media/capture/video_capture_oracle.cc b/content/browser/media/capture/video_capture_oracle.cc
|
| index 0b675075429c273bf141c475c5e7ece0e7a0822e..3d5039ca90663cf924d4a537128738aa8f7ab2a2 100644
|
| --- a/content/browser/media/capture/video_capture_oracle.cc
|
| +++ b/content/browser/media/capture/video_capture_oracle.cc
|
| @@ -60,20 +60,27 @@ bool VideoCaptureOracle::ObserveEventAndDecideCapture(
|
| last_event_time_[event] = event_time;
|
|
|
| bool should_sample;
|
| + duration_of_next_frame_ = base::TimeDelta();
|
| switch (event) {
|
| case kCompositorUpdate:
|
| smoothing_sampler_.ConsiderPresentationEvent(event_time);
|
| content_sampler_.ConsiderPresentationEvent(damage_rect, event_time);
|
| if (content_sampler_.HasProposal()) {
|
| should_sample = content_sampler_.ShouldSample();
|
| - if (should_sample)
|
| + if (should_sample) {
|
| event_time = content_sampler_.frame_timestamp();
|
| + duration_of_next_frame_ = content_sampler_.sampling_period();
|
| + }
|
| } else {
|
| should_sample = smoothing_sampler_.ShouldSample();
|
| + if (should_sample)
|
| + duration_of_next_frame_ = smoothing_sampler_.min_capture_period();
|
| }
|
| break;
|
| default:
|
| should_sample = smoothing_sampler_.IsOverdueForSamplingAt(event_time);
|
| + if (should_sample)
|
| + duration_of_next_frame_ = smoothing_sampler_.min_capture_period();
|
| break;
|
| }
|
|
|
|
|