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 // VideoCaptureHost serves video capture related messages from | 5 // VideoCaptureHost serves video capture related messages from |
6 // VideoCaptureMessageFilter which lives inside the render process. | 6 // VideoCaptureMessageFilter which lives inside the render process. |
7 // | 7 // |
8 // This class is owned by RenderProcessHostImpl, and instantiated on UI | 8 // This class is owned by RenderProcessHostImpl, and instantiated on UI |
9 // thread, but all other operations and method calls happen on IO thread. | 9 // thread, but all other operations and method calls happen on IO thread. |
10 // | 10 // |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
164 int buffer_id, | 164 int buffer_id, |
165 const gpu::MailboxHolder& mailbox_holder, | 165 const gpu::MailboxHolder& mailbox_holder, |
166 const media::VideoCaptureFormat& format, | 166 const media::VideoCaptureFormat& format, |
167 base::TimeTicks timestamp); | 167 base::TimeTicks timestamp); |
168 | 168 |
169 // Handle error coming from VideoCaptureDevice. | 169 // Handle error coming from VideoCaptureDevice. |
170 void DoHandleErrorOnIOThread(const VideoCaptureControllerID& controller_id); | 170 void DoHandleErrorOnIOThread(const VideoCaptureControllerID& controller_id); |
171 | 171 |
172 void DoEndedOnIOThread(const VideoCaptureControllerID& controller_id); | 172 void DoEndedOnIOThread(const VideoCaptureControllerID& controller_id); |
173 | 173 |
174 // Delete the controller and notifies the VideoCaptureManager. |on_error| is | |
mcasas
2014/04/25 17:18:35
s/Delete/Deletes/
"comments should be descriptive
| |
175 // true if this is triggered by VideoCaptureControllerEventHandler::OnError. | |
174 void DeleteVideoCaptureControllerOnIOThread( | 176 void DeleteVideoCaptureControllerOnIOThread( |
175 const VideoCaptureControllerID& controller_id); | 177 const VideoCaptureControllerID& controller_id, bool on_error); |
176 | 178 |
177 MediaStreamManager* media_stream_manager_; | 179 MediaStreamManager* media_stream_manager_; |
178 | 180 |
179 typedef std::map<VideoCaptureControllerID, | 181 typedef std::map<VideoCaptureControllerID, |
180 base::WeakPtr<VideoCaptureController> > EntryMap; | 182 base::WeakPtr<VideoCaptureController> > EntryMap; |
181 | 183 |
182 // A map of VideoCaptureControllerID to the VideoCaptureController to which it | 184 // A map of VideoCaptureControllerID to the VideoCaptureController to which it |
183 // is connected. An entry in this map holds a null controller while it is in | 185 // is connected. An entry in this map holds a null controller while it is in |
184 // the process of starting. | 186 // the process of starting. |
185 EntryMap entries_; | 187 EntryMap entries_; |
186 | 188 |
187 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); | 189 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); |
188 }; | 190 }; |
189 | 191 |
190 } // namespace content | 192 } // namespace content |
191 | 193 |
192 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ | 194 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ |
OLD | NEW |