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

Unified Diff: remoting/protocol/fake_connection_to_client.cc

Issue 1472873005: Add VideoStream interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_video_pump
Patch Set: Created 5 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/fake_connection_to_client.h ('k') | remoting/protocol/ice_connection_to_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_connection_to_client.cc
diff --git a/remoting/protocol/fake_connection_to_client.cc b/remoting/protocol/fake_connection_to_client.cc
index e8692784c325d06ea29814cba32801ecb8367117..3caeb550af93bdc08b87927387f8769e3e300c8b 100644
--- a/remoting/protocol/fake_connection_to_client.cc
+++ b/remoting/protocol/fake_connection_to_client.cc
@@ -5,10 +5,30 @@
#include "remoting/protocol/fake_connection_to_client.h"
#include "remoting/protocol/session.h"
+#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
namespace remoting {
namespace protocol {
+FakeVideoStream::FakeVideoStream() : weak_factory_(this) {}
+FakeVideoStream::~FakeVideoStream() {}
+
+void FakeVideoStream::Pause(bool pause) {}
+
+void FakeVideoStream::OnInputEventReceived(int64_t event_timestamp) {}
+
+void FakeVideoStream::SetLosslessEncode(bool want_lossless) {}
+
+void FakeVideoStream::SetLosslessColor(bool want_lossless) {}
+
+void FakeVideoStream::SetSizeCallback(const SizeCallback& size_callback) {
+ size_callback_ = size_callback;
+}
+
+base::WeakPtr<FakeVideoStream> FakeVideoStream::GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+}
+
FakeConnectionToClient::FakeConnectionToClient(scoped_ptr<Session> session)
: session_(session.Pass()) {}
@@ -18,8 +38,11 @@ void FakeConnectionToClient::SetEventHandler(EventHandler* event_handler) {
event_handler_ = event_handler;
}
-VideoStub* FakeConnectionToClient::video_stub() {
- return video_stub_;
+scoped_ptr<VideoStream> FakeConnectionToClient::StartVideoStream(
+ scoped_ptr<webrtc::DesktopCapturer> desktop_capturer) {
+ scoped_ptr<FakeVideoStream> result(new FakeVideoStream());
+ last_video_stream_ = result->GetWeakPtr();
+ return result.Pass();
}
AudioStub* FakeConnectionToClient::audio_stub() {
@@ -57,10 +80,5 @@ void FakeConnectionToClient::set_input_stub(InputStub* input_stub) {
input_stub_ = input_stub;
}
-void FakeConnectionToClient::set_video_feedback_stub(
- VideoFeedbackStub* video_feedback_stub) {
- video_feedback_stub_ = video_feedback_stub;
-}
-
} // namespace protocol
} // namespace remoting
« no previous file with comments | « remoting/protocol/fake_connection_to_client.h ('k') | remoting/protocol/ice_connection_to_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698