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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 namespace cricket { | 95 namespace cricket { |
96 class WebRtcVideoEngine2Test : public ::testing::Test { | 96 class WebRtcVideoEngine2Test : public ::testing::Test { |
97 public: | 97 public: |
98 WebRtcVideoEngine2Test() : WebRtcVideoEngine2Test("") {} | 98 WebRtcVideoEngine2Test() : WebRtcVideoEngine2Test("") {} |
99 explicit WebRtcVideoEngine2Test(const char* field_trials) | 99 explicit WebRtcVideoEngine2Test(const char* field_trials) |
100 : WebRtcVideoEngine2Test(nullptr, field_trials) {} | 100 : WebRtcVideoEngine2Test(nullptr, field_trials) {} |
101 WebRtcVideoEngine2Test(WebRtcVoiceEngine* voice_engine, | 101 WebRtcVideoEngine2Test(WebRtcVoiceEngine* voice_engine, |
102 const char* field_trials) | 102 const char* field_trials) |
103 : override_field_trials_(field_trials), | 103 : override_field_trials_(field_trials), |
104 call_(webrtc::Call::Create(webrtc::Call::Config())), | 104 call_(webrtc::Call::Create(webrtc::Call::Config())), |
| 105 voice_engine_(nullptr), |
105 engine_() { | 106 engine_() { |
106 std::vector<VideoCodec> engine_codecs = engine_.codecs(); | 107 std::vector<VideoCodec> engine_codecs = engine_.codecs(); |
107 RTC_DCHECK(!engine_codecs.empty()); | 108 RTC_DCHECK(!engine_codecs.empty()); |
108 bool codec_set = false; | 109 bool codec_set = false; |
109 for (size_t i = 0; i < engine_codecs.size(); ++i) { | 110 for (size_t i = 0; i < engine_codecs.size(); ++i) { |
110 if (engine_codecs[i].name == "red") { | 111 if (engine_codecs[i].name == "red") { |
111 default_red_codec_ = engine_codecs[i]; | 112 default_red_codec_ = engine_codecs[i]; |
112 } else if (engine_codecs[i].name == "ulpfec") { | 113 } else if (engine_codecs[i].name == "ulpfec") { |
113 default_ulpfec_codec_ = engine_codecs[i]; | 114 default_ulpfec_codec_ = engine_codecs[i]; |
114 } else if (engine_codecs[i].name == "rtx") { | 115 } else if (engine_codecs[i].name == "rtx") { |
(...skipping 3375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3490 } | 3491 } |
3491 | 3492 |
3492 // Test that we normalize send codec format size in simulcast. | 3493 // Test that we normalize send codec format size in simulcast. |
3493 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 3494 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
3494 cricket::VideoCodec codec(kVp8Codec270p); | 3495 cricket::VideoCodec codec(kVp8Codec270p); |
3495 codec.width += 1; | 3496 codec.width += 1; |
3496 codec.height += 1; | 3497 codec.height += 1; |
3497 VerifySimulcastSettings(codec, 2, 2); | 3498 VerifySimulcastSettings(codec, 2, 2); |
3498 } | 3499 } |
3499 } // namespace cricket | 3500 } // namespace cricket |
OLD | NEW |