Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.h

Issue 10537057: refactor VideoCaptureHost and VideoCaptureController. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // |params|. 44 // |params|.
45 // When capturing has started, the |event_handler| receives a call OnFrameInfo 45 // When capturing has started, the |event_handler| receives a call OnFrameInfo
46 // with resolution that best matches the requested that the video 46 // with resolution that best matches the requested that the video
47 // capture device support. 47 // capture device support.
48 void StartCapture(const VideoCaptureControllerID& id, 48 void StartCapture(const VideoCaptureControllerID& id,
49 VideoCaptureControllerEventHandler* event_handler, 49 VideoCaptureControllerEventHandler* event_handler,
50 base::ProcessHandle render_process, 50 base::ProcessHandle render_process,
51 const media::VideoCaptureParams& params); 51 const media::VideoCaptureParams& params);
52 52
53 // Stop video capture. 53 // Stop video capture.
54 // When the capture is stopped and all DIBs have been returned, 54 // This will take back all buffers held by by |event_handler|, and
55 // VideoCaptureControllerEventHandler::OnReadyToDelete will be called. 55 // |event_handler| shouldn't use those buffers any more.
56 // |force_buffer_return| allows controller to take back all buffers used
57 // by |event_handler|.
58 void StopCapture(const VideoCaptureControllerID& id, 56 void StopCapture(const VideoCaptureControllerID& id,
59 VideoCaptureControllerEventHandler* event_handler, 57 VideoCaptureControllerEventHandler* event_handler);
60 bool force_buffer_return);
61 58
62 // API called directly by VideoCaptureManager in case the device is 59 // API called directly by VideoCaptureManager in case the device is
63 // prematurely closed. 60 // prematurely closed.
64 void StopSession(int session_id); 61 void StopSession(int session_id);
65 62
66 // Return a buffer previously given in 63 // Return a buffer previously given in
67 // VideoCaptureControllerEventHandler::OnBufferReady. 64 // VideoCaptureControllerEventHandler::OnBufferReady.
68 void ReturnBuffer(const VideoCaptureControllerID& id, 65 void ReturnBuffer(const VideoCaptureControllerID& id,
69 VideoCaptureControllerEventHandler* event_handler, 66 VideoCaptureControllerEventHandler* event_handler,
70 int buffer_id); 67 int buffer_id);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 138
142 media_stream::VideoCaptureManager* video_capture_manager_; 139 media_stream::VideoCaptureManager* video_capture_manager_;
143 140
144 bool device_in_use_; 141 bool device_in_use_;
145 video_capture::State state_; 142 video_capture::State state_;
146 143
147 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureController); 144 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureController);
148 }; 145 };
149 146
150 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 147 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698