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

Unified Diff: remoting/test/test_video_renderer.h

Issue 976233003: Adding the base ChromotingInstance implementation and unittests. This class will be used by the ap… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Sergey's feedback Created 5 years, 9 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/test/test_video_renderer.h
diff --git a/remoting/test/test_video_renderer.h b/remoting/test/test_video_renderer.h
new file mode 100644
index 0000000000000000000000000000000000000000..d5a710e0e9860cf831350ad6bbfcf7db4404b868
--- /dev/null
+++ b/remoting/test/test_video_renderer.h
@@ -0,0 +1,41 @@
+// Copyright 2015 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.
+
+#ifndef REMOTING_TEST_TEST_VIDEO_RENDERER_H_
+#define REMOTING_TEST_TEST_VIDEO_RENDERER_H_
+
+#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
+#include "remoting/client/video_renderer.h"
+#include "remoting/protocol/video_stub.h"
+
+namespace remoting {
+namespace test {
+
+// Processes video packets as they are received from the remote host.
+class TestVideoRenderer : public VideoRenderer, public protocol::VideoStub {
+ public:
+ TestVideoRenderer();
+ ~TestVideoRenderer() override;
+
+ // VideoRenderer interface.
+ void OnSessionConfig(const protocol::SessionConfig& config) override;
+ ChromotingStats* GetStats() override;
+ protocol::VideoStub* GetVideoStub() override;
+
+ private:
+ // protocol::VideoStub interface.
+ void ProcessVideoPacket(scoped_ptr<remoting::VideoPacket> video_packet,
+ const base::Closure& done) override;
+
+ // Track the number of populated video frames which have been received.
+ int video_frames_processed_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestVideoRenderer);
+};
+
+} // namespace test
+} // namespace remoting
+
+#endif // REMOTING_TEST_TEST_VIDEO_RENDERER_H_

Powered by Google App Engine
This is Rietveld 408576698