| 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 3082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3093 | 3093 |
| 3094 // Combined BWE should be set up, but with no configured extensions. | 3094 // Combined BWE should be set up, but with no configured extensions. |
| 3095 EXPECT_EQ(2, call_.GetAudioReceiveStreams().size()); | 3095 EXPECT_EQ(2, call_.GetAudioReceiveStreams().size()); |
| 3096 for (uint32_t ssrc : ssrcs) { | 3096 for (uint32_t ssrc : ssrcs) { |
| 3097 const auto* s = call_.GetAudioReceiveStream(ssrc); | 3097 const auto* s = call_.GetAudioReceiveStream(ssrc); |
| 3098 EXPECT_NE(nullptr, s); | 3098 EXPECT_NE(nullptr, s); |
| 3099 EXPECT_EQ(0, s->GetConfig().rtp.extensions.size()); | 3099 EXPECT_EQ(0, s->GetConfig().rtp.extensions.size()); |
| 3100 } | 3100 } |
| 3101 | 3101 |
| 3102 // Set up receive extensions. | 3102 // Set up receive extensions. |
| 3103 const auto& e_exts = engine_.rtp_header_extensions(); | 3103 cricket::RtpCapabilities capabilities = engine_.GetCapabilities(); |
| 3104 cricket::AudioRecvParameters recv_parameters; | 3104 cricket::AudioRecvParameters recv_parameters; |
| 3105 recv_parameters.extensions = e_exts; | 3105 recv_parameters.extensions = capabilities.header_extensions; |
| 3106 channel_->SetRecvParameters(recv_parameters); | 3106 channel_->SetRecvParameters(recv_parameters); |
| 3107 EXPECT_EQ(2, call_.GetAudioReceiveStreams().size()); | 3107 EXPECT_EQ(2, call_.GetAudioReceiveStreams().size()); |
| 3108 for (uint32_t ssrc : ssrcs) { | 3108 for (uint32_t ssrc : ssrcs) { |
| 3109 const auto* s = call_.GetAudioReceiveStream(ssrc); | 3109 const auto* s = call_.GetAudioReceiveStream(ssrc); |
| 3110 EXPECT_NE(nullptr, s); | 3110 EXPECT_NE(nullptr, s); |
| 3111 const auto& s_exts = s->GetConfig().rtp.extensions; | 3111 const auto& s_exts = s->GetConfig().rtp.extensions; |
| 3112 EXPECT_EQ(e_exts.size(), s_exts.size()); | 3112 EXPECT_EQ(capabilities.header_extensions.size(), s_exts.size()); |
| 3113 for (const auto& e_ext : e_exts) { | 3113 for (const auto& e_ext : capabilities.header_extensions) { |
| 3114 for (const auto& s_ext : s_exts) { | 3114 for (const auto& s_ext : s_exts) { |
| 3115 if (e_ext.id == s_ext.id) { | 3115 if (e_ext.id == s_ext.id) { |
| 3116 EXPECT_EQ(e_ext.uri, s_ext.name); | 3116 EXPECT_EQ(e_ext.uri, s_ext.name); |
| 3117 } | 3117 } |
| 3118 } | 3118 } |
| 3119 } | 3119 } |
| 3120 } | 3120 } |
| 3121 | 3121 |
| 3122 // Disable receive extensions. | 3122 // Disable receive extensions. |
| 3123 channel_->SetRecvParameters(cricket::AudioRecvParameters()); | 3123 channel_->SetRecvParameters(cricket::AudioRecvParameters()); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3343 cricket::WebRtcVoiceEngine engine; | 3343 cricket::WebRtcVoiceEngine engine; |
| 3344 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); | 3344 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); |
| 3345 rtc::scoped_ptr<webrtc::Call> call( | 3345 rtc::scoped_ptr<webrtc::Call> call( |
| 3346 webrtc::Call::Create(webrtc::Call::Config())); | 3346 webrtc::Call::Create(webrtc::Call::Config())); |
| 3347 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(), | 3347 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(), |
| 3348 call.get()); | 3348 call.get()); |
| 3349 cricket::AudioRecvParameters parameters; | 3349 cricket::AudioRecvParameters parameters; |
| 3350 parameters.codecs = engine.codecs(); | 3350 parameters.codecs = engine.codecs(); |
| 3351 EXPECT_TRUE(channel.SetRecvParameters(parameters)); | 3351 EXPECT_TRUE(channel.SetRecvParameters(parameters)); |
| 3352 } | 3352 } |
| OLD | NEW |