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

Unified Diff: remoting/test/video_renderer.cc

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: Fixing a unit test name 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
« remoting/test/video_renderer.h ('K') | « remoting/test/video_renderer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/video_renderer.cc
diff --git a/remoting/test/video_renderer.cc b/remoting/test/video_renderer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..14c8c54fb4d7d75da1a1472c03ff334de46b431a
--- /dev/null
+++ b/remoting/test/video_renderer.cc
@@ -0,0 +1,51 @@
+// 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.
+
+#include "remoting/test/video_renderer.h"
+
+#include "base/logging.h"
+#include "remoting/proto/video.pb.h"
+
+namespace remoting {
+namespace test {
+
+VideoRenderer::VideoRenderer() :
+ video_frames_processed_(0) {
+}
+
+VideoRenderer::~VideoRenderer() {
+}
+
+void VideoRenderer::OnSessionConfig(const protocol::SessionConfig& config) {
+ DVLOG(2) << "VideoRenderer::OnSessionConfig() Called";
+}
+
+ChromotingStats* VideoRenderer::GetStats() {
+ DVLOG(2) << "VideoRenderer::GetStats() Called";
+ return nullptr;
+}
+
+protocol::VideoStub* VideoRenderer::GetVideoStub() {
+ DVLOG(2) << "VideoRenderer::GetVideoStub() Called";
+ return this;
+}
+
+void VideoRenderer::ProcessVideoPacket(
+ scoped_ptr<remoting::VideoPacket> video_packet,
+ const base::Closure& done) {
+ if (!video_packet->data().empty()) {
+ // If the video frame was not a keep alive frame (i.e. not empty) then
+ // count it.
+ DVLOG(2) << "Video Packet Processed, Total: " << ++video_frames_processed_;
+ } else {
+ // Log at a high verbosity level as we receive empty packets frequently and
+ // they can clutter up the debug output if the level is set too low.
+ DVLOG(3) << "Empty Video Packet received.";
+ }
+
+ done.Run();
+}
+
+} // namespace test
+} // namespace remoting
« remoting/test/video_renderer.h ('K') | « remoting/test/video_renderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698