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

Unified Diff: remoting/protocol/session_config.cc

Issue 5298001: Use VP8 over PseudoTCP by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed EventExecutor class. Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/session_config.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/session_config.cc
diff --git a/remoting/protocol/session_config.cc b/remoting/protocol/session_config.cc
index 608510be5daebcd5e8de6d1f1bfd69152595a32b..db4f071c43cbdb32fd51c9934695568ddeeb6262 100644
--- a/remoting/protocol/session_config.cc
+++ b/remoting/protocol/session_config.cc
@@ -105,26 +105,6 @@ CandidateSessionConfig::CandidateSessionConfig(
CandidateSessionConfig::~CandidateSessionConfig() { }
-void CandidateSessionConfig::AddControlConfig(
- const ChannelConfig& control_config) {
- control_configs_.push_back(control_config);
-}
-
-void CandidateSessionConfig::AddEventConfig(
- const ChannelConfig& event_config) {
- event_configs_.push_back(event_config);
-}
-
-void CandidateSessionConfig::AddVideoConfig(
- const ChannelConfig& video_config) {
- video_configs_.push_back(video_config);
-}
-
-void CandidateSessionConfig::SetInitialResolution(
- const ScreenResolution& resolution) {
- initial_resolution_ = resolution;
-}
-
SessionConfig* CandidateSessionConfig::Select(
const CandidateSessionConfig* client_config,
bool force_host_resolution) {
@@ -215,29 +195,37 @@ CandidateSessionConfig* CandidateSessionConfig::CreateEmpty() {
CandidateSessionConfig* CandidateSessionConfig::CreateFrom(
const SessionConfig* config) {
CandidateSessionConfig* result = CreateEmpty();
- result->AddControlConfig(config->control_config());
- result->AddEventConfig(config->event_config());
- result->AddVideoConfig(config->video_config());
- result->SetInitialResolution(config->initial_resolution());
+ result->mutable_control_configs()->push_back(config->control_config());
+ result->mutable_event_configs()->push_back(config->event_config());
+ result->mutable_video_configs()->push_back(config->video_config());
+ *result->mutable_initial_resolution() = (config->initial_resolution());
return result;
}
// static
CandidateSessionConfig* CandidateSessionConfig::CreateDefault() {
CandidateSessionConfig* result = CreateEmpty();
- result->AddControlConfig(ChannelConfig(ChannelConfig::TRANSPORT_STREAM,
- kDefaultStreamVersion,
- ChannelConfig::CODEC_UNDEFINED));
- result->AddEventConfig(ChannelConfig(ChannelConfig::TRANSPORT_STREAM,
- kDefaultStreamVersion,
- ChannelConfig::CODEC_UNDEFINED));
-
- result->AddVideoConfig(ChannelConfig(ChannelConfig::TRANSPORT_STREAM,
- kDefaultStreamVersion,
- ChannelConfig::CODEC_ZIP));
- result->AddVideoConfig(ChannelConfig(ChannelConfig::TRANSPORT_SRTP,
- kDefaultStreamVersion,
- ChannelConfig::CODEC_VP8));
+ result->mutable_control_configs()->push_back(
+ ChannelConfig(ChannelConfig::TRANSPORT_STREAM,
+ kDefaultStreamVersion,
+ ChannelConfig::CODEC_UNDEFINED));
+ result->mutable_event_configs()->push_back(
+ ChannelConfig(ChannelConfig::TRANSPORT_STREAM,
+ kDefaultStreamVersion,
+ ChannelConfig::CODEC_UNDEFINED));
+
+ result->mutable_video_configs()->push_back(
+ ChannelConfig(ChannelConfig::TRANSPORT_STREAM,
+ kDefaultStreamVersion,
+ ChannelConfig::CODEC_VP8));
+ result->mutable_video_configs()->push_back(
+ ChannelConfig(ChannelConfig::TRANSPORT_STREAM,
+ kDefaultStreamVersion,
+ ChannelConfig::CODEC_ZIP));
+ result->mutable_video_configs()->push_back(
+ ChannelConfig(ChannelConfig::TRANSPORT_SRTP,
+ kDefaultStreamVersion,
+ ChannelConfig::CODEC_VP8));
return result;
}
« no previous file with comments | « remoting/protocol/session_config.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698