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

Side by Side Diff: webrtc/test/frame_generator_unittest.cc

Issue 2633493002: Delete VideoFrame::set_render_time_ms. (Closed)
Patch Set: Add deprecation comments. Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ASSERT_EQ(u, buffer[i]); 68 ASSERT_EQ(u, buffer[i]);
69 buffer = frame->video_frame_buffer()->DataV(); 69 buffer = frame->video_frame_buffer()->DataV();
70 for (int i = 0; i < uv_size; ++i) 70 for (int i = 0; i < uv_size; ++i)
71 ASSERT_EQ(v, buffer[i]); 71 ASSERT_EQ(v, buffer[i]);
72 EXPECT_EQ(0, frame->ntp_time_ms()); 72 EXPECT_EQ(0, frame->ntp_time_ms());
73 EXPECT_EQ(0, frame->render_time_ms()); 73 EXPECT_EQ(0, frame->render_time_ms());
74 EXPECT_EQ(0u, frame->timestamp()); 74 EXPECT_EQ(0u, frame->timestamp());
75 75
76 // Mutate to something arbitrary non-zero. 76 // Mutate to something arbitrary non-zero.
77 frame->set_ntp_time_ms(11); 77 frame->set_ntp_time_ms(11);
78 frame->set_render_time_ms(12); 78 frame->set_timestamp_us(12);
79 frame->set_timestamp(13); 79 frame->set_timestamp(13);
80 } 80 }
81 81
82 std::string two_frame_filename_; 82 std::string two_frame_filename_;
83 std::string one_frame_filename_; 83 std::string one_frame_filename_;
84 const int y_size = kFrameWidth * kFrameHeight; 84 const int y_size = kFrameWidth * kFrameHeight;
85 const int uv_size = ((kFrameHeight + 1) / 2) * ((kFrameWidth + 1) / 2); 85 const int uv_size = ((kFrameHeight + 1) / 2) * ((kFrameWidth + 1) / 2);
86 }; 86 };
87 87
88 TEST_F(FrameGeneratorTest, SingleFrameFile) { 88 TEST_F(FrameGeneratorTest, SingleFrameFile) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 CheckFrameAndMutate(generator->NextFrame(), 0, 0, 0); 138 CheckFrameAndMutate(generator->NextFrame(), 0, 0, 0);
139 for (int i = 0; i < kRepeatCount; ++i) 139 for (int i = 0; i < kRepeatCount; ++i)
140 CheckFrameAndMutate(generator->NextFrame(), 127, 127, 127); 140 CheckFrameAndMutate(generator->NextFrame(), 127, 127, 127);
141 for (int i = 0; i < kRepeatCount; ++i) 141 for (int i = 0; i < kRepeatCount; ++i)
142 CheckFrameAndMutate(generator->NextFrame(), 255, 255, 255); 142 CheckFrameAndMutate(generator->NextFrame(), 255, 255, 255);
143 CheckFrameAndMutate(generator->NextFrame(), 0, 0, 0); 143 CheckFrameAndMutate(generator->NextFrame(), 0, 0, 0);
144 } 144 }
145 145
146 } // namespace test 146 } // namespace test
147 } // namespace webrtc 147 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698