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

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

Issue 83633008: Reland: Reorganize media::VideoCapture* types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
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 a VideoCaptureDevice and all 5 // VideoCaptureController is the glue between a VideoCaptureDevice and all
6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of 6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of
7 // one (and only one) VideoCaptureDevice; both are owned by the 7 // one (and only one) VideoCaptureDevice; both are owned by the
8 // VideoCaptureManager. 8 // VideoCaptureManager.
9 // 9 //
10 // The VideoCaptureController is responsible for: 10 // The VideoCaptureController is responsible for:
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Return a new VideoCaptureDeviceClient to forward capture events to this 75 // Return a new VideoCaptureDeviceClient to forward capture events to this
76 // instance. 76 // instance.
77 scoped_ptr<media::VideoCaptureDevice::Client> NewDeviceClient(); 77 scoped_ptr<media::VideoCaptureDevice::Client> NewDeviceClient();
78 78
79 // Start video capturing and try to use the resolution specified in |params|. 79 // Start video capturing and try to use the resolution specified in |params|.
80 // Buffers will be shared to the client as necessary. The client will continue 80 // Buffers will be shared to the client as necessary. The client will continue
81 // to receive frames from the device until RemoveClient() is called. 81 // to receive frames from the device until RemoveClient() is called.
82 void AddClient(const VideoCaptureControllerID& id, 82 void AddClient(const VideoCaptureControllerID& id,
83 VideoCaptureControllerEventHandler* event_handler, 83 VideoCaptureControllerEventHandler* event_handler,
84 base::ProcessHandle render_process, 84 base::ProcessHandle render_process,
85 media::VideoCaptureSessionId session_id,
85 const media::VideoCaptureParams& params); 86 const media::VideoCaptureParams& params);
86 87
87 // Stop video capture. This will take back all buffers held by by 88 // Stop video capture. This will take back all buffers held by by
88 // |event_handler|, and |event_handler| shouldn't use those buffers any more. 89 // |event_handler|, and |event_handler| shouldn't use those buffers any more.
89 // Returns the session_id of the stopped client, or 90 // Returns the session_id of the stopped client, or
90 // kInvalidMediaCaptureSessionId if the indicated client was not registered. 91 // kInvalidMediaCaptureSessionId if the indicated client was not registered.
91 int RemoveClient(const VideoCaptureControllerID& id, 92 int RemoveClient(const VideoCaptureControllerID& id,
92 VideoCaptureControllerEventHandler* event_handler); 93 VideoCaptureControllerEventHandler* event_handler);
93 94
94 int GetClientCount(); 95 int GetClientCount();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 VideoCaptureState state_; 142 VideoCaptureState state_;
142 143
143 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; 144 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_;
144 145
145 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); 146 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController);
146 }; 147 };
147 148
148 } // namespace content 149 } // namespace content
149 150
150 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 151 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698