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

Unified Diff: remoting/client/jni/chromoting_jni_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
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.h ('k') | remoting/client/jni/jni_frame_consumer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/chromoting_jni_instance.cc
diff --git a/remoting/client/jni/chromoting_jni_instance.cc b/remoting/client/jni/chromoting_jni_instance.cc
index 3c7866b358c86c5368fff246769e94f0e8417b9c..96f0d35105e6a313b34a790f10a9fda92d71cc5e 100644
--- a/remoting/client/jni/chromoting_jni_instance.cc
+++ b/remoting/client/jni/chromoting_jni_instance.cc
@@ -12,6 +12,7 @@
#include "remoting/client/audio_player.h"
#include "remoting/client/jni/android_keymap.h"
#include "remoting/client/jni/chromoting_jni_runtime.h"
+#include "remoting/client/software_video_renderer.h"
#include "remoting/jingle_glue/chromium_port_allocator.h"
#include "remoting/jingle_glue/chromium_socket_factory.h"
#include "remoting/jingle_glue/network_settings.h"
@@ -188,7 +189,7 @@ void ChromotingJniInstance::RecordPaintTime(int64 paint_time_ms) {
}
if (stats_logging_enabled_)
- client_->GetStats()->video_paint_ms()->Record(paint_time_ms);
+ video_renderer_->GetStats()->video_paint_ms()->Record(paint_time_ms);
}
void ChromotingJniInstance::OnConnectionState(
@@ -298,11 +299,17 @@ void ChromotingJniInstance::ConnectToHostOnNetworkThread() {
connection_.reset(new protocol::ConnectionToHost(true));
+ SoftwareVideoRenderer* renderer =
+ new SoftwareVideoRenderer(client_context_->main_task_runner(),
+ client_context_->decode_task_runner(),
+ frame_consumer_);
+ view_->set_frame_producer(renderer);
+ video_renderer_.reset(renderer);
+
client_.reset(new ChromotingClient(
client_config_, client_context_.get(), connection_.get(),
- this, frame_consumer_, scoped_ptr<AudioPlayer>()));
+ this, video_renderer_.get(), scoped_ptr<AudioPlayer>()));
- view_->set_frame_producer(client_->GetFrameProducer());
signaling_.reset(new XmppSignalStrategy(
net::ClientSocketFactory::GetDefaultFactory(),
@@ -373,7 +380,7 @@ void ChromotingJniInstance::LogPerfStats() {
if (!stats_logging_enabled_)
return;
- ChromotingStats* stats = client_->GetStats();
+ ChromotingStats* stats = video_renderer_->GetStats();
__android_log_print(ANDROID_LOG_INFO, "stats",
"Bandwidth:%.0f FrameRate:%.1f Capture:%.1f Encode:%.1f "
"Decode:%.1f Render:%.1f Latency:%.0f",
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.h ('k') | remoting/client/jni/jni_frame_consumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698