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> // max | 10 #include <algorithm> // max |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 payload_name_(codec), | 359 payload_name_(codec), |
360 use_nack_(use_nack), | 360 use_nack_(use_nack), |
361 expect_red_(expect_red), | 361 expect_red_(expect_red), |
362 expect_ulpfec_(expect_ulpfec), | 362 expect_ulpfec_(expect_ulpfec), |
363 send_count_(0), | 363 send_count_(0), |
364 received_media_(false), | 364 received_media_(false), |
365 received_fec_(false), | 365 received_fec_(false), |
366 header_extensions_enabled_(header_extensions_enabled) { | 366 header_extensions_enabled_(header_extensions_enabled) { |
367 if (codec == "H264") { | 367 if (codec == "H264") { |
368 encoder_.reset(new test::FakeH264Encoder(Clock::GetRealTimeClock())); | 368 encoder_.reset(new test::FakeH264Encoder(Clock::GetRealTimeClock())); |
369 } else if (codec == "VP8") { | 369 } else if (codec == "VP8" || codec == "VP9") { |
370 encoder_.reset(VideoEncoder::Create(VideoEncoder::EncoderType::kVp8)); | 370 encoder_.reset(VideoEncoder::Create(cricket::VideoCodec(codec))); |
371 } else if (codec == "VP9") { | |
372 encoder_.reset(VideoEncoder::Create(VideoEncoder::EncoderType::kVp9)); | |
373 } else { | 371 } else { |
374 RTC_NOTREACHED(); | 372 RTC_NOTREACHED(); |
375 } | 373 } |
376 } | 374 } |
377 | 375 |
378 private: | 376 private: |
379 Action OnSendRtp(const uint8_t* packet, size_t length) override { | 377 Action OnSendRtp(const uint8_t* packet, size_t length) override { |
380 RTPHeader header; | 378 RTPHeader header; |
381 EXPECT_TRUE(parser_->Parse(packet, length, &header)); | 379 EXPECT_TRUE(parser_->Parse(packet, length, &header)); |
382 | 380 |
(...skipping 2560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2943 RequestSourceRotateIfVideoOrientationExtensionNotSupported) { | 2941 RequestSourceRotateIfVideoOrientationExtensionNotSupported) { |
2944 TestRequestSourceRotateVideo(false); | 2942 TestRequestSourceRotateVideo(false); |
2945 } | 2943 } |
2946 | 2944 |
2947 TEST_F(VideoSendStreamTest, | 2945 TEST_F(VideoSendStreamTest, |
2948 DoNotRequestsRotationIfVideoOrientationExtensionSupported) { | 2946 DoNotRequestsRotationIfVideoOrientationExtensionSupported) { |
2949 TestRequestSourceRotateVideo(true); | 2947 TestRequestSourceRotateVideo(true); |
2950 } | 2948 } |
2951 | 2949 |
2952 } // namespace webrtc | 2950 } // namespace webrtc |
OLD | NEW |