Chromium Code Reviews| 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 video decode accelerator. | |
| 74 bool InitialDecoder(const media::VideoCodecProfile profile); | |
|
Pawel Osciak
2014/12/26 01:11:35
Please explain the return value and more of what t
henryhsu
2014/12/26 08:40:40
Done.
| |
| 75 | |
|
Pawel Osciak
2014/12/26 01:11:35
s/Initial/Initialize/
Also, no need for const.
henryhsu
2014/12/26 08:40:40
Done.
| |
| 73 // Handlers for IPC messages. | 76 // Handlers for IPC messages. |
| 74 void OnDecode(base::SharedMemoryHandle handle, int32 id, uint32 size); | 77 void OnDecode(base::SharedMemoryHandle handle, int32 id, uint32 size); |
| 75 void OnAssignPictureBuffers(const std::vector<int32>& buffer_ids, | 78 void OnAssignPictureBuffers(const std::vector<int32>& buffer_ids, |
| 76 const std::vector<uint32>& texture_ids); | 79 const std::vector<uint32>& texture_ids); |
| 77 void OnReusePictureBuffer(int32 picture_buffer_id); | 80 void OnReusePictureBuffer(int32 picture_buffer_id); |
| 78 void OnFlush(); | 81 void OnFlush(); |
| 79 void OnReset(); | 82 void OnReset(); |
| 80 void OnDestroy(); | 83 void OnDestroy(); |
| 81 | 84 |
| 82 // Called on IO thread when |filter_| has been removed. | 85 // Called on IO thread when |filter_| has been removed. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 | 135 |
| 133 // A map from picture buffer ID to TextureRef that have not been cleared. | 136 // A map from picture buffer ID to TextureRef that have not been cleared. |
| 134 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; | 137 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; |
| 135 | 138 |
| 136 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 139 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
| 137 }; | 140 }; |
| 138 | 141 |
| 139 } // namespace content | 142 } // namespace content |
| 140 | 143 |
| 141 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 144 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |