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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "remoting/test/video_renderer.h"
6
7 #include "base/logging.h"
8 #include "remoting/proto/video.pb.h"
9
10 namespace remoting {
11 namespace test {
12
13 VideoRenderer::VideoRenderer() :
14 video_frames_processed_(0) {
15 }
16
17 VideoRenderer::~VideoRenderer() {
18 }
19
20 void VideoRenderer::OnSessionConfig(const protocol::SessionConfig& config) {
21 DVLOG(2) << "VideoRenderer::OnSessionConfig() Called";
22 }
23
24 ChromotingStats* VideoRenderer::GetStats() {
25 DVLOG(2) << "VideoRenderer::GetStats() Called";
26 return nullptr;
27 }
28
29 protocol::VideoStub* VideoRenderer::GetVideoStub() {
30 DVLOG(2) << "VideoRenderer::GetVideoStub() Called";
31 return this;
32 }
33
34 void VideoRenderer::ProcessVideoPacket(
35 scoped_ptr<remoting::VideoPacket> video_packet,
36 const base::Closure& done) {
37 if (!video_packet->data().empty()) {
38 // If the video frame was not a keep alive frame (i.e. not empty) then
39 // count it.
40 DVLOG(2) << "Video Packet Processed, Total: " << ++video_frames_processed_;
41 } else {
42 // Log at a high verbosity level as we receive empty packets frequently and
43 // they can clutter up the debug output if the level is set too low.
44 DVLOG(3) << "Empty Video Packet received.";
45 }
46
47 done.Run();
48 }
49
50 } // namespace test
51 } // namespace remoting
OLDNEW
« 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