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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 virtual void Cleanup(bool have_context, | 60 virtual void Cleanup(bool have_context, |
61 const OutputBufferMap& buffer_map) = 0; | 61 const OutputBufferMap& buffer_map) = 0; |
62 | 62 |
63 // This returns the SurfaceTexture created by Initialize, or nullptr if | 63 // This returns the SurfaceTexture created by Initialize, or nullptr if |
64 // the strategy was initialized with a SurfaceView. | 64 // the strategy was initialized with a SurfaceView. |
65 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture() const = 0; | 65 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture() const = 0; |
66 | 66 |
67 // Return the GL texture target that the PictureBuffer textures use. | 67 // Return the GL texture target that the PictureBuffer textures use. |
68 virtual uint32_t GetTextureTarget() const = 0; | 68 virtual uint32_t GetTextureTarget() const = 0; |
69 | 69 |
| 70 // Return the size to use when requesting picture buffers. |
| 71 virtual gfx::Size GetPictureBufferSize() const = 0; |
| 72 |
70 // Make the provided PictureBuffer draw the image that is represented by | 73 // Make the provided PictureBuffer draw the image that is represented by |
71 // the decoded output buffer at codec_buffer_index. | 74 // the decoded output buffer at codec_buffer_index. |
72 virtual void UseCodecBufferForPictureBuffer( | 75 virtual void UseCodecBufferForPictureBuffer( |
73 int32_t codec_buffer_index, | 76 int32_t codec_buffer_index, |
74 const media::PictureBuffer& picture_buffer) = 0; | 77 const media::PictureBuffer& picture_buffer) = 0; |
75 | 78 |
76 // Notify strategy that a picture buffer has been assigned. | 79 // Notify strategy that a picture buffer has been assigned. |
77 virtual void AssignOnePictureBuffer( | 80 virtual void AssignOnePictureBuffer( |
78 const media::PictureBuffer& picture_buffer) {} | 81 const media::PictureBuffer& picture_buffer, |
| 82 bool have_context) {} |
79 | 83 |
80 // Notify strategy that a picture buffer has been reused. | 84 // Notify strategy that a picture buffer has been reused. |
81 virtual void ReuseOnePictureBuffer( | 85 virtual void ReuseOnePictureBuffer( |
82 const media::PictureBuffer& picture_buffer) {} | 86 const media::PictureBuffer& picture_buffer) {} |
83 | 87 |
84 // Notify strategy that we are about to dismiss a picture buffer. | 88 // Notify strategy that we are about to dismiss a picture buffer. |
85 virtual void DismissOnePictureBuffer( | 89 virtual void DismissOnePictureBuffer( |
86 const media::PictureBuffer& picture_buffer) {} | 90 const media::PictureBuffer& picture_buffer) {} |
87 | 91 |
88 // Notify strategy that we have a new android MediaCodec instance. This | 92 // Notify strategy that we have a new android MediaCodec instance. This |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 344 |
341 // WeakPtrFactory for posting tasks back to |this|. | 345 // WeakPtrFactory for posting tasks back to |this|. |
342 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; | 346 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; |
343 | 347 |
344 friend class AndroidVideoDecodeAcceleratorTest; | 348 friend class AndroidVideoDecodeAcceleratorTest; |
345 }; | 349 }; |
346 | 350 |
347 } // namespace content | 351 } // namespace content |
348 | 352 |
349 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 353 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |