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

Side by Side Diff: remoting/codec/codec_test.cc

Issue 1236663002: Allow shaped-desktop hosts to send shape only when it changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Pepper 2D renderer build Created 5 years, 5 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
« no previous file with comments | « remoting/codec/audio_decoder_opus.cc ('k') | remoting/codec/video_decoder_vpx.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <deque> 5 #include <deque>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 scoped_ptr<uint8[]> image_data_; 198 scoped_ptr<uint8[]> image_data_;
199 DesktopFrame* frame_; 199 DesktopFrame* frame_;
200 200
201 DISALLOW_COPY_AND_ASSIGN(VideoDecoderTester); 201 DISALLOW_COPY_AND_ASSIGN(VideoDecoderTester);
202 }; 202 };
203 203
204 // The VideoEncoderTester provides a hook for retrieving the data, and passing 204 // The VideoEncoderTester provides a hook for retrieving the data, and passing
205 // the message to other subprograms for validaton. 205 // the message to other subprograms for validaton.
206 class VideoEncoderTester { 206 class VideoEncoderTester {
207 public: 207 public:
208 VideoEncoderTester() 208 VideoEncoderTester() : decoder_tester_(nullptr), data_available_(0) {}
209 : decoder_tester_(nullptr),
210 data_available_(0) {
211 }
212 209
213 ~VideoEncoderTester() { 210 ~VideoEncoderTester() {
214 EXPECT_GT(data_available_, 0); 211 EXPECT_GT(data_available_, 0);
215 } 212 }
216 213
217 void DataAvailable(scoped_ptr<VideoPacket> packet) { 214 void DataAvailable(scoped_ptr<VideoPacket> packet) {
218 ++data_available_; 215 ++data_available_;
219 // Send the message to the VideoDecoderTester. 216 // Send the message to the VideoDecoderTester.
220 if (decoder_tester_) { 217 if (decoder_tester_) {
221 decoder_tester_->ReceivedPacket(packet.get()); 218 decoder_tester_->ReceivedPacket(packet.get());
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 447
451 if (frame_count >= kWarmUpFrameCount) { 448 if (frame_count >= kWarmUpFrameCount) {
452 elapsed = base::TimeTicks::Now() - start_time; 449 elapsed = base::TimeTicks::Now() - start_time;
453 } 450 }
454 } 451 }
455 452
456 return (frame_count * base::TimeDelta::FromSeconds(1)) / elapsed; 453 return (frame_count * base::TimeDelta::FromSeconds(1)) / elapsed;
457 } 454 }
458 455
459 } // namespace remoting 456 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/codec/audio_decoder_opus.cc ('k') | remoting/codec/video_decoder_vpx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698