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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 io_timer_.Stop(); | 507 io_timer_.Stop(); |
508 media_codec_->Stop(); | 508 media_codec_->Stop(); |
509 } | 509 } |
510 if (surface_texture_id_) | 510 if (surface_texture_id_) |
511 glDeleteTextures(1, &surface_texture_id_); | 511 glDeleteTextures(1, &surface_texture_id_); |
512 if (copier_) | 512 if (copier_) |
513 copier_->Destroy(); | 513 copier_->Destroy(); |
514 delete this; | 514 delete this; |
515 } | 515 } |
516 | 516 |
| 517 bool AndroidVideoDecodeAccelerator::CanDecodeOnIOThread() { |
| 518 return false; |
| 519 } |
| 520 |
517 void AndroidVideoDecodeAccelerator::RequestPictureBuffers() { | 521 void AndroidVideoDecodeAccelerator::RequestPictureBuffers() { |
518 client_->ProvidePictureBuffers(kNumPictureBuffers, size_, GL_TEXTURE_2D); | 522 client_->ProvidePictureBuffers(kNumPictureBuffers, size_, GL_TEXTURE_2D); |
519 } | 523 } |
520 | 524 |
521 void AndroidVideoDecodeAccelerator::NotifyPictureReady( | 525 void AndroidVideoDecodeAccelerator::NotifyPictureReady( |
522 const media::Picture& picture) { | 526 const media::Picture& picture) { |
523 client_->PictureReady(picture); | 527 client_->PictureReady(picture); |
524 } | 528 } |
525 | 529 |
526 void AndroidVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( | 530 void AndroidVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( |
527 int input_buffer_id) { | 531 int input_buffer_id) { |
528 client_->NotifyEndOfBitstreamBuffer(input_buffer_id); | 532 client_->NotifyEndOfBitstreamBuffer(input_buffer_id); |
529 } | 533 } |
530 | 534 |
531 void AndroidVideoDecodeAccelerator::NotifyFlushDone() { | 535 void AndroidVideoDecodeAccelerator::NotifyFlushDone() { |
532 client_->NotifyFlushDone(); | 536 client_->NotifyFlushDone(); |
533 } | 537 } |
534 | 538 |
535 void AndroidVideoDecodeAccelerator::NotifyResetDone() { | 539 void AndroidVideoDecodeAccelerator::NotifyResetDone() { |
536 client_->NotifyResetDone(); | 540 client_->NotifyResetDone(); |
537 } | 541 } |
538 | 542 |
539 void AndroidVideoDecodeAccelerator::NotifyError( | 543 void AndroidVideoDecodeAccelerator::NotifyError( |
540 media::VideoDecodeAccelerator::Error error) { | 544 media::VideoDecodeAccelerator::Error error) { |
541 client_->NotifyError(error); | 545 client_->NotifyError(error); |
542 } | 546 } |
543 | 547 |
544 } // namespace content | 548 } // namespace content |
OLD | NEW |