OLD | NEW |
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 ChannelConfig::CODEC_UNDEFINED); | 157 ChannelConfig::CODEC_UNDEFINED); |
158 result->video_config_ = ChannelConfig(ChannelConfig::TRANSPORT_STREAM, | 158 result->video_config_ = ChannelConfig(ChannelConfig::TRANSPORT_STREAM, |
159 kDefaultStreamVersion, | 159 kDefaultStreamVersion, |
160 ChannelConfig::CODEC_VP8); | 160 ChannelConfig::CODEC_VP8); |
161 result->audio_config_ = ChannelConfig(ChannelConfig::TRANSPORT_NONE, | 161 result->audio_config_ = ChannelConfig(ChannelConfig::TRANSPORT_NONE, |
162 kDefaultStreamVersion, | 162 kDefaultStreamVersion, |
163 ChannelConfig::CODEC_UNDEFINED); | 163 ChannelConfig::CODEC_UNDEFINED); |
164 return result; | 164 return result; |
165 } | 165 } |
166 | 166 |
| 167 std::unique_ptr<SessionConfig> SessionConfig::ForTestWithAudio() { |
| 168 std::unique_ptr<SessionConfig> result(ForTest()); |
| 169 result->audio_config_ = ChannelConfig(ChannelConfig::TRANSPORT_STREAM, |
| 170 kDefaultStreamVersion, |
| 171 ChannelConfig::CODEC_OPUS); |
| 172 return result; |
| 173 } |
| 174 |
167 std::unique_ptr<SessionConfig> SessionConfig::ForTestWithVerbatimVideo() { | 175 std::unique_ptr<SessionConfig> SessionConfig::ForTestWithVerbatimVideo() { |
168 std::unique_ptr<SessionConfig> result = ForTest(); | 176 std::unique_ptr<SessionConfig> result = ForTest(); |
169 result->video_config_ = ChannelConfig(ChannelConfig::TRANSPORT_STREAM, | 177 result->video_config_ = ChannelConfig(ChannelConfig::TRANSPORT_STREAM, |
170 kDefaultStreamVersion, | 178 kDefaultStreamVersion, |
171 ChannelConfig::CODEC_VERBATIM); | 179 ChannelConfig::CODEC_VERBATIM); |
172 return result; | 180 return result; |
173 } | 181 } |
174 | 182 |
175 std::unique_ptr<SessionConfig> SessionConfig::ForTestWithWebrtc() { | 183 std::unique_ptr<SessionConfig> SessionConfig::ForTestWithWebrtc() { |
176 return base::WrapUnique(new SessionConfig(Protocol::WEBRTC)); | 184 return base::WrapUnique(new SessionConfig(Protocol::WEBRTC)); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 void CandidateSessionConfig::PreferTransport( | 306 void CandidateSessionConfig::PreferTransport( |
299 ChannelConfig::TransportType transport) { | 307 ChannelConfig::TransportType transport) { |
300 UpdateConfigListToPreferTransport(&control_configs_, transport); | 308 UpdateConfigListToPreferTransport(&control_configs_, transport); |
301 UpdateConfigListToPreferTransport(&event_configs_, transport); | 309 UpdateConfigListToPreferTransport(&event_configs_, transport); |
302 UpdateConfigListToPreferTransport(&video_configs_, transport); | 310 UpdateConfigListToPreferTransport(&video_configs_, transport); |
303 UpdateConfigListToPreferTransport(&audio_configs_, transport); | 311 UpdateConfigListToPreferTransport(&audio_configs_, transport); |
304 } | 312 } |
305 | 313 |
306 } // namespace protocol | 314 } // namespace protocol |
307 } // namespace remoting | 315 } // namespace remoting |
OLD | NEW |