| 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 | 8 |
| 9 namespace remoting { | 9 namespace remoting { |
| 10 namespace protocol { | 10 namespace protocol { |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 kControlStreamVersion, | 174 kControlStreamVersion, |
| 175 ChannelConfig::CODEC_UNDEFINED)); | 175 ChannelConfig::CODEC_UNDEFINED)); |
| 176 | 176 |
| 177 // Event channel. | 177 // Event channel. |
| 178 result->mutable_event_configs()->push_back( | 178 result->mutable_event_configs()->push_back( |
| 179 ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, | 179 ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, |
| 180 kDefaultStreamVersion, | 180 kDefaultStreamVersion, |
| 181 ChannelConfig::CODEC_UNDEFINED)); | 181 ChannelConfig::CODEC_UNDEFINED)); |
| 182 | 182 |
| 183 // Video channel. | 183 // Video channel. |
| 184 #if !defined(MEDIA_DISABLE_LIBVPX) | |
| 185 result->mutable_video_configs()->push_back( | 184 result->mutable_video_configs()->push_back( |
| 186 ChannelConfig(ChannelConfig::TRANSPORT_STREAM, | 185 ChannelConfig(ChannelConfig::TRANSPORT_STREAM, |
| 187 kDefaultStreamVersion, | 186 kDefaultStreamVersion, |
| 188 ChannelConfig::CODEC_VP8)); | 187 ChannelConfig::CODEC_VP8)); |
| 189 #endif // !defined(MEDIA_DISABLE_LIBVPX) | |
| 190 | 188 |
| 191 // Audio channel. | 189 // Audio channel. |
| 192 result->mutable_audio_configs()->push_back( | 190 result->mutable_audio_configs()->push_back( |
| 193 ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, | 191 ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, |
| 194 kDefaultStreamVersion, | 192 kDefaultStreamVersion, |
| 195 ChannelConfig::CODEC_OPUS)); | 193 ChannelConfig::CODEC_OPUS)); |
| 196 result->mutable_audio_configs()->push_back(ChannelConfig::None()); | 194 result->mutable_audio_configs()->push_back(ChannelConfig::None()); |
| 197 | 195 |
| 198 return result.Pass(); | 196 return result.Pass(); |
| 199 } | 197 } |
| 200 | 198 |
| 201 void CandidateSessionConfig::DisableAudioChannel() { | 199 void CandidateSessionConfig::DisableAudioChannel() { |
| 202 mutable_audio_configs()->clear(); | 200 mutable_audio_configs()->clear(); |
| 203 mutable_audio_configs()->push_back(ChannelConfig()); | 201 mutable_audio_configs()->push_back(ChannelConfig()); |
| 204 } | 202 } |
| 205 | 203 |
| 206 void CandidateSessionConfig::EnableVideoCodec(ChannelConfig::Codec codec) { | 204 void CandidateSessionConfig::EnableVideoCodec(ChannelConfig::Codec codec) { |
| 207 mutable_video_configs()->push_front( | 205 mutable_video_configs()->push_front( |
| 208 ChannelConfig(ChannelConfig::TRANSPORT_STREAM, | 206 ChannelConfig(ChannelConfig::TRANSPORT_STREAM, |
| 209 kDefaultStreamVersion, | 207 kDefaultStreamVersion, |
| 210 codec)); | 208 codec)); |
| 211 } | 209 } |
| 212 | 210 |
| 213 } // namespace protocol | 211 } // namespace protocol |
| 214 } // namespace remoting | 212 } // namespace remoting |
| OLD | NEW |