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 "media/gpu/avda_codec_allocator.h" | 5 #include "media/gpu/avda_codec_allocator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/single_thread_task_runner.h" |
12 #include "base/sys_info.h" | 13 #include "base/sys_info.h" |
13 #include "base/task_runner_util.h" | 14 #include "base/task_runner_util.h" |
14 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
15 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
16 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
17 #include "base/time/default_tick_clock.h" | 18 #include "base/time/default_tick_clock.h" |
18 #include "base/trace_event/trace_event.h" | 19 #include "base/trace_event/trace_event.h" |
19 #include "media/base/android/media_codec_bridge_impl.h" | 20 #include "media/base/android/media_codec_bridge_impl.h" |
20 #include "media/base/limits.h" | 21 #include "media/base/limits.h" |
21 #include "media/base/media.h" | 22 #include "media/base/media.h" |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 void AVDACodecAllocator::StopThreadTask(size_t index) { | 342 void AVDACodecAllocator::StopThreadTask(size_t index) { |
342 threads_[index]->thread.Stop(); | 343 threads_[index]->thread.Stop(); |
343 // Signal the stop event after both threads are stopped. | 344 // Signal the stop event after both threads are stopped. |
344 if (stop_event_for_testing_ && !threads_[AUTO_CODEC]->thread.IsRunning() && | 345 if (stop_event_for_testing_ && !threads_[AUTO_CODEC]->thread.IsRunning() && |
345 !threads_[SW_CODEC]->thread.IsRunning()) { | 346 !threads_[SW_CODEC]->thread.IsRunning()) { |
346 stop_event_for_testing_->Signal(); | 347 stop_event_for_testing_->Signal(); |
347 } | 348 } |
348 } | 349 } |
349 | 350 |
350 } // namespace media | 351 } // namespace media |
OLD | NEW |