| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // How many packets were discarded of the encoded frame data (if any). | 32 // How many packets were discarded of the encoded frame data (if any). |
| 33 int packets_dropped; | 33 int packets_dropped; |
| 34 size_t total_packets; | 34 size_t total_packets; |
| 35 | 35 |
| 36 // Current bit rate. Calculated out of the size divided with the time | 36 // Current bit rate. Calculated out of the size divided with the time |
| 37 // interval per frame. | 37 // interval per frame. |
| 38 int bit_rate_in_kbps; | 38 int bit_rate_in_kbps; |
| 39 | 39 |
| 40 // Copied from EncodedImage | 40 // Copied from EncodedImage |
| 41 size_t encoded_frame_length_in_bytes; | 41 size_t encoded_frame_length_in_bytes; |
| 42 webrtc::VideoFrameType frame_type; | 42 webrtc::FrameType frame_type; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 // Handles statistics from a single video processing run. | 45 // Handles statistics from a single video processing run. |
| 46 // Contains calculation methods for interesting metrics from these stats. | 46 // Contains calculation methods for interesting metrics from these stats. |
| 47 class Stats { | 47 class Stats { |
| 48 public: | 48 public: |
| 49 typedef std::vector<FrameStatistic>::iterator FrameStatisticsIterator; | 49 typedef std::vector<FrameStatistic>::iterator FrameStatisticsIterator; |
| 50 | 50 |
| 51 Stats(); | 51 Stats(); |
| 52 virtual ~Stats(); | 52 virtual ~Stats(); |
| 53 | 53 |
| 54 // Add a new statistic data object. | 54 // Add a new statistic data object. |
| 55 // The frame number must be incrementing and start at zero in order to use | 55 // The frame number must be incrementing and start at zero in order to use |
| 56 // it as an index for the frame_statistics_ vector. | 56 // it as an index for the frame_statistics_ vector. |
| 57 // Returns the newly created statistic object. | 57 // Returns the newly created statistic object. |
| 58 FrameStatistic& NewFrame(int frame_number); | 58 FrameStatistic& NewFrame(int frame_number); |
| 59 | 59 |
| 60 // Prints a summary of all the statistics that have been gathered during the | 60 // Prints a summary of all the statistics that have been gathered during the |
| 61 // processing | 61 // processing |
| 62 void PrintSummary(); | 62 void PrintSummary(); |
| 63 | 63 |
| 64 std::vector<FrameStatistic> stats_; | 64 std::vector<FrameStatistic> stats_; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace test | 67 } // namespace test |
| 68 } // namespace webrtc | 68 } // namespace webrtc |
| 69 | 69 |
| 70 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_STATS_H_ | 70 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_STATS_H_ |
| OLD | NEW |