| 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 <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void DoIOTask(); | 70 void DoIOTask(); |
| 71 | 71 |
| 72 // Feeds input data to |media_codec_|. This checks | 72 // Feeds input data to |media_codec_|. This checks |
| 73 // |pending_bitstream_buffers_| and queues a buffer to |media_codec_|. | 73 // |pending_bitstream_buffers_| and queues a buffer to |media_codec_|. |
| 74 void QueueInput(); | 74 void QueueInput(); |
| 75 | 75 |
| 76 // Dequeues output from |media_codec_| and feeds the decoded frame to the | 76 // Dequeues output from |media_codec_| and feeds the decoded frame to the |
| 77 // client. | 77 // client. |
| 78 void DequeueOutput(); | 78 void DequeueOutput(); |
| 79 | 79 |
| 80 // Notifies the client that initialize was completed. | |
| 81 void NotifyInitializeDone(); | |
| 82 | |
| 83 // Requests picture buffers from the client. | 80 // Requests picture buffers from the client. |
| 84 void RequestPictureBuffers(); | 81 void RequestPictureBuffers(); |
| 85 | 82 |
| 86 // Notifies the client about the availability of a picture. | 83 // Notifies the client about the availability of a picture. |
| 87 void NotifyPictureReady(const media::Picture& picture); | 84 void NotifyPictureReady(const media::Picture& picture); |
| 88 | 85 |
| 89 // Notifies the client that the input buffer identifed by input_buffer_id has | 86 // Notifies the client that the input buffer identifed by input_buffer_id has |
| 90 // been processed. | 87 // been processed. |
| 91 void NotifyEndOfBitstreamBuffer(int input_buffer_id); | 88 void NotifyEndOfBitstreamBuffer(int input_buffer_id); |
| 92 | 89 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 154 |
| 158 // Owner of the GL context. Used to restore the context state. | 155 // Owner of the GL context. Used to restore the context state. |
| 159 base::WeakPtr<gpu::gles2::GLES2Decoder> gl_decoder_; | 156 base::WeakPtr<gpu::gles2::GLES2Decoder> gl_decoder_; |
| 160 | 157 |
| 161 // Used for copy the texture from |surface_texture_| to picture buffers. | 158 // Used for copy the texture from |surface_texture_| to picture buffers. |
| 162 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_; | 159 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_; |
| 163 | 160 |
| 164 // Repeating timer responsible for draining pending IO to the codec. | 161 // Repeating timer responsible for draining pending IO to the codec. |
| 165 base::RepeatingTimer<AndroidVideoDecodeAccelerator> io_timer_; | 162 base::RepeatingTimer<AndroidVideoDecodeAccelerator> io_timer_; |
| 166 | 163 |
| 164 // WeakPtrFactory for posting tasks back to |this|. |
| 165 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; |
| 166 |
| 167 friend class AndroidVideoDecodeAcceleratorTest; | 167 friend class AndroidVideoDecodeAcceleratorTest; |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 } // namespace content | 170 } // namespace content |
| 171 | 171 |
| 172 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 172 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |