OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BASE_CODEC_TEST_H_ | 5 #ifndef REMOTING_BASE_CODEC_TEST_H_ |
6 #define REMOTING_BASE_CODEC_TEST_H_ | 6 #define REMOTING_BASE_CODEC_TEST_H_ |
7 | 7 |
8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
9 #include "media/base/video_frame.h" | 9 #include "media/base/video_frame.h" |
10 #include "remoting/base/capture_data.h" | 10 #include "remoting/base/capture_data.h" |
11 | 11 |
12 namespace remoting { | 12 namespace remoting { |
13 | 13 |
14 class Decoder; | 14 class Decoder; |
15 class Encoder; | 15 class Encoder; |
16 | 16 |
17 // Prepare testing data for encoding. Memory created is written to |memory|. | 17 // Prepare testing data for encoding. Memory created is written to |memory|. |
18 // Returns randomly generated data in CaptureData. | 18 // Returns randomly generated data in CaptureData. |
19 scoped_refptr<CaptureData> PrepareEncodeData(PixelFormat format, | 19 scoped_refptr<CaptureData> PrepareEncodeData(media::VideoFrame::Format format, |
20 uint8** memory); | 20 uint8** memory); |
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 TestEncoder(Encoder* encoder, bool strict); | 27 void TestEncoder(Encoder* encoder, bool strict); |
28 | 28 |
29 // Generate test data and test the encoder and decoder pair. | 29 // Generate test data and test the encoder and decoder pair. |
30 // | 30 // |
31 // If |strict| is set to true, this routine will make sure the updated rects | 31 // If |strict| is set to true, this routine will make sure the updated rects |
32 // are correct. | 32 // are correct. |
33 void TestEncoderDecoder(Encoder* encoder, Decoder* decoder, bool strict); | 33 void TestEncoderDecoder(Encoder* encoder, Decoder* decoder, bool strict); |
34 | 34 |
35 } // namespace remoting | 35 } // namespace remoting |
36 | 36 |
37 #endif // REMOTING_BASE_CODEC_TEST_H_ | 37 #endif // REMOTING_BASE_CODEC_TEST_H_ |
OLD | NEW |