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

Side by Side Diff: content/browser/renderer_host/media/video_capture_host.cc

Issue 2583883003: Rebase of Removing gpu::SyncToken usage from video capture pipeline (Closed)
Patch Set: Rebase. Created 3 years, 11 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
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 #include "content/browser/renderer_host/media/video_capture_host.h" 5 #include "content/browser/renderer_host/media/video_capture_host.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 return; 205 return;
206 206
207 if (VideoCaptureController* controller = it->second.get()) { 207 if (VideoCaptureController* controller = it->second.get()) {
208 media_stream_manager_->video_capture_manager() 208 media_stream_manager_->video_capture_manager()
209 ->RequestRefreshFrameForClient(controller); 209 ->RequestRefreshFrameForClient(controller);
210 } 210 }
211 } 211 }
212 212
213 void VideoCaptureHost::ReleaseBuffer(int32_t device_id, 213 void VideoCaptureHost::ReleaseBuffer(int32_t device_id,
214 int32_t buffer_id, 214 int32_t buffer_id,
215 const gpu::SyncToken& sync_token,
216 double consumer_resource_utilization) { 215 double consumer_resource_utilization) {
217 DCHECK_CURRENTLY_ON(BrowserThread::IO); 216 DCHECK_CURRENTLY_ON(BrowserThread::IO);
218 217
219 VideoCaptureControllerID controller_id(device_id); 218 VideoCaptureControllerID controller_id(device_id);
220 auto it = controllers_.find(controller_id); 219 auto it = controllers_.find(controller_id);
221 if (it == controllers_.end()) 220 if (it == controllers_.end())
222 return; 221 return;
223 222
224 const base::WeakPtr<VideoCaptureController>& controller = it->second; 223 const base::WeakPtr<VideoCaptureController>& controller = it->second;
225 if (controller) { 224 if (controller) {
226 controller->ReturnBuffer(controller_id, this, buffer_id, sync_token, 225 controller->ReturnBuffer(controller_id, this, buffer_id,
227 consumer_resource_utilization); 226 consumer_resource_utilization);
228 } 227 }
229 } 228 }
230 229
231 void VideoCaptureHost::GetDeviceSupportedFormats( 230 void VideoCaptureHost::GetDeviceSupportedFormats(
232 int32_t device_id, 231 int32_t device_id,
233 int32_t session_id, 232 int32_t session_id,
234 const GetDeviceSupportedFormatsCallback& callback) { 233 const GetDeviceSupportedFormatsCallback& callback) {
235 DVLOG(1) << __func__ << " " << device_id; 234 DVLOG(1) << __func__ << " " << device_id;
236 DCHECK_CURRENTLY_ON(BrowserThread::IO); 235 DCHECK_CURRENTLY_ON(BrowserThread::IO);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 const base::WeakPtr<VideoCaptureController> controller = it->second; 326 const base::WeakPtr<VideoCaptureController> controller = it->second;
328 controllers_.erase(it); 327 controllers_.erase(it);
329 if (!controller) 328 if (!controller)
330 return; 329 return;
331 330
332 media_stream_manager_->video_capture_manager()->StopCaptureForClient( 331 media_stream_manager_->video_capture_manager()->StopCaptureForClient(
333 controller.get(), controller_id, this, on_error); 332 controller.get(), controller_id, this, on_error);
334 } 333 }
335 334
336 } // namespace content 335 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/video_capture_host.h ('k') | content/common/video_capture.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698