Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: remoting/protocol/session_config.cc

Issue 2371323007: Add audio support in WebrtcConnectionToHost, audio unittest (Closed)
Patch Set: more reliable test Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/protocol/connection_unittest.cc ('k') | remoting/protocol/webrtc_audio_sink_adapter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/session_config.h" 5 #include "remoting/protocol/session_config.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 result->event_config_ = candidate_config->event_configs().front(); 142 result->event_config_ = candidate_config->event_configs().front();
143 result->video_config_ = candidate_config->video_configs().front(); 143 result->video_config_ = candidate_config->video_configs().front();
144 result->audio_config_ = candidate_config->audio_configs().front(); 144 result->audio_config_ = candidate_config->audio_configs().front();
145 145
146 return result; 146 return result;
147 } 147 }
148 148
149 // static 149 // static
150 std::unique_ptr<SessionConfig> SessionConfig::ForTest() { 150 std::unique_ptr<SessionConfig> SessionConfig::ForTest() {
151 std::unique_ptr<SessionConfig> result(new SessionConfig(Protocol::ICE)); 151 std::unique_ptr<SessionConfig> result(new SessionConfig(Protocol::ICE));
152 result->control_config_ = ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, 152 result->control_config_ =
153 kControlStreamVersion, 153 ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, kControlStreamVersion,
154 ChannelConfig::CODEC_UNDEFINED); 154 ChannelConfig::CODEC_UNDEFINED);
155 result->event_config_ = ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, 155 result->event_config_ =
156 kDefaultStreamVersion, 156 ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, kDefaultStreamVersion,
157 ChannelConfig::CODEC_UNDEFINED); 157 ChannelConfig::CODEC_UNDEFINED);
158 result->video_config_ = ChannelConfig(ChannelConfig::TRANSPORT_STREAM, 158 result->video_config_ =
159 kDefaultStreamVersion, 159 ChannelConfig(ChannelConfig::TRANSPORT_STREAM, kDefaultStreamVersion,
160 ChannelConfig::CODEC_VP8); 160 ChannelConfig::CODEC_VP8);
161 result->audio_config_ = ChannelConfig(ChannelConfig::TRANSPORT_NONE, 161 result->audio_config_ =
162 kDefaultStreamVersion, 162 ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, kDefaultStreamVersion,
163 ChannelConfig::CODEC_UNDEFINED); 163 ChannelConfig::CODEC_OPUS);
164 return result; 164 return result;
165 } 165 }
166 166
167 std::unique_ptr<SessionConfig> SessionConfig::ForTestWithAudio() { 167 std::unique_ptr<SessionConfig> SessionConfig::ForTestWithAudio() {
168 std::unique_ptr<SessionConfig> result(ForTest()); 168 std::unique_ptr<SessionConfig> result(ForTest());
169 result->audio_config_ = ChannelConfig(ChannelConfig::TRANSPORT_STREAM, 169 result->audio_config_ = ChannelConfig(ChannelConfig::TRANSPORT_STREAM,
170 kDefaultStreamVersion, 170 kDefaultStreamVersion,
171 ChannelConfig::CODEC_OPUS); 171 ChannelConfig::CODEC_OPUS);
172 return result; 172 return result;
173 } 173 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 void CandidateSessionConfig::PreferTransport( 306 void CandidateSessionConfig::PreferTransport(
307 ChannelConfig::TransportType transport) { 307 ChannelConfig::TransportType transport) {
308 UpdateConfigListToPreferTransport(&control_configs_, transport); 308 UpdateConfigListToPreferTransport(&control_configs_, transport);
309 UpdateConfigListToPreferTransport(&event_configs_, transport); 309 UpdateConfigListToPreferTransport(&event_configs_, transport);
310 UpdateConfigListToPreferTransport(&video_configs_, transport); 310 UpdateConfigListToPreferTransport(&video_configs_, transport);
311 UpdateConfigListToPreferTransport(&audio_configs_, transport); 311 UpdateConfigListToPreferTransport(&audio_configs_, transport);
312 } 312 }
313 313
314 } // namespace protocol 314 } // namespace protocol
315 } // namespace remoting 315 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/connection_unittest.cc ('k') | remoting/protocol/webrtc_audio_sink_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698