OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
11 #include "webrtc/modules/video_coding/media_optimization.h" | 11 #include "webrtc/modules/video_coding/media_optimization.h" |
12 | 12 |
13 #include <limits> | 13 #include <limits> |
14 | 14 |
| 15 #include "webrtc/base/logging.h" |
15 #include "webrtc/modules/video_coding/utility/frame_dropper.h" | 16 #include "webrtc/modules/video_coding/utility/frame_dropper.h" |
16 #include "webrtc/rtc_base/logging.h" | |
17 #include "webrtc/system_wrappers/include/clock.h" | 17 #include "webrtc/system_wrappers/include/clock.h" |
18 | 18 |
19 namespace webrtc { | 19 namespace webrtc { |
20 namespace media_optimization { | 20 namespace media_optimization { |
21 | 21 |
22 struct MediaOptimization::EncodedFrameSample { | 22 struct MediaOptimization::EncodedFrameSample { |
23 EncodedFrameSample(size_t size_bytes, | 23 EncodedFrameSample(size_t size_bytes, |
24 uint32_t timestamp, | 24 uint32_t timestamp, |
25 int64_t time_complete_ms) | 25 int64_t time_complete_ms) |
26 : size_bytes(size_bytes), | 26 : size_bytes(size_bytes), |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 const int64_t diff = | 278 const int64_t diff = |
279 incoming_frame_times_[0] - incoming_frame_times_[num - 1]; | 279 incoming_frame_times_[0] - incoming_frame_times_[num - 1]; |
280 incoming_frame_rate_ = 0.0; // No frame rate estimate available. | 280 incoming_frame_rate_ = 0.0; // No frame rate estimate available. |
281 if (diff > 0) { | 281 if (diff > 0) { |
282 incoming_frame_rate_ = nr_of_frames * 1000.0f / static_cast<float>(diff); | 282 incoming_frame_rate_ = nr_of_frames * 1000.0f / static_cast<float>(diff); |
283 } | 283 } |
284 } | 284 } |
285 } | 285 } |
286 } // namespace media_optimization | 286 } // namespace media_optimization |
287 } // namespace webrtc | 287 } // namespace webrtc |
OLD | NEW |