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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 | 497 |
498 NOTIMPLEMENTED(); | 498 NOTIMPLEMENTED(); |
499 NotifyInitializationComplete(false); | 499 NotifyInitializationComplete(false); |
500 | 500 |
501 #endif // !defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS) | 501 #endif // !defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS) |
502 } | 502 } |
503 | 503 |
504 void AndroidVideoDecodeAccelerator::DoIOTask(bool start_timer) { | 504 void AndroidVideoDecodeAccelerator::DoIOTask(bool start_timer) { |
505 DCHECK(thread_checker_.CalledOnValidThread()); | 505 DCHECK(thread_checker_.CalledOnValidThread()); |
506 TRACE_EVENT0("media", "AVDA::DoIOTask"); | 506 TRACE_EVENT0("media", "AVDA::DoIOTask"); |
507 if (state_ == ERROR || state_ == WAITING_FOR_CODEC) { | 507 if (state_ == ERROR || state_ == WAITING_FOR_CODEC) |
508 return; | 508 return; |
509 } | |
510 | 509 |
| 510 strategy_->MaybeRenderEarly(); |
511 bool did_work = QueueInput(); | 511 bool did_work = QueueInput(); |
512 while (DequeueOutput()) | 512 while (DequeueOutput()) |
513 did_work = true; | 513 did_work = true; |
514 | 514 |
515 ManageTimer(did_work || start_timer); | 515 ManageTimer(did_work || start_timer); |
516 } | 516 } |
517 | 517 |
518 bool AndroidVideoDecodeAccelerator::QueueInput() { | 518 bool AndroidVideoDecodeAccelerator::QueueInput() { |
519 DCHECK(thread_checker_.CalledOnValidThread()); | 519 DCHECK(thread_checker_.CalledOnValidThread()); |
520 TRACE_EVENT0("media", "AVDA::QueueInput"); | 520 TRACE_EVENT0("media", "AVDA::QueueInput"); |
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1458 if (media::MediaCodecUtil::IsSurfaceViewOutputSupported()) { | 1458 if (media::MediaCodecUtil::IsSurfaceViewOutputSupported()) { |
1459 capabilities.flags |= media::VideoDecodeAccelerator::Capabilities:: | 1459 capabilities.flags |= media::VideoDecodeAccelerator::Capabilities:: |
1460 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; | 1460 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; |
1461 } | 1461 } |
1462 } | 1462 } |
1463 | 1463 |
1464 return capabilities; | 1464 return capabilities; |
1465 } | 1465 } |
1466 | 1466 |
1467 } // namespace content | 1467 } // namespace content |
OLD | NEW |