| 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 MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 // components need to be reset upon EOS to decode a later stream. Input state | 341 // components need to be reset upon EOS to decode a later stream. Input state |
| 342 // (e.g. queued BitstreamBuffers) is not reset, as input following an EOS | 342 // (e.g. queued BitstreamBuffers) is not reset, as input following an EOS |
| 343 // is still valid and should be processed. | 343 // is still valid and should be processed. |
| 344 void ResetCodecState(); | 344 void ResetCodecState(); |
| 345 | 345 |
| 346 // Registered to be called when surfaces are being destroyed. If |surface_id| | 346 // Registered to be called when surfaces are being destroyed. If |surface_id| |
| 347 // is our surface, we should release the MediaCodec before returning from | 347 // is our surface, we should release the MediaCodec before returning from |
| 348 // this. | 348 // this. |
| 349 void OnDestroyingSurface(int surface_id); | 349 void OnDestroyingSurface(int surface_id); |
| 350 | 350 |
| 351 // Return true if and only if we should use deferred rendering. | 351 // Returns true if and only if we should use deferred rendering. |
| 352 static bool UseDeferredRenderingStrategy( | 352 static bool UseDeferredRenderingStrategy( |
| 353 const gpu::GpuPreferences& gpu_preferences); | 353 const gpu::GpuPreferences& gpu_preferences); |
| 354 | 354 |
| 355 // Returns true if frame's COPY_REQUIRED flag needs to be set. |
| 356 static bool RequiresTextureCopy(const gpu::GpuPreferences& gpu_preferences); |
| 357 |
| 355 // Used to DCHECK that we are called on the correct thread. | 358 // Used to DCHECK that we are called on the correct thread. |
| 356 base::ThreadChecker thread_checker_; | 359 base::ThreadChecker thread_checker_; |
| 357 | 360 |
| 358 // To expose client callbacks from VideoDecodeAccelerator. | 361 // To expose client callbacks from VideoDecodeAccelerator. |
| 359 Client* client_; | 362 Client* client_; |
| 360 | 363 |
| 361 // Callback to set the correct gl context. | 364 // Callback to set the correct gl context. |
| 362 MakeGLContextCurrentCallback make_context_current_cb_; | 365 MakeGLContextCurrentCallback make_context_current_cb_; |
| 363 | 366 |
| 364 // Callback to get the GLES2Decoder instance. | 367 // Callback to get the GLES2Decoder instance. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 | 470 |
| 468 // WeakPtrFactory for posting tasks back to |this|. | 471 // WeakPtrFactory for posting tasks back to |this|. |
| 469 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; | 472 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; |
| 470 | 473 |
| 471 friend class AndroidVideoDecodeAcceleratorTest; | 474 friend class AndroidVideoDecodeAcceleratorTest; |
| 472 }; | 475 }; |
| 473 | 476 |
| 474 } // namespace media | 477 } // namespace media |
| 475 | 478 |
| 476 #endif // MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 479 #endif // MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |