| 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 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 // is still valid and should be processed. | 213 // is still valid and should be processed. |
| 214 void ResetCodecState(); | 214 void ResetCodecState(); |
| 215 | 215 |
| 216 // Dismiss all |output_picture_buffers_| in preparation for requesting new | 216 // Dismiss all |output_picture_buffers_| in preparation for requesting new |
| 217 // ones. | 217 // ones. |
| 218 void DismissPictureBuffers(); | 218 void DismissPictureBuffers(); |
| 219 | 219 |
| 220 // Return true if and only if we should use deferred rendering. | 220 // Return true if and only if we should use deferred rendering. |
| 221 static bool UseDeferredRenderingStrategy(); | 221 static bool UseDeferredRenderingStrategy(); |
| 222 | 222 |
| 223 // Return true if and only if the deferred strategy requires that the |
| 224 // resulting VideoFrames have COPY_REQUIRED set. This is for WebView. |
| 225 static bool DeferredStrategyNeedsBrowserCopy(); |
| 226 |
| 227 // Return true if and only if SurfaceTexture supports user-provided threads |
| 228 // for OnFrameAvailable callbacks. |
| 229 static bool IsCallbackThreadable(); |
| 230 |
| 223 // Used to DCHECK that we are called on the correct thread. | 231 // Used to DCHECK that we are called on the correct thread. |
| 224 base::ThreadChecker thread_checker_; | 232 base::ThreadChecker thread_checker_; |
| 225 | 233 |
| 226 // To expose client callbacks from VideoDecodeAccelerator. | 234 // To expose client callbacks from VideoDecodeAccelerator. |
| 227 Client* client_; | 235 Client* client_; |
| 228 | 236 |
| 229 // Callback to set the correct gl context. | 237 // Callback to set the correct gl context. |
| 230 base::Callback<bool(void)> make_context_current_; | 238 base::Callback<bool(void)> make_context_current_; |
| 231 | 239 |
| 232 // Codec type. Used when we configure media codec. | 240 // Codec type. Used when we configure media codec. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 332 |
| 325 // WeakPtrFactory for posting tasks back to |this|. | 333 // WeakPtrFactory for posting tasks back to |this|. |
| 326 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; | 334 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; |
| 327 | 335 |
| 328 friend class AndroidVideoDecodeAcceleratorTest; | 336 friend class AndroidVideoDecodeAcceleratorTest; |
| 329 }; | 337 }; |
| 330 | 338 |
| 331 } // namespace content | 339 } // namespace content |
| 332 | 340 |
| 333 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 341 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |