| 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 // VideoCaptureController is the glue between VideoCaptureHost, | 5 // VideoCaptureController is the glue between VideoCaptureHost, |
| 6 // VideoCaptureManager and VideoCaptureDevice. | 6 // VideoCaptureManager and VideoCaptureDevice. |
| 7 // It provides functions for VideoCaptureHost to start a VideoCaptureDevice and | 7 // It provides functions for VideoCaptureHost to start a VideoCaptureDevice and |
| 8 // is responsible for keeping track of shared DIBs and filling them with I420 | 8 // is responsible for keeping track of shared DIBs and filling them with I420 |
| 9 // video frames for IPC communication between VideoCaptureHost and | 9 // video frames for IPC communication between VideoCaptureHost and |
| 10 // VideoCaptureMessageFilter. | 10 // VideoCaptureMessageFilter. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "media/video/capture/video_capture_device.h" | 29 #include "media/video/capture/video_capture_device.h" |
| 30 #include "media/video/capture/video_capture_types.h" | 30 #include "media/video/capture/video_capture_types.h" |
| 31 | 31 |
| 32 namespace content { | 32 namespace content { |
| 33 class VideoCaptureManager; | 33 class VideoCaptureManager; |
| 34 | 34 |
| 35 class CONTENT_EXPORT VideoCaptureController | 35 class CONTENT_EXPORT VideoCaptureController |
| 36 : public base::RefCountedThreadSafe<VideoCaptureController>, | 36 : public base::RefCountedThreadSafe<VideoCaptureController>, |
| 37 public media::VideoCaptureDevice::EventHandler { | 37 public media::VideoCaptureDevice::EventHandler { |
| 38 public: | 38 public: |
| 39 VideoCaptureController(VideoCaptureManager* video_capture_manager); | 39 explicit VideoCaptureController(VideoCaptureManager* video_capture_manager); |
| 40 | 40 |
| 41 // Start video capturing and try to use the resolution specified in | 41 // Start video capturing and try to use the resolution specified in |
| 42 // |params|. | 42 // |params|. |
| 43 // When capturing has started, the |event_handler| receives a call OnFrameInfo | 43 // When capturing has started, the |event_handler| receives a call OnFrameInfo |
| 44 // with resolution that best matches the requested that the video | 44 // with resolution that best matches the requested that the video |
| 45 // capture device support. | 45 // capture device support. |
| 46 void StartCapture(const VideoCaptureControllerID& id, | 46 void StartCapture(const VideoCaptureControllerID& id, |
| 47 VideoCaptureControllerEventHandler* event_handler, | 47 VideoCaptureControllerEventHandler* event_handler, |
| 48 base::ProcessHandle render_process, | 48 base::ProcessHandle render_process, |
| 49 const media::VideoCaptureParams& params); | 49 const media::VideoCaptureParams& params); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 bool device_in_use_; | 143 bool device_in_use_; |
| 144 VideoCaptureState state_; | 144 VideoCaptureState state_; |
| 145 | 145 |
| 146 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureController); | 146 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureController); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } // namespace content | 149 } // namespace content |
| 150 | 150 |
| 151 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ | 151 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ |
| OLD | NEW |