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> | 10 #include <algorithm> |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 } | 367 } |
368 | 368 |
369 TEST_F(EndToEndTest, SendsAndReceivesVP9VideoRotation90) { | 369 TEST_F(EndToEndTest, SendsAndReceivesVP9VideoRotation90) { |
370 CodecObserver test(5, kVideoRotation_90, "VP9", | 370 CodecObserver test(5, kVideoRotation_90, "VP9", |
371 VideoEncoder::Create(VideoEncoder::kVp9), | 371 VideoEncoder::Create(VideoEncoder::kVp9), |
372 VP9Decoder::Create()); | 372 VP9Decoder::Create()); |
373 RunBaseTest(&test); | 373 RunBaseTest(&test); |
374 } | 374 } |
375 #endif // !defined(RTC_DISABLE_VP9) | 375 #endif // !defined(RTC_DISABLE_VP9) |
376 | 376 |
377 #if defined(WEBRTC_END_TO_END_H264_TESTS) | 377 #if defined(WEBRTC_USE_H264) |
378 | 378 |
379 TEST_F(EndToEndTest, SendsAndReceivesH264) { | 379 TEST_F(EndToEndTest, SendsAndReceivesH264) { |
380 CodecObserver test(500, kVideoRotation_0, "H264", | 380 CodecObserver test(500, kVideoRotation_0, "H264", |
381 VideoEncoder::Create(VideoEncoder::kH264), | 381 VideoEncoder::Create(VideoEncoder::kH264), |
382 H264Decoder::Create()); | 382 H264Decoder::Create()); |
383 RunBaseTest(&test); | 383 RunBaseTest(&test); |
384 } | 384 } |
385 | 385 |
386 TEST_F(EndToEndTest, SendsAndReceivesH264VideoRotation90) { | 386 TEST_F(EndToEndTest, SendsAndReceivesH264VideoRotation90) { |
387 CodecObserver test(5, kVideoRotation_90, "H264", | 387 CodecObserver test(5, kVideoRotation_90, "H264", |
388 VideoEncoder::Create(VideoEncoder::kH264), | 388 VideoEncoder::Create(VideoEncoder::kH264), |
389 H264Decoder::Create()); | 389 H264Decoder::Create()); |
390 RunBaseTest(&test); | 390 RunBaseTest(&test); |
391 } | 391 } |
392 | 392 |
393 #endif // defined(WEBRTC_END_TO_END_H264_TESTS) | 393 TEST_F(EndToEndTest, SendsAndReceivesH264PacketizationMode0) { |
hbos
2016/10/31 10:32:26
How big is a NAL and are we sure that this will tr
hta-webrtc
2016/10/31 15:03:04
The NALU limit is what's being set over in the h26
hbos
2016/10/31 16:27:15
Acknowledged.
| |
394 VideoEncoder* encoder = VideoEncoder::Create(VideoEncoder::kH264); | |
395 VideoCodec codec_settings; | |
396 codec_settings.codecType = kVideoCodecH264; | |
397 codec_settings.H264()->packetization_mode = kH264PacketizationMode0; | |
398 encoder->InitEncode(&codec_settings, 0, 1024); | |
399 // The CodecObserver takes ownership of the encoder. | |
400 CodecObserver test(500, kVideoRotation_0, "H264", encoder, | |
401 H264Decoder::Create()); | |
402 RunBaseTest(&test); | |
403 } | |
hbos
2016/10/31 10:32:26
How about a test that explicitly runs with Mode1 w
hta-webrtc
2016/10/31 15:03:04
Added.
| |
404 | |
405 #endif // defined(WEBRTC_USE_H264) | |
394 | 406 |
395 TEST_F(EndToEndTest, ReceiverUsesLocalSsrc) { | 407 TEST_F(EndToEndTest, ReceiverUsesLocalSsrc) { |
396 class SyncRtcpObserver : public test::EndToEndTest { | 408 class SyncRtcpObserver : public test::EndToEndTest { |
397 public: | 409 public: |
398 SyncRtcpObserver() : EndToEndTest(kDefaultTimeoutMs) {} | 410 SyncRtcpObserver() : EndToEndTest(kDefaultTimeoutMs) {} |
399 | 411 |
400 Action OnReceiveRtcp(const uint8_t* packet, size_t length) override { | 412 Action OnReceiveRtcp(const uint8_t* packet, size_t length) override { |
401 RTCPUtility::RTCPParserV2 parser(packet, length, true); | 413 RTCPUtility::RTCPParserV2 parser(packet, length, true); |
402 EXPECT_TRUE(parser.IsValid()); | 414 EXPECT_TRUE(parser.IsValid()); |
403 uint32_t ssrc = 0; | 415 uint32_t ssrc = 0; |
(...skipping 3558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3962 std::unique_ptr<VideoEncoder> encoder_; | 3974 std::unique_ptr<VideoEncoder> encoder_; |
3963 std::unique_ptr<VideoDecoder> decoder_; | 3975 std::unique_ptr<VideoDecoder> decoder_; |
3964 rtc::CriticalSection crit_; | 3976 rtc::CriticalSection crit_; |
3965 int recorded_frames_ GUARDED_BY(crit_); | 3977 int recorded_frames_ GUARDED_BY(crit_); |
3966 } test(this); | 3978 } test(this); |
3967 | 3979 |
3968 RunBaseTest(&test); | 3980 RunBaseTest(&test); |
3969 } | 3981 } |
3970 | 3982 |
3971 } // namespace webrtc | 3983 } // namespace webrtc |
OLD | NEW |