| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "media/filters/decoder_stream_traits.h" | 5 #include "media/filters/decoder_stream_traits.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "media/base/audio_buffer.h" | 9 #include "media/base/audio_buffer.h" |
| 10 #include "media/base/audio_decoder.h" | 10 #include "media/base/audio_decoder.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 base::TimeDelta current_frame_timestamp = buffer->timestamp(); | 138 base::TimeDelta current_frame_timestamp = buffer->timestamp(); |
| 139 if (last_keyframe_timestamp_.is_zero()) { | 139 if (last_keyframe_timestamp_.is_zero()) { |
| 140 last_keyframe_timestamp_ = current_frame_timestamp; | 140 last_keyframe_timestamp_ = current_frame_timestamp; |
| 141 return; | 141 return; |
| 142 } | 142 } |
| 143 | 143 |
| 144 UMA_HISTOGRAM_MEDIUM_TIMES( | 144 UMA_HISTOGRAM_MEDIUM_TIMES( |
| 145 "Media.Video.KeyFrameDistance", | 145 "Media.Video.KeyFrameDistance", |
| 146 current_frame_timestamp - last_keyframe_timestamp_); | 146 current_frame_timestamp - last_keyframe_timestamp_); |
| 147 last_keyframe_timestamp_ = current_frame_timestamp; |
| 147 } | 148 } |
| 148 | 149 |
| 149 } // namespace media | 150 } // namespace media |
| OLD | NEW |