| 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 "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 | 802 |
| 803 jobject media_crypto = media_crypto_ ? media_crypto_->obj() : nullptr; | 803 jobject media_crypto = media_crypto_ ? media_crypto_->obj() : nullptr; |
| 804 | 804 |
| 805 // |needs_protected_surface_| implies encrypted stream. | 805 // |needs_protected_surface_| implies encrypted stream. |
| 806 DCHECK(!needs_protected_surface_ || media_crypto); | 806 DCHECK(!needs_protected_surface_ || media_crypto); |
| 807 | 807 |
| 808 // Pass a dummy 320x240 canvas size and let the codec signal the real size | 808 // Pass a dummy 320x240 canvas size and let the codec signal the real size |
| 809 // when it's known from the bitstream. | 809 // when it's known from the bitstream. |
| 810 media_codec_.reset(media::VideoCodecBridge::CreateDecoder( | 810 media_codec_.reset(media::VideoCodecBridge::CreateDecoder( |
| 811 codec_, needs_protected_surface_, gfx::Size(320, 240), | 811 codec_, needs_protected_surface_, gfx::Size(320, 240), |
| 812 surface_.j_surface().obj(), media_crypto)); | 812 surface_.j_surface().obj(), media_crypto, false)); |
| 813 | 813 |
| 814 strategy_->CodecChanged(media_codec_.get(), output_picture_buffers_); | 814 strategy_->CodecChanged(media_codec_.get(), output_picture_buffers_); |
| 815 if (!media_codec_) { | 815 if (!media_codec_) { |
| 816 LOG(ERROR) << "Failed to create MediaCodec instance."; | 816 LOG(ERROR) << "Failed to create MediaCodec instance."; |
| 817 return false; | 817 return false; |
| 818 } | 818 } |
| 819 | 819 |
| 820 ManageTimer(true); | 820 ManageTimer(true); |
| 821 return true; | 821 return true; |
| 822 } | 822 } |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 capabilities.flags = media::VideoDecodeAccelerator::Capabilities:: | 1107 capabilities.flags = media::VideoDecodeAccelerator::Capabilities:: |
| 1108 NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE | | 1108 NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE | |
| 1109 media::VideoDecodeAccelerator::Capabilities:: | 1109 media::VideoDecodeAccelerator::Capabilities:: |
| 1110 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; | 1110 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; |
| 1111 } | 1111 } |
| 1112 | 1112 |
| 1113 return capabilities; | 1113 return capabilities; |
| 1114 } | 1114 } |
| 1115 | 1115 |
| 1116 } // namespace content | 1116 } // namespace content |
| OLD | NEW |