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/sys_info.h" | 12 #include "base/sys_info.h" |
13 #include "base/task_runner_util.h" | 13 #include "base/task_runner_util.h" |
14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
15 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
16 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
17 #include "base/time/default_tick_clock.h" | 17 #include "base/time/default_tick_clock.h" |
18 #include "base/trace_event/trace_event.h" | 18 #include "base/trace_event/trace_event.h" |
19 #include "media/base/android/sdk_media_codec_bridge.h" | 19 #include "media/base/android/media_codec_bridge.h" |
20 #include "media/base/limits.h" | 20 #include "media/base/limits.h" |
21 #include "media/base/media.h" | 21 #include "media/base/media.h" |
22 #include "media/base/timestamp_constants.h" | 22 #include "media/base/timestamp_constants.h" |
23 #include "media/gpu/android_video_decode_accelerator.h" | 23 #include "media/gpu/android_video_decode_accelerator.h" |
24 | 24 |
25 namespace media { | 25 namespace media { |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 base::LazyInstance<AVDACodecAllocator>::Leaky g_avda_codec_allocator = | 29 base::LazyInstance<AVDACodecAllocator>::Leaky g_avda_codec_allocator = |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 void AVDACodecAllocator::StopThreadTask(size_t index) { | 360 void AVDACodecAllocator::StopThreadTask(size_t index) { |
361 threads_[index]->thread.Stop(); | 361 threads_[index]->thread.Stop(); |
362 // Signal the stop event after both threads are stopped. | 362 // Signal the stop event after both threads are stopped. |
363 if (stop_event_for_testing_ && !threads_[AUTO_CODEC]->thread.IsRunning() && | 363 if (stop_event_for_testing_ && !threads_[AUTO_CODEC]->thread.IsRunning() && |
364 !threads_[SW_CODEC]->thread.IsRunning()) { | 364 !threads_[SW_CODEC]->thread.IsRunning()) { |
365 stop_event_for_testing_->Signal(); | 365 stop_event_for_testing_->Signal(); |
366 } | 366 } |
367 } | 367 } |
368 | 368 |
369 } // namespace media | 369 } // namespace media |
OLD | NEW |