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

Unified Diff: remoting/protocol/connection_to_host.cc

Issue 577473002: Simplify VideoReader and VideoWriter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/protocol/connection_to_host.h ('k') | remoting/protocol/host_video_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_host.cc
diff --git a/remoting/protocol/connection_to_host.cc b/remoting/protocol/connection_to_host.cc
index 71c7764fd383d7a859385ced6c1e5ce5662e4000..94f33c8f546772e2efe77887140a84651f417f4d 100644
--- a/remoting/protocol/connection_to_host.cc
+++ b/remoting/protocol/connection_to_host.cc
@@ -15,11 +15,11 @@
#include "remoting/protocol/client_control_dispatcher.h"
#include "remoting/protocol/client_event_dispatcher.h"
#include "remoting/protocol/client_stub.h"
+#include "remoting/protocol/client_video_dispatcher.h"
#include "remoting/protocol/clipboard_stub.h"
#include "remoting/protocol/errors.h"
#include "remoting/protocol/jingle_session_manager.h"
#include "remoting/protocol/transport.h"
-#include "remoting/protocol/video_reader.h"
#include "remoting/protocol/video_stub.h"
namespace remoting {
@@ -197,8 +197,9 @@ void ConnectionToHost::OnSessionStateChange(
base::Bind(&ConnectionToHost::OnChannelInitialized,
base::Unretained(this)));
- video_reader_ = VideoReader::Create(session_->config());
- video_reader_->Init(session_.get(), monitored_video_stub_.get(),
+ video_dispatcher_.reset(
+ new ClientVideoDispatcher(monitored_video_stub_.get()));
+ video_dispatcher_->Init(session_.get(), session_->config().video_config(),
base::Bind(&ConnectionToHost::OnChannelInitialized,
base::Unretained(this)));
@@ -263,7 +264,7 @@ void ConnectionToHost::NotifyIfChannelsReady() {
return;
if (!event_dispatcher_.get() || !event_dispatcher_->is_connected())
return;
- if (!video_reader_.get() || !video_reader_->is_connected())
+ if (!video_dispatcher_.get() || !video_dispatcher_->is_connected())
return;
if ((!audio_reader_.get() || !audio_reader_->is_connected()) &&
session_->config().is_audio_enabled()) {
@@ -288,7 +289,7 @@ void ConnectionToHost::CloseChannels() {
event_dispatcher_.reset();
clipboard_forwarder_.set_clipboard_stub(NULL);
event_forwarder_.set_input_stub(NULL);
- video_reader_.reset();
+ video_dispatcher_.reset();
audio_reader_.reset();
}
« no previous file with comments | « remoting/protocol/connection_to_host.h ('k') | remoting/protocol/host_video_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698