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 "media/gpu/android_video_decode_accelerator.h" | 5 #include "media/gpu/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 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 const media::BitstreamBuffer& bitstream_buffer) { | 875 const media::BitstreamBuffer& bitstream_buffer) { |
876 pending_bitstream_buffers_.push(bitstream_buffer); | 876 pending_bitstream_buffers_.push(bitstream_buffer); |
877 TRACE_COUNTER1("media", "AVDA::PendingBitstreamBufferCount", | 877 TRACE_COUNTER1("media", "AVDA::PendingBitstreamBufferCount", |
878 pending_bitstream_buffers_.size()); | 878 pending_bitstream_buffers_.size()); |
879 | 879 |
880 DoIOTask(true); | 880 DoIOTask(true); |
881 } | 881 } |
882 | 882 |
883 void AndroidVideoDecodeAccelerator::RequestPictureBuffers() { | 883 void AndroidVideoDecodeAccelerator::RequestPictureBuffers() { |
884 if (client_) { | 884 if (client_) { |
885 client_->ProvidePictureBuffers(kNumPictureBuffers, 1, | 885 client_->ProvidePictureBuffers(kNumPictureBuffers, PIXEL_FORMAT_UNKNOWN, 1, |
886 strategy_->GetPictureBufferSize(), | 886 strategy_->GetPictureBufferSize(), |
887 strategy_->GetTextureTarget()); | 887 strategy_->GetTextureTarget()); |
888 } | 888 } |
889 } | 889 } |
890 | 890 |
891 void AndroidVideoDecodeAccelerator::AssignPictureBuffers( | 891 void AndroidVideoDecodeAccelerator::AssignPictureBuffers( |
892 const std::vector<media::PictureBuffer>& buffers) { | 892 const std::vector<media::PictureBuffer>& buffers) { |
893 DCHECK(thread_checker_.CalledOnValidThread()); | 893 DCHECK(thread_checker_.CalledOnValidThread()); |
894 DCHECK(output_picture_buffers_.empty()); | 894 DCHECK(output_picture_buffers_.empty()); |
895 DCHECK(free_picture_ids_.empty()); | 895 DCHECK(free_picture_ids_.empty()); |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1462 if (media::MediaCodecUtil::IsSurfaceViewOutputSupported()) { | 1462 if (media::MediaCodecUtil::IsSurfaceViewOutputSupported()) { |
1463 capabilities.flags |= media::VideoDecodeAccelerator::Capabilities:: | 1463 capabilities.flags |= media::VideoDecodeAccelerator::Capabilities:: |
1464 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; | 1464 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; |
1465 } | 1465 } |
1466 } | 1466 } |
1467 | 1467 |
1468 return capabilities; | 1468 return capabilities; |
1469 } | 1469 } |
1470 | 1470 |
1471 } // namespace media | 1471 } // namespace media |
OLD | NEW |