| 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> |
| 11 #include <map> | 11 #include <map> |
| 12 #include <memory> |
| 12 #include <set> | 13 #include <set> |
| 13 #include <vector> | 14 #include <vector> |
| 14 | 15 |
| 15 #include "base/containers/hash_tables.h" | 16 #include "base/containers/hash_tables.h" |
| 16 #include "base/macros.h" | 17 #include "base/macros.h" |
| 17 #include "base/memory/scoped_ptr.h" | |
| 18 #include "base/memory/scoped_vector.h" | 18 #include "base/memory/scoped_vector.h" |
| 19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 20 #include "media/video/video_decode_accelerator.h" | 20 #include "media/video/video_decode_accelerator.h" |
| 21 #include "ppapi/c/pp_codecs.h" | 21 #include "ppapi/c/pp_codecs.h" |
| 22 #include "ppapi/host/host_message_context.h" | 22 #include "ppapi/host/host_message_context.h" |
| 23 #include "ppapi/host/resource_host.h" | 23 #include "ppapi/host/resource_host.h" |
| 24 #include "ppapi/proxy/resource_message_params.h" | 24 #include "ppapi/proxy/resource_message_params.h" |
| 25 | 25 |
| 26 namespace base { | 26 namespace base { |
| 27 class SharedMemory; | 27 class SharedMemory; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // Tries to initialize software decoder. Returns true on success. | 114 // Tries to initialize software decoder. Returns true on success. |
| 115 bool TryFallbackToSoftwareDecoder(); | 115 bool TryFallbackToSoftwareDecoder(); |
| 116 | 116 |
| 117 PendingDecodeList::iterator GetPendingDecodeById(int32_t decode_id); | 117 PendingDecodeList::iterator GetPendingDecodeById(int32_t decode_id); |
| 118 | 118 |
| 119 // Non-owning pointer. | 119 // Non-owning pointer. |
| 120 RendererPpapiHost* renderer_ppapi_host_; | 120 RendererPpapiHost* renderer_ppapi_host_; |
| 121 | 121 |
| 122 media::VideoCodecProfile profile_; | 122 media::VideoCodecProfile profile_; |
| 123 | 123 |
| 124 scoped_ptr<media::VideoDecodeAccelerator> decoder_; | 124 std::unique_ptr<media::VideoDecodeAccelerator> decoder_; |
| 125 | 125 |
| 126 bool software_fallback_allowed_ = false; | 126 bool software_fallback_allowed_ = false; |
| 127 bool software_fallback_used_ = false; | 127 bool software_fallback_used_ = false; |
| 128 | 128 |
| 129 // A vector holding our shm buffers, in sync with a similar vector in the | 129 // A vector holding our shm buffers, in sync with a similar vector in the |
| 130 // resource. We use a buffer's index in these vectors as its id on both sides | 130 // resource. We use a buffer's index in these vectors as its id on both sides |
| 131 // of the proxy. Only add buffers or update them in place so as not to | 131 // of the proxy. Only add buffers or update them in place so as not to |
| 132 // invalidate these ids. | 132 // invalidate these ids. |
| 133 ScopedVector<base::SharedMemory> shm_buffers_; | 133 ScopedVector<base::SharedMemory> shm_buffers_; |
| 134 // A vector of true/false indicating if a shm buffer is in use by the decoder. | 134 // A vector of true/false indicating if a shm buffer is in use by the decoder. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 146 ppapi::host::ReplyMessageContext reset_reply_context_; | 146 ppapi::host::ReplyMessageContext reset_reply_context_; |
| 147 | 147 |
| 148 bool initialized_ = false; | 148 bool initialized_ = false; |
| 149 | 149 |
| 150 DISALLOW_COPY_AND_ASSIGN(PepperVideoDecoderHost); | 150 DISALLOW_COPY_AND_ASSIGN(PepperVideoDecoderHost); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace content | 153 } // namespace content |
| 154 | 154 |
| 155 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DECODER_HOST_H_ | 155 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DECODER_HOST_H_ |
| OLD | NEW |