| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 PPAPI_PROXY_VIDEO_DECODER_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_VIDEO_DECODER_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_VIDEO_DECODER_RESOURCE_H_ | 6 #define PPAPI_PROXY_VIDEO_DECODER_RESOURCE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <queue> | 11 #include <queue> |
| 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
| 14 #include "base/macros.h" | 15 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/scoped_vector.h" | |
| 17 #include "ppapi/proxy/connection.h" | 17 #include "ppapi/proxy/connection.h" |
| 18 #include "ppapi/proxy/plugin_resource.h" | 18 #include "ppapi/proxy/plugin_resource.h" |
| 19 #include "ppapi/proxy/ppapi_proxy_export.h" | 19 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 20 #include "ppapi/shared_impl/resource.h" | 20 #include "ppapi/shared_impl/resource.h" |
| 21 #include "ppapi/shared_impl/scoped_pp_resource.h" | 21 #include "ppapi/shared_impl/scoped_pp_resource.h" |
| 22 #include "ppapi/thunk/ppb_video_decoder_api.h" | 22 #include "ppapi/thunk/ppb_video_decoder_api.h" |
| 23 | 23 |
| 24 namespace gpu { | 24 namespace gpu { |
| 25 struct Mailbox; | 25 struct Mailbox; |
| 26 namespace gles2 { | 26 namespace gles2 { |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 void OnPluginMsgInitializeComplete(const ResourceMessageReplyParams& params); | 136 void OnPluginMsgInitializeComplete(const ResourceMessageReplyParams& params); |
| 137 void OnPluginMsgDecodeComplete(const ResourceMessageReplyParams& params, | 137 void OnPluginMsgDecodeComplete(const ResourceMessageReplyParams& params, |
| 138 uint32_t shm_id); | 138 uint32_t shm_id); |
| 139 void OnPluginMsgFlushComplete(const ResourceMessageReplyParams& params); | 139 void OnPluginMsgFlushComplete(const ResourceMessageReplyParams& params); |
| 140 void OnPluginMsgResetComplete(const ResourceMessageReplyParams& params); | 140 void OnPluginMsgResetComplete(const ResourceMessageReplyParams& params); |
| 141 | 141 |
| 142 void RunCallbackWithError(scoped_refptr<TrackedCallback>* callback); | 142 void RunCallbackWithError(scoped_refptr<TrackedCallback>* callback); |
| 143 void DeleteGLTexture(uint32_t texture_id); | 143 void DeleteGLTexture(uint32_t texture_id); |
| 144 void WriteNextPicture(); | 144 void WriteNextPicture(); |
| 145 | 145 |
| 146 // ScopedVector to own the shared memory buffers. | 146 // The shared memory buffers. |
| 147 ScopedVector<ShmBuffer> shm_buffers_; | 147 std::vector<std::unique_ptr<ShmBuffer>> shm_buffers_; |
| 148 | 148 |
| 149 // List of available shared memory buffers. | 149 // List of available shared memory buffers. |
| 150 typedef std::vector<ShmBuffer*> ShmBufferList; | 150 typedef std::vector<ShmBuffer*> ShmBufferList; |
| 151 ShmBufferList available_shm_buffers_; | 151 ShmBufferList available_shm_buffers_; |
| 152 | 152 |
| 153 // Map of GL texture id to texture info. | 153 // Map of GL texture id to texture info. |
| 154 typedef base::hash_map<uint32_t, Texture> TextureMap; | 154 typedef base::hash_map<uint32_t, Texture> TextureMap; |
| 155 TextureMap textures_; | 155 TextureMap textures_; |
| 156 | 156 |
| 157 // Queue of received pictures. | 157 // Queue of received pictures. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 bool testing_; | 189 bool testing_; |
| 190 int32_t decoder_last_error_; | 190 int32_t decoder_last_error_; |
| 191 | 191 |
| 192 DISALLOW_COPY_AND_ASSIGN(VideoDecoderResource); | 192 DISALLOW_COPY_AND_ASSIGN(VideoDecoderResource); |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 } // namespace proxy | 195 } // namespace proxy |
| 196 } // namespace ppapi | 196 } // namespace ppapi |
| 197 | 197 |
| 198 #endif // PPAPI_PROXY_VIDEO_DECODER_RESOURCE_H_ | 198 #endif // PPAPI_PROXY_VIDEO_DECODER_RESOURCE_H_ |
| OLD | NEW |