| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |