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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 glDeleteTextures(1, &surface_texture_id_); | 522 glDeleteTextures(1, &surface_texture_id_); |
523 if (copier_) | 523 if (copier_) |
524 copier_->Destroy(); | 524 copier_->Destroy(); |
525 delete this; | 525 delete this; |
526 } | 526 } |
527 | 527 |
528 bool AndroidVideoDecodeAccelerator::CanDecodeOnIOThread() { | 528 bool AndroidVideoDecodeAccelerator::CanDecodeOnIOThread() { |
529 return false; | 529 return false; |
530 } | 530 } |
531 | 531 |
| 532 // static |
| 533 media::VideoDecodeAccelerator::SupportedResolution |
| 534 AndroidVideoDecodeAccelerator::GetSupportedResolution() { |
| 535 media::VideoDecodeAccelerator::SupportedResolution resolution; |
| 536 resolution.min.SetSize(16, 16); |
| 537 resolution.max.SetSize(1920, 1088); |
| 538 return resolution; |
| 539 } |
| 540 |
532 void AndroidVideoDecodeAccelerator::RequestPictureBuffers() { | 541 void AndroidVideoDecodeAccelerator::RequestPictureBuffers() { |
533 client_->ProvidePictureBuffers(kNumPictureBuffers, size_, GL_TEXTURE_2D); | 542 client_->ProvidePictureBuffers(kNumPictureBuffers, size_, GL_TEXTURE_2D); |
534 } | 543 } |
535 | 544 |
536 void AndroidVideoDecodeAccelerator::NotifyPictureReady( | 545 void AndroidVideoDecodeAccelerator::NotifyPictureReady( |
537 const media::Picture& picture) { | 546 const media::Picture& picture) { |
538 client_->PictureReady(picture); | 547 client_->PictureReady(picture); |
539 } | 548 } |
540 | 549 |
541 void AndroidVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( | 550 void AndroidVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( |
542 int input_buffer_id) { | 551 int input_buffer_id) { |
543 client_->NotifyEndOfBitstreamBuffer(input_buffer_id); | 552 client_->NotifyEndOfBitstreamBuffer(input_buffer_id); |
544 } | 553 } |
545 | 554 |
546 void AndroidVideoDecodeAccelerator::NotifyFlushDone() { | 555 void AndroidVideoDecodeAccelerator::NotifyFlushDone() { |
547 client_->NotifyFlushDone(); | 556 client_->NotifyFlushDone(); |
548 } | 557 } |
549 | 558 |
550 void AndroidVideoDecodeAccelerator::NotifyResetDone() { | 559 void AndroidVideoDecodeAccelerator::NotifyResetDone() { |
551 client_->NotifyResetDone(); | 560 client_->NotifyResetDone(); |
552 } | 561 } |
553 | 562 |
554 void AndroidVideoDecodeAccelerator::NotifyError( | 563 void AndroidVideoDecodeAccelerator::NotifyError( |
555 media::VideoDecodeAccelerator::Error error) { | 564 media::VideoDecodeAccelerator::Error error) { |
556 client_->NotifyError(error); | 565 client_->NotifyError(error); |
557 } | 566 } |
558 | 567 |
559 } // namespace content | 568 } // namespace content |
OLD | NEW |