| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 channel->SetSend(true); | 466 channel->SetSend(true); |
| 467 FakeVideoSendStream* stream = fake_call->GetVideoSendStreams()[0]; | 467 FakeVideoSendStream* stream = fake_call->GetVideoSendStreams()[0]; |
| 468 | 468 |
| 469 FakeVideoCapturer capturer1; | 469 FakeVideoCapturer capturer1; |
| 470 EXPECT_TRUE(channel->SetCapturer(kSsrc, &capturer1)); | 470 EXPECT_TRUE(channel->SetCapturer(kSsrc, &capturer1)); |
| 471 | 471 |
| 472 cricket::CapturedFrame frame; | 472 cricket::CapturedFrame frame; |
| 473 frame.width = 1280; | 473 frame.width = 1280; |
| 474 frame.height = 720; | 474 frame.height = 720; |
| 475 frame.fourcc = cricket::FOURCC_I420; | 475 frame.fourcc = cricket::FOURCC_I420; |
| 476 frame.data_size = static_cast<uint32_t>( | 476 frame.data_size = frame.width * frame.height + |
| 477 cricket::VideoFrame::SizeOf(frame.width, frame.height)); | 477 2 * ((frame.width + 1) / 2) * ((frame.height + 1) / 2); |
| 478 rtc::scoped_ptr<char[]> data(new char[frame.data_size]); | 478 rtc::scoped_ptr<char[]> data(new char[frame.data_size]); |
| 479 frame.data = data.get(); | 479 frame.data = data.get(); |
| 480 memset(frame.data, 1, frame.data_size); | 480 memset(frame.data, 1, frame.data_size); |
| 481 const int kInitialTimestamp = 123456; | 481 const int kInitialTimestamp = 123456; |
| 482 frame.time_stamp = kInitialTimestamp; | 482 frame.time_stamp = kInitialTimestamp; |
| 483 | 483 |
| 484 // Deliver initial frame. | 484 // Deliver initial frame. |
| 485 capturer1.SignalCapturedFrame(&frame); | 485 capturer1.SignalCapturedFrame(&frame); |
| 486 // Deliver next frame 1 second later. | 486 // Deliver next frame 1 second later. |
| 487 frame.time_stamp += rtc::kNumNanosecsPerSec; | 487 frame.time_stamp += rtc::kNumNanosecsPerSec; |
| (...skipping 2583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3071 // Test that we normalize send codec format size in simulcast. | 3071 // Test that we normalize send codec format size in simulcast. |
| 3072 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 3072 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
| 3073 cricket::VideoCodec codec(kVp8Codec270p); | 3073 cricket::VideoCodec codec(kVp8Codec270p); |
| 3074 codec.width += 1; | 3074 codec.width += 1; |
| 3075 codec.height += 1; | 3075 codec.height += 1; |
| 3076 VerifySimulcastSettings(codec, 2, 2); | 3076 VerifySimulcastSettings(codec, 2, 2); |
| 3077 } | 3077 } |
| 3078 } // namespace cricket | 3078 } // namespace cricket |
| 3079 | 3079 |
| 3080 #endif // HAVE_WEBRTC_VIDEO | 3080 #endif // HAVE_WEBRTC_VIDEO |
| OLD | NEW |