OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2008 Google Inc. | 3 * Copyright 2008 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3102 | 3102 |
3103 // Combined BWE should be set up, but with no configured extensions. | 3103 // Combined BWE should be set up, but with no configured extensions. |
3104 EXPECT_EQ(2, call_.GetAudioReceiveStreams().size()); | 3104 EXPECT_EQ(2, call_.GetAudioReceiveStreams().size()); |
3105 for (uint32_t ssrc : ssrcs) { | 3105 for (uint32_t ssrc : ssrcs) { |
3106 const auto* s = call_.GetAudioReceiveStream(ssrc); | 3106 const auto* s = call_.GetAudioReceiveStream(ssrc); |
3107 EXPECT_NE(nullptr, s); | 3107 EXPECT_NE(nullptr, s); |
3108 EXPECT_EQ(0, s->GetConfig().rtp.extensions.size()); | 3108 EXPECT_EQ(0, s->GetConfig().rtp.extensions.size()); |
3109 } | 3109 } |
3110 | 3110 |
3111 // Set up receive extensions. | 3111 // Set up receive extensions. |
3112 const auto& e_exts = engine_.rtp_header_extensions(); | 3112 cricket::RtpCapabilities capabilities = engine_.GetCapabilities(); |
3113 cricket::AudioRecvParameters recv_parameters; | 3113 cricket::AudioRecvParameters recv_parameters; |
3114 recv_parameters.extensions = e_exts; | 3114 recv_parameters.extensions = capabilities.header_extensions; |
3115 channel_->SetRecvParameters(recv_parameters); | 3115 channel_->SetRecvParameters(recv_parameters); |
3116 EXPECT_EQ(2, call_.GetAudioReceiveStreams().size()); | 3116 EXPECT_EQ(2, call_.GetAudioReceiveStreams().size()); |
3117 for (uint32_t ssrc : ssrcs) { | 3117 for (uint32_t ssrc : ssrcs) { |
3118 const auto* s = call_.GetAudioReceiveStream(ssrc); | 3118 const auto* s = call_.GetAudioReceiveStream(ssrc); |
3119 EXPECT_NE(nullptr, s); | 3119 EXPECT_NE(nullptr, s); |
3120 const auto& s_exts = s->GetConfig().rtp.extensions; | 3120 const auto& s_exts = s->GetConfig().rtp.extensions; |
3121 EXPECT_EQ(e_exts.size(), s_exts.size()); | 3121 EXPECT_EQ(capabilities.header_extensions.size(), s_exts.size()); |
3122 for (const auto& e_ext : e_exts) { | 3122 for (const auto& e_ext : capabilities.header_extensions) { |
3123 for (const auto& s_ext : s_exts) { | 3123 for (const auto& s_ext : s_exts) { |
3124 if (e_ext.id == s_ext.id) { | 3124 if (e_ext.id == s_ext.id) { |
3125 EXPECT_EQ(e_ext.uri, s_ext.name); | 3125 EXPECT_EQ(e_ext.uri, s_ext.name); |
3126 } | 3126 } |
3127 } | 3127 } |
3128 } | 3128 } |
3129 } | 3129 } |
3130 | 3130 |
3131 // Disable receive extensions. | 3131 // Disable receive extensions. |
3132 channel_->SetRecvParameters(cricket::AudioRecvParameters()); | 3132 channel_->SetRecvParameters(cricket::AudioRecvParameters()); |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3352 cricket::WebRtcVoiceEngine engine; | 3352 cricket::WebRtcVoiceEngine engine; |
3353 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); | 3353 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); |
3354 rtc::scoped_ptr<webrtc::Call> call( | 3354 rtc::scoped_ptr<webrtc::Call> call( |
3355 webrtc::Call::Create(webrtc::Call::Config())); | 3355 webrtc::Call::Create(webrtc::Call::Config())); |
3356 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(), | 3356 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(), |
3357 call.get()); | 3357 call.get()); |
3358 cricket::AudioRecvParameters parameters; | 3358 cricket::AudioRecvParameters parameters; |
3359 parameters.codecs = engine.codecs(); | 3359 parameters.codecs = engine.codecs(); |
3360 EXPECT_TRUE(channel.SetRecvParameters(parameters)); | 3360 EXPECT_TRUE(channel.SetRecvParameters(parameters)); |
3361 } | 3361 } |
OLD | NEW |