OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/media/capture/video_capture_oracle.h" | 5 #include "content/browser/media/capture/video_capture_oracle.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/debug/trace_event.h" | |
10 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
11 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "base/trace_event/trace_event.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // This value controls how many redundant, timer-base captures occur when the | 17 // This value controls how many redundant, timer-base captures occur when the |
18 // content is static. Redundantly capturing the same frame allows iterative | 18 // content is static. Redundantly capturing the same frame allows iterative |
19 // quality enhancement, and also allows the buffer to fill in "buffered mode". | 19 // quality enhancement, and also allows the buffer to fill in "buffered mode". |
20 // | 20 // |
21 // TODO(nick): Controlling this here is a hack and a layering violation, since | 21 // TODO(nick): Controlling this here is a hack and a layering violation, since |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 if (borrowed_time_ >= min_capture_period_) { | 428 if (borrowed_time_ >= min_capture_period_) { |
429 borrowed_time_ -= min_capture_period_; | 429 borrowed_time_ -= min_capture_period_; |
430 frame_timestamp_ = base::TimeTicks(); | 430 frame_timestamp_ = base::TimeTicks(); |
431 } else { | 431 } else { |
432 sequence_offset_ += advancement; | 432 sequence_offset_ += advancement; |
433 frame_timestamp_ = timebase + sequence_offset_; | 433 frame_timestamp_ = timebase + sequence_offset_; |
434 } | 434 } |
435 } | 435 } |
436 | 436 |
437 } // namespace content | 437 } // namespace content |
OLD | NEW |