| 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_PLATFORM_VIDEO_CAPTURE_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 const std::string& device_id, | 35 const std::string& device_id, |
| 36 const GURL& document_url, | 36 const GURL& document_url, |
| 37 PepperVideoCaptureHost* handler); | 37 PepperVideoCaptureHost* handler); |
| 38 | 38 |
| 39 // Detaches the event handler and stops sending notifications to it. | 39 // Detaches the event handler and stops sending notifications to it. |
| 40 void DetachEventHandler(); | 40 void DetachEventHandler(); |
| 41 | 41 |
| 42 // media::VideoCapture implementation. | 42 // media::VideoCapture implementation. |
| 43 virtual void StartCapture( | 43 virtual void StartCapture( |
| 44 media::VideoCapture::EventHandler* handler, | 44 media::VideoCapture::EventHandler* handler, |
| 45 const media::VideoCaptureCapability& capability) OVERRIDE; | 45 const media::VideoCaptureParams& params) OVERRIDE; |
| 46 virtual void StopCapture(media::VideoCapture::EventHandler* handler) OVERRIDE; | 46 virtual void StopCapture(media::VideoCapture::EventHandler* handler) OVERRIDE; |
| 47 virtual bool CaptureStarted() OVERRIDE; | 47 virtual bool CaptureStarted() OVERRIDE; |
| 48 virtual int CaptureWidth() OVERRIDE; | 48 virtual int CaptureWidth() OVERRIDE; |
| 49 virtual int CaptureHeight() OVERRIDE; | 49 virtual int CaptureHeight() OVERRIDE; |
| 50 virtual int CaptureFrameRate() OVERRIDE; | 50 virtual int CaptureFrameRate() OVERRIDE; |
| 51 | 51 |
| 52 // media::VideoCapture::EventHandler implementation | 52 // media::VideoCapture::EventHandler implementation |
| 53 virtual void OnStarted(VideoCapture* capture) OVERRIDE; | 53 virtual void OnStarted(VideoCapture* capture) OVERRIDE; |
| 54 virtual void OnStopped(VideoCapture* capture) OVERRIDE; | 54 virtual void OnStopped(VideoCapture* capture) OVERRIDE; |
| 55 virtual void OnPaused(VideoCapture* capture) OVERRIDE; | 55 virtual void OnPaused(VideoCapture* capture) OVERRIDE; |
| 56 virtual void OnError(VideoCapture* capture, int error_code) OVERRIDE; | 56 virtual void OnError(VideoCapture* capture, int error_code) OVERRIDE; |
| 57 virtual void OnRemoved(VideoCapture* capture) OVERRIDE; | 57 virtual void OnRemoved(VideoCapture* capture) OVERRIDE; |
| 58 virtual void OnFrameReady( | 58 virtual void OnFrameReady( |
| 59 VideoCapture* capture, | 59 VideoCapture* capture, |
| 60 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE; | 60 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE; |
| 61 virtual void OnDeviceInfoReceived( | 61 virtual void OnDeviceInfoReceived( |
| 62 VideoCapture* capture, | 62 VideoCapture* capture, |
| 63 const media::VideoCaptureParams& device_info) OVERRIDE; | 63 const media::VideoCaptureFormat& device_info) OVERRIDE; |
| 64 | 64 |
| 65 protected: | 65 protected: |
| 66 friend class base::RefCounted<PepperPlatformVideoCapture>; | 66 friend class base::RefCounted<PepperPlatformVideoCapture>; |
| 67 virtual ~PepperPlatformVideoCapture(); | 67 virtual ~PepperPlatformVideoCapture(); |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 void Initialize(); | 70 void Initialize(); |
| 71 | 71 |
| 72 void OnDeviceOpened(int request_id, | 72 void OnDeviceOpened(int request_id, |
| 73 bool succeeded, | 73 bool succeeded, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 95 // there isn't any pending request before this object goes away. | 95 // there isn't any pending request before this object goes away. |
| 96 bool pending_open_device_; | 96 bool pending_open_device_; |
| 97 int pending_open_device_id_; | 97 int pending_open_device_id_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(PepperPlatformVideoCapture); | 99 DISALLOW_COPY_AND_ASSIGN(PepperPlatformVideoCapture); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace content | 102 } // namespace content |
| 103 | 103 |
| 104 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ | 104 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ |
| OLD | NEW |