summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorsergeyu <sergeyu@chromium.org>2016-01-05 10:30:55 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-05 18:32:45 +0000
commitfeaabdc961c08518ea40392db837c92b26226b70 (patch)
tree68498d74d5c74cee6b0f623a5b4359ef8ff5cf10 /remoting
parent927c0018c662b69a75c0de5cd26603c40d6a6111 (diff)
downloadchromium_src-feaabdc961c08518ea40392db837c92b26226b70.zip
chromium_src-feaabdc961c08518ea40392db837c92b26226b70.tar.gz
chromium_src-feaabdc961c08518ea40392db837c92b26226b70.tar.bz2
Move VideoRenderer to remoting/protocol
VideoRenderer interface is going to be used by ConnectionToHost, so it belongs to the protocol layer. BUG=547158 Review URL: https://codereview.chromium.org/1559023003 Cr-Commit-Position: refs/heads/master@{#367588}
Diffstat (limited to 'remoting')
-rw-r--r--remoting/client/chromoting_client.cc4
-rw-r--r--remoting/client/chromoting_client.h6
-rw-r--r--remoting/client/jni/chromoting_jni_instance.h4
-rw-r--r--remoting/client/plugin/pepper_video_renderer.h4
-rw-r--r--remoting/client/software_video_renderer.h4
-rw-r--r--remoting/protocol/video_renderer.h (renamed from remoting/client/video_renderer.h)10
-rw-r--r--remoting/remoting_srcs.gypi2
-rw-r--r--remoting/test/protocol_perftest.cc4
-rw-r--r--remoting/test/test_chromoting_client.cc2
-rw-r--r--remoting/test/test_chromoting_client.h7
-rw-r--r--remoting/test/test_video_renderer.h5
11 files changed, 27 insertions, 25 deletions
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc
index 9a9506f..ed4ce78 100644
--- a/remoting/client/chromoting_client.cc
+++ b/remoting/client/chromoting_client.cc
@@ -11,7 +11,6 @@
#include "remoting/client/audio_player.h"
#include "remoting/client/client_context.h"
#include "remoting/client/client_user_interface.h"
-#include "remoting/client/video_renderer.h"
#include "remoting/protocol/authenticator.h"
#include "remoting/protocol/connection_to_host.h"
#include "remoting/protocol/host_stub.h"
@@ -20,12 +19,13 @@
#include "remoting/protocol/jingle_session_manager.h"
#include "remoting/protocol/session_config.h"
#include "remoting/protocol/transport_context.h"
+#include "remoting/protocol/video_renderer.h"
namespace remoting {
ChromotingClient::ChromotingClient(ClientContext* client_context,
ClientUserInterface* user_interface,
- VideoRenderer* video_renderer,
+ protocol::VideoRenderer* video_renderer,
scoped_ptr<AudioPlayer> audio_player)
: user_interface_(user_interface),
video_renderer_(video_renderer),
diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h
index dffbc5a..173e1b0 100644
--- a/remoting/client/chromoting_client.h
+++ b/remoting/client/chromoting_client.h
@@ -31,6 +31,7 @@ namespace protocol {
class CandidateSessionConfig;
class SessionManager;
class TransportContext;
+class VideoRenderer;
} // namespace protocol
class AudioDecodeScheduler;
@@ -39,7 +40,6 @@ class ClientContext;
class ClientUserInterface;
class FrameConsumerProxy;
class FrameProducer;
-class VideoRenderer;
class ChromotingClient : public SignalStrategy::Listener,
public protocol::ConnectionToHost::HostEventCallback,
@@ -50,7 +50,7 @@ class ChromotingClient : public SignalStrategy::Listener,
// requested.
ChromotingClient(ClientContext* client_context,
ClientUserInterface* user_interface,
- VideoRenderer* video_renderer,
+ protocol::VideoRenderer* video_renderer,
scoped_ptr<AudioPlayer> audio_player);
~ChromotingClient() override;
@@ -118,7 +118,7 @@ class ChromotingClient : public SignalStrategy::Listener,
// The following are not owned by this class.
ClientUserInterface* user_interface_ = nullptr;
- VideoRenderer* video_renderer_ = nullptr;
+ protocol::VideoRenderer* video_renderer_ = nullptr;
SignalStrategy* signal_strategy_ = nullptr;
std::string host_jid_;
diff --git a/remoting/client/jni/chromoting_jni_instance.h b/remoting/client/jni/chromoting_jni_instance.h
index 89e2bd2..044ac24 100644
--- a/remoting/client/jni/chromoting_jni_instance.h
+++ b/remoting/client/jni/chromoting_jni_instance.h
@@ -27,13 +27,13 @@ namespace protocol {
class ClipboardEvent;
class CursorShapeInfo;
class PerformanceTracker;
+class VideoRenderer;
} // namespace protocol
class ChromotingJniRuntime;
class ClientStatusLogger;
class JniFrameConsumer;
class TokenFetcherProxy;
-class VideoRenderer;
// ClientUserInterface that indirectly makes and receives JNI calls.
class ChromotingJniInstance
@@ -154,7 +154,7 @@ class ChromotingJniInstance
scoped_ptr<ClientContext> client_context_;
scoped_ptr<protocol::PerformanceTracker> perf_tracker_;
scoped_ptr<JniFrameConsumer> view_;
- scoped_ptr<VideoRenderer> video_renderer_;
+ scoped_ptr<protocol::VideoRenderer> video_renderer_;
scoped_ptr<protocol::Authenticator> authenticator_;
scoped_ptr<ChromotingClient> client_;
XmppSignalStrategy::XmppServerConfig xmpp_config_;
diff --git a/remoting/client/plugin/pepper_video_renderer.h b/remoting/client/plugin/pepper_video_renderer.h
index bcf4f325..a5637bc 100644
--- a/remoting/client/plugin/pepper_video_renderer.h
+++ b/remoting/client/plugin/pepper_video_renderer.h
@@ -5,7 +5,7 @@
#ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_
#define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_
-#include "remoting/client/video_renderer.h"
+#include "remoting/protocol/video_renderer.h"
namespace webrtc {
class DesktopSize;
@@ -27,7 +27,7 @@ class PerformanceTracker;
} // namespace protocol
// Interface for video renderers that render video in pepper plugin.
-class PepperVideoRenderer : public VideoRenderer {
+class PepperVideoRenderer : public protocol::VideoRenderer {
public:
class EventHandler {
public:
diff --git a/remoting/client/software_video_renderer.h b/remoting/client/software_video_renderer.h
index d67e3e5..b88fb45 100644
--- a/remoting/client/software_video_renderer.h
+++ b/remoting/client/software_video_renderer.h
@@ -12,8 +12,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
-#include "remoting/client/video_renderer.h"
#include "remoting/protocol/performance_tracker.h"
+#include "remoting/protocol/video_renderer.h"
#include "remoting/protocol/video_stub.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
@@ -36,7 +36,7 @@ class PerformanceTracker;
// Implementation of VideoRenderer interface that decodes frame on CPU (on a
// decode thread) and then passes decoded frames to a FrameConsumer.
-class SoftwareVideoRenderer : public VideoRenderer,
+class SoftwareVideoRenderer : public protocol::VideoRenderer,
public protocol::VideoStub {
public:
// All methods must be called on the same thread the renderer is created. The
diff --git a/remoting/client/video_renderer.h b/remoting/protocol/video_renderer.h
index 8005168..4d2c05f 100644
--- a/remoting/client/video_renderer.h
+++ b/remoting/protocol/video_renderer.h
@@ -1,4 +1,4 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,11 +6,10 @@
#define REMOTING_CLIENT_VIDEO_RENDERER_H_
namespace remoting {
-
namespace protocol {
+
class SessionConfig;
class VideoStub;
-} // namespace protocol;
// VideoRenderer is responsible for decoding and displaying incoming video
// stream.
@@ -20,12 +19,13 @@ class VideoRenderer {
// Configures the renderer with the supplied |config|. This must be called
// exactly once before video data is supplied to the renderer.
- virtual void OnSessionConfig(const protocol::SessionConfig& config) = 0;
+ virtual void OnSessionConfig(const SessionConfig& config) = 0;
// Returns the VideoStub interface of this renderer.
- virtual protocol::VideoStub* GetVideoStub() = 0;
+ virtual VideoStub* GetVideoStub() = 0;
};
+} // namespace protocol;
} // namespace remoting
#endif // REMOTING_CLIENT_VIDEO_RENDERER_H_
diff --git a/remoting/remoting_srcs.gypi b/remoting/remoting_srcs.gypi
index bfc279a..7a157a2 100644
--- a/remoting/remoting_srcs.gypi
+++ b/remoting/remoting_srcs.gypi
@@ -196,6 +196,7 @@
'protocol/transport_context.h',
'protocol/v2_authenticator.cc',
'protocol/v2_authenticator.h',
+ 'protocol/video_renderer.h',
'protocol/video_stub.h',
],
@@ -279,7 +280,6 @@
'client/token_fetcher_proxy.h',
'client/touch_input_scaler.cc',
'client/touch_input_scaler.h',
- 'client/video_renderer.h',
],
'remoting_client_plugin_sources': [
diff --git a/remoting/test/protocol_perftest.cc b/remoting/test/protocol_perftest.cc
index 91b3eaa..0bd0c30 100644
--- a/remoting/test/protocol_perftest.cc
+++ b/remoting/test/protocol_perftest.cc
@@ -21,7 +21,6 @@
#include "remoting/client/chromoting_client.h"
#include "remoting/client/client_context.h"
#include "remoting/client/client_user_interface.h"
-#include "remoting/client/video_renderer.h"
#include "remoting/host/chromoting_host.h"
#include "remoting/host/chromoting_host_context.h"
#include "remoting/host/fake_desktop_environment.h"
@@ -31,6 +30,7 @@
#include "remoting/protocol/session_config.h"
#include "remoting/protocol/transport_context.h"
#include "remoting/protocol/video_frame_pump.h"
+#include "remoting/protocol/video_renderer.h"
#include "remoting/signaling/fake_signal_strategy.h"
#include "remoting/test/fake_network_dispatcher.h"
#include "remoting/test/fake_port_allocator.h"
@@ -77,7 +77,7 @@ class ProtocolPerfTest
: public testing::Test,
public testing::WithParamInterface<NetworkPerformanceParams>,
public ClientUserInterface,
- public VideoRenderer,
+ public protocol::VideoRenderer,
public protocol::VideoStub,
public HostStatusObserver {
public:
diff --git a/remoting/test/test_chromoting_client.cc b/remoting/test/test_chromoting_client.cc
index 37d6264..027cd01 100644
--- a/remoting/test/test_chromoting_client.cc
+++ b/remoting/test/test_chromoting_client.cc
@@ -70,7 +70,7 @@ TestChromotingClient::TestChromotingClient()
: TestChromotingClient(nullptr) {}
TestChromotingClient::TestChromotingClient(
- scoped_ptr<VideoRenderer> video_renderer)
+ scoped_ptr<protocol::VideoRenderer> video_renderer)
: connection_to_host_state_(protocol::ConnectionToHost::INITIALIZING),
connection_error_code_(protocol::OK),
video_renderer_(std::move(video_renderer)) {}
diff --git a/remoting/test/test_chromoting_client.h b/remoting/test/test_chromoting_client.h
index 15c5db1..33e69f6 100644
--- a/remoting/test/test_chromoting_client.h
+++ b/remoting/test/test_chromoting_client.h
@@ -21,12 +21,12 @@ namespace remoting {
class ClientContext;
class XmppSignalStrategy;
-class VideoRenderer;
namespace protocol {
class ClipboardStub;
class HostStub;
class InputStub;
+class VideoRenderer;
} // namespace protocol
namespace test {
@@ -44,7 +44,8 @@ class TestChromotingClient : public ClientUserInterface,
public protocol::CursorShapeStub {
public:
TestChromotingClient();
- explicit TestChromotingClient(scoped_ptr<VideoRenderer> video_renderer);
+ explicit TestChromotingClient(
+ scoped_ptr<protocol::VideoRenderer> video_renderer);
~TestChromotingClient() override;
// Starts a Chromoting connection using the specified connection setup info.
@@ -114,7 +115,7 @@ class TestChromotingClient : public ClientUserInterface,
scoped_ptr<ClientContext> client_context_;
// Processes video packets from the host.
- scoped_ptr<VideoRenderer> video_renderer_;
+ scoped_ptr<protocol::VideoRenderer> video_renderer_;
// SignalStrategy used for connection signaling.
scoped_ptr<SignalStrategy> signal_strategy_;
diff --git a/remoting/test/test_video_renderer.h b/remoting/test/test_video_renderer.h
index d58266b..c09ad42 100644
--- a/remoting/test/test_video_renderer.h
+++ b/remoting/test/test_video_renderer.h
@@ -9,8 +9,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
-#include "remoting/client/video_renderer.h"
#include "remoting/protocol/session_config.h"
+#include "remoting/protocol/video_renderer.h"
#include "remoting/protocol/video_stub.h"
namespace base {
@@ -32,7 +32,8 @@ struct RGBValue;
// used from a thread running a message loop and this class will use that
// message loop to execute the done callbacks passed by the caller of
// ProcessVideoPacket.
-class TestVideoRenderer : public VideoRenderer, public protocol::VideoStub {
+class TestVideoRenderer : public protocol::VideoRenderer,
+ public protocol::VideoStub {
public:
TestVideoRenderer();
~TestVideoRenderer() override;