| 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 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 return thread_checker_; | 866 return thread_checker_; |
| 867 } | 867 } |
| 868 | 868 |
| 869 base::WeakPtr<gpu::gles2::GLES2Decoder> | 869 base::WeakPtr<gpu::gles2::GLES2Decoder> |
| 870 AndroidVideoDecodeAccelerator::GetGlDecoder() const { | 870 AndroidVideoDecodeAccelerator::GetGlDecoder() const { |
| 871 return gl_decoder_; | 871 return gl_decoder_; |
| 872 } | 872 } |
| 873 | 873 |
| 874 void AndroidVideoDecodeAccelerator::OnFrameAvailable() { | 874 void AndroidVideoDecodeAccelerator::OnFrameAvailable() { |
| 875 // Remember: this may be on any thread. | 875 // Remember: this may be on any thread. |
| 876 DCHECK(strategy_); | |
| 877 strategy_->OnFrameAvailable(); | 876 strategy_->OnFrameAvailable(); |
| 878 } | 877 } |
| 879 | 878 |
| 880 void AndroidVideoDecodeAccelerator::PostError( | 879 void AndroidVideoDecodeAccelerator::PostError( |
| 881 const ::tracked_objects::Location& from_here, | 880 const ::tracked_objects::Location& from_here, |
| 882 media::VideoDecodeAccelerator::Error error) { | 881 media::VideoDecodeAccelerator::Error error) { |
| 883 base::MessageLoop::current()->PostDelayedTask( | 882 base::MessageLoop::current()->PostDelayedTask( |
| 884 from_here, | 883 from_here, |
| 885 base::Bind(&AndroidVideoDecodeAccelerator::NotifyError, | 884 base::Bind(&AndroidVideoDecodeAccelerator::NotifyError, |
| 886 weak_this_factory_.GetWeakPtr(), error, error_sequence_token_), | 885 weak_this_factory_.GetWeakPtr(), error, error_sequence_token_), |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 | 1014 |
| 1016 if (UseDeferredRenderingStrategy()) { | 1015 if (UseDeferredRenderingStrategy()) { |
| 1017 capabilities.flags = media::VideoDecodeAccelerator::Capabilities:: | 1016 capabilities.flags = media::VideoDecodeAccelerator::Capabilities:: |
| 1018 NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE; | 1017 NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE; |
| 1019 } | 1018 } |
| 1020 | 1019 |
| 1021 return capabilities; | 1020 return capabilities; |
| 1022 } | 1021 } |
| 1023 | 1022 |
| 1024 } // namespace content | 1023 } // namespace content |
| OLD | NEW |