Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: webrtc/video/video_send_stream_tests.cc

Issue 1693443002: VideoCaptureInput enforce VideoFrame::render_time to be generated by webrtc clock. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video/video_capture_input_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 ExpectEqualTextureFrames(frame1, frame2); 1250 ExpectEqualTextureFrames(frame1, frame2);
1251 else 1251 else
1252 ExpectEqualBufferFrames(frame1, frame2); 1252 ExpectEqualBufferFrames(frame1, frame2);
1253 } 1253 }
1254 1254
1255 void ExpectEqualTextureFrames(const VideoFrame& frame1, 1255 void ExpectEqualTextureFrames(const VideoFrame& frame1,
1256 const VideoFrame& frame2) { 1256 const VideoFrame& frame2) {
1257 EXPECT_EQ(frame1.native_handle(), frame2.native_handle()); 1257 EXPECT_EQ(frame1.native_handle(), frame2.native_handle());
1258 EXPECT_EQ(frame1.width(), frame2.width()); 1258 EXPECT_EQ(frame1.width(), frame2.width());
1259 EXPECT_EQ(frame1.height(), frame2.height()); 1259 EXPECT_EQ(frame1.height(), frame2.height());
1260 EXPECT_EQ(frame1.render_time_ms(), frame2.render_time_ms());
1261 } 1260 }
1262 1261
1263 void ExpectEqualBufferFrames(const VideoFrame& frame1, 1262 void ExpectEqualBufferFrames(const VideoFrame& frame1,
1264 const VideoFrame& frame2) { 1263 const VideoFrame& frame2) {
1265 EXPECT_EQ(frame1.width(), frame2.width()); 1264 EXPECT_EQ(frame1.width(), frame2.width());
1266 EXPECT_EQ(frame1.height(), frame2.height()); 1265 EXPECT_EQ(frame1.height(), frame2.height());
1267 EXPECT_EQ(frame1.stride(kYPlane), frame2.stride(kYPlane)); 1266 EXPECT_EQ(frame1.stride(kYPlane), frame2.stride(kYPlane));
1268 EXPECT_EQ(frame1.stride(kUPlane), frame2.stride(kUPlane)); 1267 EXPECT_EQ(frame1.stride(kUPlane), frame2.stride(kUPlane));
1269 EXPECT_EQ(frame1.stride(kVPlane), frame2.stride(kVPlane)); 1268 EXPECT_EQ(frame1.stride(kVPlane), frame2.stride(kVPlane));
1270 EXPECT_EQ(frame1.render_time_ms(), frame2.render_time_ms());
1271 ASSERT_EQ(frame1.allocated_size(kYPlane), frame2.allocated_size(kYPlane)); 1269 ASSERT_EQ(frame1.allocated_size(kYPlane), frame2.allocated_size(kYPlane));
1272 EXPECT_EQ(0, 1270 EXPECT_EQ(0,
1273 memcmp(frame1.buffer(kYPlane), 1271 memcmp(frame1.buffer(kYPlane),
1274 frame2.buffer(kYPlane), 1272 frame2.buffer(kYPlane),
1275 frame1.allocated_size(kYPlane))); 1273 frame1.allocated_size(kYPlane)));
1276 ASSERT_EQ(frame1.allocated_size(kUPlane), frame2.allocated_size(kUPlane)); 1274 ASSERT_EQ(frame1.allocated_size(kUPlane), frame2.allocated_size(kUPlane));
1277 EXPECT_EQ(0, 1275 EXPECT_EQ(0,
1278 memcmp(frame1.buffer(kUPlane), 1276 memcmp(frame1.buffer(kUPlane),
1279 frame2.buffer(kUPlane), 1277 frame2.buffer(kUPlane),
1280 frame1.allocated_size(kUPlane))); 1278 frame1.allocated_size(kUPlane)));
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
2315 observation_complete_.Set(); 2313 observation_complete_.Set();
2316 } 2314 }
2317 } 2315 }
2318 } test; 2316 } test;
2319 2317
2320 RunBaseTest(&test); 2318 RunBaseTest(&test);
2321 } 2319 }
2322 #endif 2320 #endif
2323 2321
2324 } // namespace webrtc 2322 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_capture_input_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698