| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool SessionConfig::SupportsCapabilities() const { | 44 bool SessionConfig::SupportsCapabilities() const { |
| 45 return control_config_.version >= kControlStreamVersion; | 45 return control_config_.version >= kControlStreamVersion; |
| 46 } | 46 } |
| 47 | 47 |
| 48 // static | 48 // static |
| 49 SessionConfig SessionConfig::ForTest() { | 49 SessionConfig SessionConfig::ForTest() { |
| 50 SessionConfig result; | 50 SessionConfig result; |
| 51 result.set_control_config(ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, | 51 result.set_control_config(ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, |
| 52 kControlStreamVersionNoCapabilities, | 52 kControlStreamVersion, |
| 53 ChannelConfig::CODEC_UNDEFINED)); | 53 ChannelConfig::CODEC_UNDEFINED)); |
| 54 result.set_event_config(ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, | 54 result.set_event_config(ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, |
| 55 kDefaultStreamVersion, | 55 kDefaultStreamVersion, |
| 56 ChannelConfig::CODEC_UNDEFINED)); | 56 ChannelConfig::CODEC_UNDEFINED)); |
| 57 result.set_video_config(ChannelConfig(ChannelConfig::TRANSPORT_STREAM, | 57 result.set_video_config(ChannelConfig(ChannelConfig::TRANSPORT_STREAM, |
| 58 kDefaultStreamVersion, | 58 kDefaultStreamVersion, |
| 59 ChannelConfig::CODEC_VP8)); | 59 ChannelConfig::CODEC_VP8)); |
| 60 result.set_audio_config(ChannelConfig(ChannelConfig::TRANSPORT_NONE, | 60 result.set_audio_config(ChannelConfig(ChannelConfig::TRANSPORT_NONE, |
| 61 kDefaultStreamVersion, | 61 kDefaultStreamVersion, |
| 62 ChannelConfig::CODEC_UNDEFINED)); | 62 ChannelConfig::CODEC_UNDEFINED)); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 void CandidateSessionConfig::EnableVideoCodec(ChannelConfig::Codec codec) { | 215 void CandidateSessionConfig::EnableVideoCodec(ChannelConfig::Codec codec) { |
| 216 mutable_video_configs()->push_front( | 216 mutable_video_configs()->push_front( |
| 217 ChannelConfig(ChannelConfig::TRANSPORT_STREAM, | 217 ChannelConfig(ChannelConfig::TRANSPORT_STREAM, |
| 218 kDefaultStreamVersion, | 218 kDefaultStreamVersion, |
| 219 codec)); | 219 codec)); |
| 220 } | 220 } |
| 221 | 221 |
| 222 } // namespace protocol | 222 } // namespace protocol |
| 223 } // namespace remoting | 223 } // namespace remoting |
| OLD | NEW |