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

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

Issue 850983002: Implement video frame acknowledgements in the chromoting protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
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 8
9 namespace remoting { 9 namespace remoting {
10 namespace protocol { 10 namespace protocol {
11 11
12 const int kDefaultStreamVersion = 2; 12 const int kDefaultStreamVersion = 2;
13 const int kControlStreamVersion = 3; 13 const int kControlStreamVersion = 3;
14 const int kVideoWithAckStreamVersion = 3;
14 15
15 ChannelConfig ChannelConfig::None() { 16 ChannelConfig ChannelConfig::None() {
16 return ChannelConfig(); 17 return ChannelConfig();
17 } 18 }
18 19
19 ChannelConfig::ChannelConfig() 20 ChannelConfig::ChannelConfig()
20 : transport(TRANSPORT_NONE), 21 : transport(TRANSPORT_NONE),
21 version(0), 22 version(0),
22 codec(CODEC_UNDEFINED) { 23 codec(CODEC_UNDEFINED) {
23 } 24 }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 ChannelConfig::CODEC_UNDEFINED)); 176 ChannelConfig::CODEC_UNDEFINED));
176 177
177 // Event channel. 178 // Event channel.
178 result->mutable_event_configs()->push_back( 179 result->mutable_event_configs()->push_back(
179 ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, 180 ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM,
180 kDefaultStreamVersion, 181 kDefaultStreamVersion,
181 ChannelConfig::CODEC_UNDEFINED)); 182 ChannelConfig::CODEC_UNDEFINED));
182 183
183 // Video channel. 184 // Video channel.
184 result->mutable_video_configs()->push_back( 185 result->mutable_video_configs()->push_back(
185 ChannelConfig(ChannelConfig::TRANSPORT_STREAM, 186 ChannelConfig(ChannelConfig::TRANSPORT_STREAM, kVideoWithAckStreamVersion,
186 kDefaultStreamVersion, 187 ChannelConfig::CODEC_VP8));
188 result->mutable_video_configs()->push_back(
189 ChannelConfig(ChannelConfig::TRANSPORT_STREAM, kDefaultStreamVersion,
187 ChannelConfig::CODEC_VP8)); 190 ChannelConfig::CODEC_VP8));
Wez 2015/01/21 01:35:40 This looks like you're enabling the new video-with
Sergey Ulanov 2015/01/29 01:33:29 Done.
188 191
189 // Audio channel. 192 // Audio channel.
190 result->mutable_audio_configs()->push_back( 193 result->mutable_audio_configs()->push_back(
191 ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, 194 ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM,
192 kDefaultStreamVersion, 195 kDefaultStreamVersion,
193 ChannelConfig::CODEC_OPUS)); 196 ChannelConfig::CODEC_OPUS));
194 result->mutable_audio_configs()->push_back(ChannelConfig::None()); 197 result->mutable_audio_configs()->push_back(ChannelConfig::None());
195 198
196 return result.Pass(); 199 return result.Pass();
197 } 200 }
198 201
199 void CandidateSessionConfig::DisableAudioChannel() { 202 void CandidateSessionConfig::DisableAudioChannel() {
200 mutable_audio_configs()->clear(); 203 mutable_audio_configs()->clear();
201 mutable_audio_configs()->push_back(ChannelConfig()); 204 mutable_audio_configs()->push_back(ChannelConfig());
202 } 205 }
203 206
204 void CandidateSessionConfig::EnableVideoCodec(ChannelConfig::Codec codec) { 207 void CandidateSessionConfig::EnableVideoCodec(ChannelConfig::Codec codec) {
205 mutable_video_configs()->push_front( 208 mutable_video_configs()->push_front(ChannelConfig(
206 ChannelConfig(ChannelConfig::TRANSPORT_STREAM, 209 ChannelConfig::TRANSPORT_STREAM, kDefaultStreamVersion, codec));
207 kDefaultStreamVersion, 210 mutable_video_configs()->push_front(ChannelConfig(
208 codec)); 211 ChannelConfig::TRANSPORT_STREAM, kVideoWithAckStreamVersion, codec));
209 } 212 }
210 213
211 } // namespace protocol 214 } // namespace protocol
212 } // namespace remoting 215 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698