| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef MEDIA_BASE_ANDROID_MEDIA_STATISTICS_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_STATISTICS_H_ |
| 6 #define MEDIA_BASE_ANDROID_MEDIA_STATISTICS_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_STATISTICS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "media/base/demuxer_stream.h" | 10 #include "media/base/demuxer_stream.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void AddStarvation() { ++num_starvations_; } | 70 void AddStarvation() { ++num_starvations_; } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 // Resets the data to the initial state. | 73 // Resets the data to the initial state. |
| 74 void Clear(); | 74 void Clear(); |
| 75 | 75 |
| 76 // Calculates relative data based on total frame numbers and reports it and | 76 // Calculates relative data based on total frame numbers and reports it and |
| 77 // the duration to UMA. | 77 // the duration to UMA. |
| 78 void Report(base::TimeDelta duration); | 78 void Report(base::TimeDelta duration); |
| 79 | 79 |
| 80 base::TimeDelta start_time_ = kNoTimestamp(); | 80 base::TimeDelta start_time_ = kNoTimestamp; |
| 81 FrameStatistics audio_frame_stats_; | 81 FrameStatistics audio_frame_stats_; |
| 82 FrameStatistics video_frame_stats_; | 82 FrameStatistics video_frame_stats_; |
| 83 uint32_t num_starvations_ = 0; | 83 uint32_t num_starvations_ = 0; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace media | 86 } // namespace media |
| 87 | 87 |
| 88 #endif // MEDIA_BASE_ANDROID_MEDIA_STATISTICS_H_ | 88 #endif // MEDIA_BASE_ANDROID_MEDIA_STATISTICS_H_ |
| OLD | NEW |