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

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

Issue 84393002: Revert 236927 "Reorganize media::VideoCapture* types" (Closed) Base URL: svn://svn.chromium.org/chrome/
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,
86 const media::VideoCaptureParams& params); 85 const media::VideoCaptureParams& params);
87 86
88 // Stop video capture. This will take back all buffers held by by 87 // Stop video capture. This will take back all buffers held by by
89 // |event_handler|, and |event_handler| shouldn't use those buffers any more. 88 // |event_handler|, and |event_handler| shouldn't use those buffers any more.
90 // Returns the session_id of the stopped client, or 89 // Returns the session_id of the stopped client, or
91 // kInvalidMediaCaptureSessionId if the indicated client was not registered. 90 // kInvalidMediaCaptureSessionId if the indicated client was not registered.
92 int RemoveClient(const VideoCaptureControllerID& id, 91 int RemoveClient(const VideoCaptureControllerID& id,
93 VideoCaptureControllerEventHandler* event_handler); 92 VideoCaptureControllerEventHandler* event_handler);
94 93
95 int GetClientCount(); 94 int GetClientCount();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 VideoCaptureState state_; 141 VideoCaptureState state_;
143 142
144 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; 143 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_;
145 144
146 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); 145 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController);
147 }; 146 };
148 147
149 } // namespace content 148 } // namespace content
150 149
151 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 150 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698