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

Unified Diff: remoting/client/plugin/chromoting_instance.cc

Issue 136763009: Add VideoProcessor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 49c52102ec2693879e996829740aae53fdfc0ffd..c768d7ea1de0df7581e6a6e29a63bc471abdd6ed 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -640,17 +640,21 @@ void ChromotingInstance::ConnectWithConfig(const ClientConfig& config,
new FrameConsumerProxy(plugin_task_runner_,
view_weak_factory_->GetWeakPtr());
+ RectangleUpdateDecoder* decoder =
+ new RectangleUpdateDecoder(context_.main_task_runner(),
+ context_.decode_task_runner(),
+ consumer_proxy);
+ view_->Initialize(decoder);
+ video_processor_.reset(decoder);
+
host_connection_.reset(new protocol::ConnectionToHost(true));
scoped_ptr<AudioPlayer> audio_player(new PepperAudioPlayer(this));
- client_.reset(new ChromotingClient(config, &context_,
- host_connection_.get(), this,
- consumer_proxy, audio_player.Pass()));
-
- view_->Initialize(client_->GetFrameProducer());
+ client_.reset(new ChromotingClient(config, &context_, host_connection_.get(),
+ this, video_processor_.get(),
+ audio_player.Pass()));
- if (!plugin_view_.is_null()) {
+ if (!plugin_view_.is_null())
view_->SetView(plugin_view_);
- }
// Connect the input pipeline to the protocol stub & initialize components.
mouse_input_filter_.set_input_stub(host_connection_->input_stub());
@@ -906,9 +910,9 @@ void ChromotingInstance::HandleAllowMouseLockMessage() {
}
ChromotingStats* ChromotingInstance::GetStats() {
- if (!client_.get())
+ if (!video_processor_.get())
return NULL;
- return client_->GetStats();
+ return video_processor_->GetStats();
}
void ChromotingInstance::PostChromotingMessage(
@@ -937,7 +941,7 @@ void ChromotingInstance::SendOutgoingIq(const std::string& iq) {
}
void ChromotingInstance::SendPerfStats() {
- if (!client_.get()) {
+ if (!video_processor_.get()) {
return;
}
@@ -947,7 +951,7 @@ void ChromotingInstance::SendPerfStats() {
base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs));
scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
- ChromotingStats* stats = client_->GetStats();
+ ChromotingStats* stats = video_processor_->GetStats();
data->SetDouble("videoBandwidth", stats->video_bandwidth()->Rate());
data->SetDouble("videoFrameRate", stats->video_frame_rate()->Rate());
data->SetDouble("captureLatency", stats->video_capture_ms()->Average());

Powered by Google App Engine
This is Rietveld 408576698