| 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 17 matching lines...) Expand all Loading... |
| 28 timestamp_us_(0), | 28 timestamp_us_(0), |
| 29 num_rendered_frames_(0), | 29 num_rendered_frames_(0), |
| 30 black_frame_(false) {} | 30 black_frame_(false) {} |
| 31 | 31 |
| 32 virtual void OnFrame(const webrtc::VideoFrame& frame) { | 32 virtual void OnFrame(const webrtc::VideoFrame& frame) { |
| 33 rtc::CritScope cs(&crit_); | 33 rtc::CritScope cs(&crit_); |
| 34 // TODO(zhurunz) Check with VP8 team to see if we can remove this | 34 // TODO(zhurunz) Check with VP8 team to see if we can remove this |
| 35 // tolerance on Y values. Some unit tests produce Y values close | 35 // tolerance on Y values. Some unit tests produce Y values close |
| 36 // to 16 rather than close to zero, for supposedly black frames. | 36 // to 16 rather than close to zero, for supposedly black frames. |
| 37 // Largest value observed is 34, e.g., running | 37 // Largest value observed is 34, e.g., running |
| 38 // P2PTestConductor.LocalP2PTest16To9 (peerconnection_unittests). | 38 // PeerConnectionIntegrationTest.SendAndReceive16To9AspectRatio. |
| 39 black_frame_ = CheckFrameColorYuv(0, 48, 128, 128, 128, 128, &frame); | 39 black_frame_ = CheckFrameColorYuv(0, 48, 128, 128, 128, 128, &frame); |
| 40 // Treat unexpected frame size as error. | 40 // Treat unexpected frame size as error. |
| 41 ++num_rendered_frames_; | 41 ++num_rendered_frames_; |
| 42 width_ = frame.width(); | 42 width_ = frame.width(); |
| 43 height_ = frame.height(); | 43 height_ = frame.height(); |
| 44 rotation_ = frame.rotation(); | 44 rotation_ = frame.rotation(); |
| 45 timestamp_us_ = frame.timestamp_us(); | 45 timestamp_us_ = frame.timestamp_us(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 int errors() const { return errors_; } | 48 int errors() const { return errors_; } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 webrtc::VideoRotation rotation_; | 130 webrtc::VideoRotation rotation_; |
| 131 int64_t timestamp_us_; | 131 int64_t timestamp_us_; |
| 132 int num_rendered_frames_; | 132 int num_rendered_frames_; |
| 133 bool black_frame_; | 133 bool black_frame_; |
| 134 rtc::CriticalSection crit_; | 134 rtc::CriticalSection crit_; |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } // namespace cricket | 137 } // namespace cricket |
| 138 | 138 |
| 139 #endif // WEBRTC_MEDIA_BASE_FAKEVIDEORENDERER_H_ | 139 #endif // WEBRTC_MEDIA_BASE_FAKEVIDEORENDERER_H_ |
| OLD | NEW |