OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // This test generate synthetic data. For audio it's a sinusoid waveform with | 5 // This test generate synthetic data. For audio it's a sinusoid waveform with |
6 // frequency kSoundFrequency and different amplitudes. For video it's a pattern | 6 // frequency kSoundFrequency and different amplitudes. For video it's a pattern |
7 // that is shifting by one pixel per frame, each pixels neighbors right and down | 7 // that is shifting by one pixel per frame, each pixels neighbors right and down |
8 // is this pixels value +1, since the pixel value is 8 bit it will wrap | 8 // is this pixels value +1, since the pixel value is 8 bit it will wrap |
9 // frequently within the image. Visually this will create diagonally color bands | 9 // frequently within the image. Visually this will create diagonally color bands |
10 // that moves across the screen | 10 // that moves across the screen |
11 | 11 |
12 #include <math.h> | 12 #include <math.h> |
13 #include <stddef.h> | 13 #include <stddef.h> |
14 #include <stdint.h> | 14 #include <stdint.h> |
15 | 15 |
16 #include <algorithm> | 16 #include <algorithm> |
17 #include <functional> | 17 #include <functional> |
18 #include <list> | 18 #include <list> |
19 #include <map> | 19 #include <map> |
20 #include <utility> | 20 #include <utility> |
21 | 21 |
22 #include "base/bind.h" | 22 #include "base/bind.h" |
23 #include "base/bind_helpers.h" | 23 #include "base/bind_helpers.h" |
24 #include "base/memory/ptr_util.h" | 24 #include "base/memory/ptr_util.h" |
| 25 #include "base/message_loop/message_loop.h" |
25 #include "base/strings/string_number_conversions.h" | 26 #include "base/strings/string_number_conversions.h" |
26 #include "base/sys_byteorder.h" | 27 #include "base/sys_byteorder.h" |
27 #include "base/test/simple_test_tick_clock.h" | 28 #include "base/test/simple_test_tick_clock.h" |
28 #include "base/time/tick_clock.h" | 29 #include "base/time/tick_clock.h" |
29 #include "media/base/audio_bus.h" | 30 #include "media/base/audio_bus.h" |
30 #include "media/base/fake_single_thread_task_runner.h" | 31 #include "media/base/fake_single_thread_task_runner.h" |
31 #include "media/base/video_frame.h" | 32 #include "media/base/video_frame.h" |
32 #include "media/cast/cast_config.h" | 33 #include "media/cast/cast_config.h" |
33 #include "media/cast/cast_environment.h" | 34 #include "media/cast/cast_environment.h" |
34 #include "media/cast/cast_receiver.h" | 35 #include "media/cast/cast_receiver.h" |
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 EXPECT_EQ(0u, jump); | 1271 EXPECT_EQ(0u, jump); |
1271 jump = i; | 1272 jump = i; |
1272 } | 1273 } |
1273 } | 1274 } |
1274 EXPECT_GT(jump, 49u); | 1275 EXPECT_GT(jump, 49u); |
1275 EXPECT_LT(jump, 120u); | 1276 EXPECT_LT(jump, 120u); |
1276 } | 1277 } |
1277 | 1278 |
1278 } // namespace cast | 1279 } // namespace cast |
1279 } // namespace media | 1280 } // namespace media |
OLD | NEW |