| 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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/public/renderer/renderer_ppapi_host.h" | 10 #include "content/public/renderer/renderer_ppapi_host.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 virtual void OnStarted(media::VideoCapture* capture) OVERRIDE; | 42 virtual void OnStarted(media::VideoCapture* capture) OVERRIDE; |
| 43 virtual void OnStopped(media::VideoCapture* capture) OVERRIDE; | 43 virtual void OnStopped(media::VideoCapture* capture) OVERRIDE; |
| 44 virtual void OnPaused(media::VideoCapture* capture) OVERRIDE; | 44 virtual void OnPaused(media::VideoCapture* capture) OVERRIDE; |
| 45 virtual void OnError(media::VideoCapture* capture, int error_code) OVERRIDE; | 45 virtual void OnError(media::VideoCapture* capture, int error_code) OVERRIDE; |
| 46 virtual void OnRemoved(media::VideoCapture* capture) OVERRIDE; | 46 virtual void OnRemoved(media::VideoCapture* capture) OVERRIDE; |
| 47 virtual void OnFrameReady( | 47 virtual void OnFrameReady( |
| 48 media::VideoCapture* capture, | 48 media::VideoCapture* capture, |
| 49 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE; | 49 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE; |
| 50 virtual void OnDeviceInfoReceived( | 50 virtual void OnDeviceInfoReceived( |
| 51 media::VideoCapture* capture, | 51 media::VideoCapture* capture, |
| 52 const media::VideoCaptureParams& device_info) OVERRIDE; | 52 const media::VideoCaptureFormat& device_info) OVERRIDE; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 int32_t OnOpen(ppapi::host::HostMessageContext* context, | 55 int32_t OnOpen(ppapi::host::HostMessageContext* context, |
| 56 const std::string& device_id, | 56 const std::string& device_id, |
| 57 const PP_VideoCaptureDeviceInfo_Dev& requested_info, | 57 const PP_VideoCaptureDeviceInfo_Dev& requested_info, |
| 58 uint32_t buffer_count); | 58 uint32_t buffer_count); |
| 59 int32_t OnStartCapture(ppapi::host::HostMessageContext* context); | 59 int32_t OnStartCapture(ppapi::host::HostMessageContext* context); |
| 60 int32_t OnReuseBuffer(ppapi::host::HostMessageContext* context, | 60 int32_t OnReuseBuffer(ppapi::host::HostMessageContext* context, |
| 61 uint32_t buffer); | 61 uint32_t buffer); |
| 62 int32_t OnStopCapture(ppapi::host::HostMessageContext* context); | 62 int32_t OnStopCapture(ppapi::host::HostMessageContext* context); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 84 bool in_use; | 84 bool in_use; |
| 85 void* data; | 85 void* data; |
| 86 scoped_refptr<PPB_Buffer_Impl> buffer; | 86 scoped_refptr<PPB_Buffer_Impl> buffer; |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 RendererPpapiHostImpl* renderer_ppapi_host_; | 89 RendererPpapiHostImpl* renderer_ppapi_host_; |
| 90 | 90 |
| 91 std::vector<BufferInfo> buffers_; | 91 std::vector<BufferInfo> buffers_; |
| 92 size_t buffer_count_hint_; | 92 size_t buffer_count_hint_; |
| 93 | 93 |
| 94 media::VideoCaptureCapability capability_; | 94 media::VideoCaptureParams param_request_; |
| 95 | 95 |
| 96 PP_VideoCaptureStatus_Dev status_; | 96 PP_VideoCaptureStatus_Dev status_; |
| 97 | 97 |
| 98 ppapi::host::ReplyMessageContext open_reply_context_; | 98 ppapi::host::ReplyMessageContext open_reply_context_; |
| 99 | 99 |
| 100 PepperDeviceEnumerationHostHelper enumeration_helper_; | 100 PepperDeviceEnumerationHostHelper enumeration_helper_; |
| 101 | 101 |
| 102 DISALLOW_COPY_AND_ASSIGN(PepperVideoCaptureHost); | 102 DISALLOW_COPY_AND_ASSIGN(PepperVideoCaptureHost); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace content | 105 } // namespace content |
| 106 | 106 |
| 107 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_CAPTURE_HOST_H_ | 107 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_CAPTURE_HOST_H_ |
| OLD | NEW |