| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <algorithm> // max | 10 #include <algorithm> // max |
| (...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 ExpectEqualTextureFrames(frame1, frame2); | 1192 ExpectEqualTextureFrames(frame1, frame2); |
| 1193 else | 1193 else |
| 1194 ExpectEqualBufferFrames(frame1, frame2); | 1194 ExpectEqualBufferFrames(frame1, frame2); |
| 1195 } | 1195 } |
| 1196 | 1196 |
| 1197 void ExpectEqualTextureFrames(const VideoFrame& frame1, | 1197 void ExpectEqualTextureFrames(const VideoFrame& frame1, |
| 1198 const VideoFrame& frame2) { | 1198 const VideoFrame& frame2) { |
| 1199 EXPECT_EQ(frame1.native_handle(), frame2.native_handle()); | 1199 EXPECT_EQ(frame1.native_handle(), frame2.native_handle()); |
| 1200 EXPECT_EQ(frame1.width(), frame2.width()); | 1200 EXPECT_EQ(frame1.width(), frame2.width()); |
| 1201 EXPECT_EQ(frame1.height(), frame2.height()); | 1201 EXPECT_EQ(frame1.height(), frame2.height()); |
| 1202 EXPECT_EQ(frame1.render_time_ms(), frame2.render_time_ms()); | |
| 1203 } | 1202 } |
| 1204 | 1203 |
| 1205 void ExpectEqualBufferFrames(const VideoFrame& frame1, | 1204 void ExpectEqualBufferFrames(const VideoFrame& frame1, |
| 1206 const VideoFrame& frame2) { | 1205 const VideoFrame& frame2) { |
| 1207 EXPECT_EQ(frame1.width(), frame2.width()); | 1206 EXPECT_EQ(frame1.width(), frame2.width()); |
| 1208 EXPECT_EQ(frame1.height(), frame2.height()); | 1207 EXPECT_EQ(frame1.height(), frame2.height()); |
| 1209 EXPECT_EQ(frame1.stride(kYPlane), frame2.stride(kYPlane)); | 1208 EXPECT_EQ(frame1.stride(kYPlane), frame2.stride(kYPlane)); |
| 1210 EXPECT_EQ(frame1.stride(kUPlane), frame2.stride(kUPlane)); | 1209 EXPECT_EQ(frame1.stride(kUPlane), frame2.stride(kUPlane)); |
| 1211 EXPECT_EQ(frame1.stride(kVPlane), frame2.stride(kVPlane)); | 1210 EXPECT_EQ(frame1.stride(kVPlane), frame2.stride(kVPlane)); |
| 1212 EXPECT_EQ(frame1.render_time_ms(), frame2.render_time_ms()); | |
| 1213 ASSERT_EQ(frame1.allocated_size(kYPlane), frame2.allocated_size(kYPlane)); | 1211 ASSERT_EQ(frame1.allocated_size(kYPlane), frame2.allocated_size(kYPlane)); |
| 1214 EXPECT_EQ(0, | 1212 EXPECT_EQ(0, |
| 1215 memcmp(frame1.buffer(kYPlane), | 1213 memcmp(frame1.buffer(kYPlane), |
| 1216 frame2.buffer(kYPlane), | 1214 frame2.buffer(kYPlane), |
| 1217 frame1.allocated_size(kYPlane))); | 1215 frame1.allocated_size(kYPlane))); |
| 1218 ASSERT_EQ(frame1.allocated_size(kUPlane), frame2.allocated_size(kUPlane)); | 1216 ASSERT_EQ(frame1.allocated_size(kUPlane), frame2.allocated_size(kUPlane)); |
| 1219 EXPECT_EQ(0, | 1217 EXPECT_EQ(0, |
| 1220 memcmp(frame1.buffer(kUPlane), | 1218 memcmp(frame1.buffer(kUPlane), |
| 1221 frame2.buffer(kUPlane), | 1219 frame2.buffer(kUPlane), |
| 1222 frame1.allocated_size(kUPlane))); | 1220 frame1.allocated_size(kUPlane))); |
| (...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2257 observation_complete_.Set(); | 2255 observation_complete_.Set(); |
| 2258 } | 2256 } |
| 2259 } | 2257 } |
| 2260 } test; | 2258 } test; |
| 2261 | 2259 |
| 2262 RunBaseTest(&test); | 2260 RunBaseTest(&test); |
| 2263 } | 2261 } |
| 2264 #endif | 2262 #endif |
| 2265 | 2263 |
| 2266 } // namespace webrtc | 2264 } // namespace webrtc |
| OLD | NEW |