| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // |init_done_msg| when done. | 63 // |init_done_msg| when done. |
| 64 void Initialize(const media::VideoCodecProfile profile, | 64 void Initialize(const media::VideoCodecProfile profile, |
| 65 IPC::Message* init_done_msg); | 65 IPC::Message* init_done_msg); |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 class MessageFilter; | 68 class MessageFilter; |
| 69 | 69 |
| 70 // We only allow self-delete, from OnWillDestroyStub(), after cleanup there. | 70 // We only allow self-delete, from OnWillDestroyStub(), after cleanup there. |
| 71 ~GpuVideoDecodeAccelerator() override; | 71 ~GpuVideoDecodeAccelerator() override; |
| 72 | 72 |
| 73 // Initialize VDA by |profile|. Pass filter to GpuCommandBufferStub |
| 74 // channel and return true when initialization successed. |
| 75 bool InitializeDecoder(media::VideoCodecProfile profile); |
| 76 |
| 73 // Handlers for IPC messages. | 77 // Handlers for IPC messages. |
| 74 void OnDecode(base::SharedMemoryHandle handle, int32 id, uint32 size); | 78 void OnDecode(base::SharedMemoryHandle handle, int32 id, uint32 size); |
| 75 void OnAssignPictureBuffers(const std::vector<int32>& buffer_ids, | 79 void OnAssignPictureBuffers(const std::vector<int32>& buffer_ids, |
| 76 const std::vector<uint32>& texture_ids); | 80 const std::vector<uint32>& texture_ids); |
| 77 void OnReusePictureBuffer(int32 picture_buffer_id); | 81 void OnReusePictureBuffer(int32 picture_buffer_id); |
| 78 void OnFlush(); | 82 void OnFlush(); |
| 79 void OnReset(); | 83 void OnReset(); |
| 80 void OnDestroy(); | 84 void OnDestroy(); |
| 81 | 85 |
| 82 // Called on IO thread when |filter_| has been removed. | 86 // Called on IO thread when |filter_| has been removed. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 136 |
| 133 // A map from picture buffer ID to TextureRef that have not been cleared. | 137 // A map from picture buffer ID to TextureRef that have not been cleared. |
| 134 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; | 138 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; |
| 135 | 139 |
| 136 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 140 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
| 137 }; | 141 }; |
| 138 | 142 |
| 139 } // namespace content | 143 } // namespace content |
| 140 | 144 |
| 141 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 145 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |