| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <stdint.h> | 5 #include <stdint.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
| 18 #include "base/run_loop.h" |
| 18 #include "base/threading/thread_checker.h" | 19 #include "base/threading/thread_checker.h" |
| 19 #include "base/threading/thread_task_runner_handle.h" | 20 #include "base/threading/thread_task_runner_handle.h" |
| 20 #include "base/time/time.h" | 21 #include "base/time/time.h" |
| 21 #include "chromecast/base/task_runner_impl.h" | 22 #include "chromecast/base/task_runner_impl.h" |
| 22 #include "chromecast/media/cma/base/decoder_buffer_adapter.h" | 23 #include "chromecast/media/cma/base/decoder_buffer_adapter.h" |
| 23 #include "chromecast/media/cma/base/decoder_config_adapter.h" | 24 #include "chromecast/media/cma/base/decoder_config_adapter.h" |
| 24 #include "chromecast/public/cast_media_shlib.h" | 25 #include "chromecast/public/cast_media_shlib.h" |
| 25 #include "chromecast/public/media/cast_decoder_buffer.h" | 26 #include "chromecast/public/media/cast_decoder_buffer.h" |
| 26 #include "chromecast/public/media/decoder_config.h" | 27 #include "chromecast/public/media/decoder_config.h" |
| 27 #include "chromecast/public/media/media_pipeline_backend.h" | 28 #include "chromecast/public/media/media_pipeline_backend.h" |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 << "\nAverage rendering delay error: " | 342 << "\nAverage rendering delay error: " |
| 342 << audio_feeder_->average_rendering_delay_error_us(); | 343 << audio_feeder_->average_rendering_delay_error_us(); |
| 343 } | 344 } |
| 344 | 345 |
| 345 TEST_P(MultizoneBackendTest, RenderingDelay) { | 346 TEST_P(MultizoneBackendTest, RenderingDelay) { |
| 346 std::unique_ptr<base::MessageLoop> message_loop(new base::MessageLoop()); | 347 std::unique_ptr<base::MessageLoop> message_loop(new base::MessageLoop()); |
| 347 | 348 |
| 348 Initialize(GetParam()); | 349 Initialize(GetParam()); |
| 349 AddEffectsStreams(); | 350 AddEffectsStreams(); |
| 350 Start(); | 351 Start(); |
| 351 message_loop->Run(); | 352 base::RunLoop().Run(); |
| 352 } | 353 } |
| 353 | 354 |
| 354 INSTANTIATE_TEST_CASE_P(Required, | 355 INSTANTIATE_TEST_CASE_P(Required, |
| 355 MultizoneBackendTest, | 356 MultizoneBackendTest, |
| 356 ::testing::Values(8000, | 357 ::testing::Values(8000, |
| 357 11025, | 358 11025, |
| 358 12000, | 359 12000, |
| 359 16000, | 360 16000, |
| 360 22050, | 361 22050, |
| 361 24000, | 362 24000, |
| 362 32000, | 363 32000, |
| 363 44100, | 364 44100, |
| 364 48000)); | 365 48000)); |
| 365 | 366 |
| 366 INSTANTIATE_TEST_CASE_P(Optional, | 367 INSTANTIATE_TEST_CASE_P(Optional, |
| 367 MultizoneBackendTest, | 368 MultizoneBackendTest, |
| 368 ::testing::Values(64000, 88200, 96000)); | 369 ::testing::Values(64000, 88200, 96000)); |
| 369 | 370 |
| 370 } // namespace media | 371 } // namespace media |
| 371 } // namespace chromecast | 372 } // namespace chromecast |
| OLD | NEW |