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_RENDERER_PEPPER_PEPPER_VIDEO_CAPTURE_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_CAPTURE_HOST_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_CAPTURE_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_CAPTURE_HOST_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
| 11 #include <memory> |
| 12 |
11 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
12 #include "base/macros.h" | 14 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "content/common/media/video_capture.h" | 16 #include "content/common/media/video_capture.h" |
16 #include "content/public/renderer/renderer_ppapi_host.h" | 17 #include "content/public/renderer/renderer_ppapi_host.h" |
17 #include "content/renderer/pepper/pepper_device_enumeration_host_helper.h" | 18 #include "content/renderer/pepper/pepper_device_enumeration_host_helper.h" |
18 #include "content/renderer/pepper/ppb_buffer_impl.h" | 19 #include "content/renderer/pepper/ppb_buffer_impl.h" |
19 #include "media/base/video_capture_types.h" | 20 #include "media/base/video_capture_types.h" |
20 #include "ppapi/c/dev/ppp_video_capture_dev.h" | 21 #include "ppapi/c/dev/ppp_video_capture_dev.h" |
21 #include "ppapi/host/host_message_context.h" | 22 #include "ppapi/host/host_message_context.h" |
22 #include "ppapi/host/resource_host.h" | 23 #include "ppapi/host/resource_host.h" |
23 | 24 |
24 namespace media { | 25 namespace media { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 void ReleaseBuffers(); | 84 void ReleaseBuffers(); |
84 void SendStatus(); | 85 void SendStatus(); |
85 | 86 |
86 void SetRequestedInfo(const PP_VideoCaptureDeviceInfo_Dev& device_info, | 87 void SetRequestedInfo(const PP_VideoCaptureDeviceInfo_Dev& device_info, |
87 uint32_t buffer_count); | 88 uint32_t buffer_count); |
88 | 89 |
89 void DetachPlatformVideoCapture(); | 90 void DetachPlatformVideoCapture(); |
90 | 91 |
91 bool SetStatus(PP_VideoCaptureStatus_Dev status, bool forced); | 92 bool SetStatus(PP_VideoCaptureStatus_Dev status, bool forced); |
92 | 93 |
93 scoped_ptr<PepperPlatformVideoCapture> platform_video_capture_; | 94 std::unique_ptr<PepperPlatformVideoCapture> platform_video_capture_; |
94 | 95 |
95 // Buffers of video frame. | 96 // Buffers of video frame. |
96 struct BufferInfo { | 97 struct BufferInfo { |
97 BufferInfo(); | 98 BufferInfo(); |
98 BufferInfo(const BufferInfo& other); | 99 BufferInfo(const BufferInfo& other); |
99 ~BufferInfo(); | 100 ~BufferInfo(); |
100 | 101 |
101 bool in_use; | 102 bool in_use; |
102 void* data; | 103 void* data; |
103 scoped_refptr<PPB_Buffer_Impl> buffer; | 104 scoped_refptr<PPB_Buffer_Impl> buffer; |
(...skipping 12 matching lines...) Expand all Loading... |
116 ppapi::host::ReplyMessageContext open_reply_context_; | 117 ppapi::host::ReplyMessageContext open_reply_context_; |
117 | 118 |
118 PepperDeviceEnumerationHostHelper enumeration_helper_; | 119 PepperDeviceEnumerationHostHelper enumeration_helper_; |
119 | 120 |
120 DISALLOW_COPY_AND_ASSIGN(PepperVideoCaptureHost); | 121 DISALLOW_COPY_AND_ASSIGN(PepperVideoCaptureHost); |
121 }; | 122 }; |
122 | 123 |
123 } // namespace content | 124 } // namespace content |
124 | 125 |
125 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_CAPTURE_HOST_H_ | 126 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_CAPTURE_HOST_H_ |
OLD | NEW |