OLD | NEW |
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 #ifndef REMOTING_CODEC_CODEC_TEST_H_ | 5 #ifndef REMOTING_CODEC_CODEC_TEST_H_ |
6 #define REMOTING_CODEC_CODEC_TEST_H_ | 6 #define REMOTING_CODEC_CODEC_TEST_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 | 11 |
12 namespace webrtc { | 12 namespace webrtc { |
13 class DesktopFrame; | 13 class DesktopFrame; |
14 class DesktopSize; | 14 class DesktopSize; |
15 } | 15 } |
16 | 16 |
17 namespace remoting { | 17 namespace remoting { |
18 | 18 |
19 class VideoDecoder; | 19 class VideoDecoder; |
20 class VideoEncoder; | 20 class VideoEncoder; |
21 | 21 |
22 // Generate test data and test the encoder for a regular encoding sequence. | 22 // Generate test data and test the encoder for a regular encoding sequence. |
23 // This will test encoder test and the sequence of messages sent. | 23 // This will test encoder test and the sequence of messages sent. |
24 // | 24 // |
25 // If |strict| is set to true then this routine will make sure the updated | 25 // If |strict| is set to true then this routine will make sure the updated |
26 // rects match dirty rects. | 26 // rects match dirty rects. |
27 void TestVideoEncoder(VideoEncoder* encoder, bool strict); | 27 void TestVideoEncoder(VideoEncoder* encoder, bool strict); |
28 | 28 |
| 29 // Generate test data and test the encoder for a sequence of one "changed" |
| 30 // frame followed by one or more "unchanged" frames, and verify that the |
| 31 // encoder sends exactly |topoff_frames| of non-empty data for unchanged |
| 32 // frames, after which it returns null frames. |
| 33 void TestVideoEncoderEmptyFrames(VideoEncoder* encoder, int topoff_frames); |
| 34 |
29 // Generate test data and test the encoder and decoder pair. | 35 // Generate test data and test the encoder and decoder pair. |
30 // | 36 // |
31 // If |strict| is set to true, this routine will make sure the updated rects | 37 // If |strict| is set to true, this routine will make sure the updated rects |
32 // are correct. | 38 // are correct. |
33 void TestVideoEncoderDecoder(VideoEncoder* encoder, | 39 void TestVideoEncoderDecoder(VideoEncoder* encoder, |
34 VideoDecoder* decoder, | 40 VideoDecoder* decoder, |
35 bool strict); | 41 bool strict); |
36 | 42 |
37 // Generate a frame containing a gradient, and test the encoder and decoder | 43 // Generate a frame containing a gradient, and test the encoder and decoder |
38 // pair. | 44 // pair. |
(...skipping 10 matching lines...) Expand all Loading... |
49 // supply any frames then a single full-frame of randomized pixels is used. | 55 // supply any frames then a single full-frame of randomized pixels is used. |
50 float MeasureVideoEncoderFpsWithSize(VideoEncoder* encoder, | 56 float MeasureVideoEncoderFpsWithSize(VideoEncoder* encoder, |
51 const webrtc::DesktopSize& size); | 57 const webrtc::DesktopSize& size); |
52 float MeasureVideoEncoderFpsWithFrames( | 58 float MeasureVideoEncoderFpsWithFrames( |
53 VideoEncoder* encoder, | 59 VideoEncoder* encoder, |
54 const std::list<webrtc::DesktopFrame*>& frames); | 60 const std::list<webrtc::DesktopFrame*>& frames); |
55 | 61 |
56 } // namespace remoting | 62 } // namespace remoting |
57 | 63 |
58 #endif // REMOTING_CODEC_CODEC_TEST_H_ | 64 #endif // REMOTING_CODEC_CODEC_TEST_H_ |
OLD | NEW |