| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "content/common/gpu/media/android_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/android_video_decode_accelerator.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 | 495 |
| 496 NOTIMPLEMENTED(); | 496 NOTIMPLEMENTED(); |
| 497 NotifyInitializationComplete(false); | 497 NotifyInitializationComplete(false); |
| 498 | 498 |
| 499 #endif // !defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS) | 499 #endif // !defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS) |
| 500 } | 500 } |
| 501 | 501 |
| 502 void AndroidVideoDecodeAccelerator::DoIOTask(bool start_timer) { | 502 void AndroidVideoDecodeAccelerator::DoIOTask(bool start_timer) { |
| 503 DCHECK(thread_checker_.CalledOnValidThread()); | 503 DCHECK(thread_checker_.CalledOnValidThread()); |
| 504 TRACE_EVENT0("media", "AVDA::DoIOTask"); | 504 TRACE_EVENT0("media", "AVDA::DoIOTask"); |
| 505 if (state_ == ERROR || state_ == WAITING_FOR_CODEC) { | 505 if (state_ == ERROR || state_ == WAITING_FOR_CODEC) |
| 506 return; | 506 return; |
| 507 } | |
| 508 | 507 |
| 508 strategy_->MaybeRenderEarly(); |
| 509 bool did_work = QueueInput(); | 509 bool did_work = QueueInput(); |
| 510 while (DequeueOutput()) | 510 while (DequeueOutput()) |
| 511 did_work = true; | 511 did_work = true; |
| 512 | 512 |
| 513 ManageTimer(did_work || start_timer); | 513 ManageTimer(did_work || start_timer); |
| 514 } | 514 } |
| 515 | 515 |
| 516 bool AndroidVideoDecodeAccelerator::QueueInput() { | 516 bool AndroidVideoDecodeAccelerator::QueueInput() { |
| 517 DCHECK(thread_checker_.CalledOnValidThread()); | 517 DCHECK(thread_checker_.CalledOnValidThread()); |
| 518 TRACE_EVENT0("media", "AVDA::QueueInput"); | 518 TRACE_EVENT0("media", "AVDA::QueueInput"); |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 if (media::MediaCodecUtil::IsSurfaceViewOutputSupported()) { | 1354 if (media::MediaCodecUtil::IsSurfaceViewOutputSupported()) { |
| 1355 capabilities.flags |= media::VideoDecodeAccelerator::Capabilities:: | 1355 capabilities.flags |= media::VideoDecodeAccelerator::Capabilities:: |
| 1356 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; | 1356 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; |
| 1357 } | 1357 } |
| 1358 } | 1358 } |
| 1359 | 1359 |
| 1360 return capabilities; | 1360 return capabilities; |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 } // namespace content | 1363 } // namespace content |
| OLD | NEW |