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

Side by Side Diff: remoting/test/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: 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 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/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 TestVideoRenderer::TestVideoRenderer() : video_frames_processed_(0) {
14 }
15
16 TestVideoRenderer::~TestVideoRenderer() {
17 }
18
19 void TestVideoRenderer::OnSessionConfig(const protocol::SessionConfig& config) {
20 DVLOG(2) << "TestVideoRenderer::OnSessionConfig() Called";
21 }
22
23 ChromotingStats* TestVideoRenderer::GetStats() {
24 DVLOG(2) << "TestVideoRenderer::GetStats() Called";
25 return nullptr;
26 }
27
28 protocol::VideoStub* TestVideoRenderer::GetVideoStub() {
29 DVLOG(2) << "TestVideoRenderer::GetVideoStub() Called";
30 return this;
31 }
32
33 void TestVideoRenderer::ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet,
34 const base::Closure& done) {
35 if (!video_packet->data().empty()) {
36 // If the video frame was not a keep alive frame (i.e. not empty) then
37 // count it.
38 DVLOG(2) << "Video Packet Processed, Total: " << ++video_frames_processed_;
39 } else {
40 // Log at a high verbosity level as we receive empty packets frequently and
41 // they can clutter up the debug output if the level is set too low.
42 DVLOG(3) << "Empty Video Packet received.";
43 }
44
45 done.Run();
46 }
47
48 } // namespace test
49 } // namespace remoting
OLDNEW
« remoting/test/test_chromoting_client_unittest.cc ('K') | « remoting/test/test_video_renderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698