| 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 CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DECODER_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DECODER_HOST_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DECODER_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DECODER_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // Non-owning pointer. | 118 // Non-owning pointer. |
| 119 RendererPpapiHost* renderer_ppapi_host_; | 119 RendererPpapiHost* renderer_ppapi_host_; |
| 120 | 120 |
| 121 media::VideoCodecProfile profile_; | 121 media::VideoCodecProfile profile_; |
| 122 | 122 |
| 123 std::unique_ptr<media::VideoDecodeAccelerator> decoder_; | 123 std::unique_ptr<media::VideoDecodeAccelerator> decoder_; |
| 124 | 124 |
| 125 bool software_fallback_allowed_ = false; | 125 bool software_fallback_allowed_ = false; |
| 126 bool software_fallback_used_ = false; | 126 bool software_fallback_used_ = false; |
| 127 | 127 |
| 128 int pending_texture_requests_ = 0; |
| 129 |
| 130 // Set after software decoder fallback to dismiss all outstanding texture |
| 131 // requests. |
| 132 int assign_textures_messages_to_dismiss_ = 0; |
| 133 |
| 128 // A vector holding our shm buffers, in sync with a similar vector in the | 134 // A vector holding our shm buffers, in sync with a similar vector in the |
| 129 // resource. We use a buffer's index in these vectors as its id on both sides | 135 // resource. We use a buffer's index in these vectors as its id on both sides |
| 130 // of the proxy. Only add buffers or update them in place so as not to | 136 // of the proxy. Only add buffers or update them in place so as not to |
| 131 // invalidate these ids. | 137 // invalidate these ids. |
| 132 ScopedVector<base::SharedMemory> shm_buffers_; | 138 ScopedVector<base::SharedMemory> shm_buffers_; |
| 133 // A vector of true/false indicating if a shm buffer is in use by the decoder. | 139 // A vector of true/false indicating if a shm buffer is in use by the decoder. |
| 134 // This is parallel to |shm_buffers_|. | 140 // This is parallel to |shm_buffers_|. |
| 135 std::vector<uint8_t> shm_buffer_busy_; | 141 std::vector<uint8_t> shm_buffer_busy_; |
| 136 | 142 |
| 137 uint32_t min_picture_count_; | 143 uint32_t min_picture_count_; |
| 138 typedef std::map<uint32_t, PictureBufferState> PictureBufferMap; | 144 typedef std::map<uint32_t, PictureBufferState> PictureBufferMap; |
| 139 PictureBufferMap picture_buffer_map_; | 145 PictureBufferMap picture_buffer_map_; |
| 140 | 146 |
| 141 // Keeps list of pending decodes. | 147 // Keeps list of pending decodes. |
| 142 PendingDecodeList pending_decodes_; | 148 PendingDecodeList pending_decodes_; |
| 143 | 149 |
| 144 ppapi::host::ReplyMessageContext flush_reply_context_; | 150 ppapi::host::ReplyMessageContext flush_reply_context_; |
| 145 ppapi::host::ReplyMessageContext reset_reply_context_; | 151 ppapi::host::ReplyMessageContext reset_reply_context_; |
| 146 | 152 |
| 147 bool initialized_ = false; | 153 bool initialized_ = false; |
| 148 | 154 |
| 149 DISALLOW_COPY_AND_ASSIGN(PepperVideoDecoderHost); | 155 DISALLOW_COPY_AND_ASSIGN(PepperVideoDecoderHost); |
| 150 }; | 156 }; |
| 151 | 157 |
| 152 } // namespace content | 158 } // namespace content |
| 153 | 159 |
| 154 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DECODER_HOST_H_ | 160 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DECODER_HOST_H_ |
| OLD | NEW |