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

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

Issue 24133002: Make VideoCaptureController single-threaded and not ref counted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git pull Created 7 years, 3 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
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 // Implementation notes: This needs to work on a variety of hardware 5 // Implementation notes: This needs to work on a variety of hardware
6 // configurations where the speed of the CPU and GPU greatly affect overall 6 // configurations where the speed of the CPU and GPU greatly affect overall
7 // performance. Spanning several threads, the process of capturing has been 7 // performance. Spanning several threads, the process of capturing has been
8 // split up into four conceptual stages: 8 // split up into four conceptual stages:
9 // 9 //
10 // 1. Reserve Buffer: Before a frame can be captured, a slot in the consumer's 10 // 1. Reserve Buffer: Before a frame can be captured, a slot in the consumer's
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 int render_view_id) 1221 int render_view_id)
1222 : device_name_(name), 1222 : device_name_(name),
1223 impl_(new WebContentsVideoCaptureDevice::Impl(render_process_id, 1223 impl_(new WebContentsVideoCaptureDevice::Impl(render_process_id,
1224 render_view_id)) {} 1224 render_view_id)) {}
1225 1225
1226 WebContentsVideoCaptureDevice::~WebContentsVideoCaptureDevice() { 1226 WebContentsVideoCaptureDevice::~WebContentsVideoCaptureDevice() {
1227 DVLOG(2) << "WebContentsVideoCaptureDevice@" << this << " destroying."; 1227 DVLOG(2) << "WebContentsVideoCaptureDevice@" << this << " destroying.";
1228 } 1228 }
1229 1229
1230 // static 1230 // static
1231 media::VideoCaptureDevice* WebContentsVideoCaptureDevice::Create( 1231 media::VideoCaptureDevice1* WebContentsVideoCaptureDevice::Create(
1232 const std::string& device_id) { 1232 const std::string& device_id) {
1233 // Parse device_id into render_process_id and render_view_id. 1233 // Parse device_id into render_process_id and render_view_id.
1234 int render_process_id = -1; 1234 int render_process_id = -1;
1235 int render_view_id = -1; 1235 int render_view_id = -1;
1236 if (!WebContentsCaptureUtil::ExtractTabCaptureTarget(device_id, 1236 if (!WebContentsCaptureUtil::ExtractTabCaptureTarget(device_id,
1237 &render_process_id, 1237 &render_process_id,
1238 &render_view_id)) 1238 &render_view_id))
1239 return NULL; 1239 return NULL;
1240 1240
1241 std::string device_name; 1241 std::string device_name;
(...skipping 27 matching lines...) Expand all
1269 void WebContentsVideoCaptureDevice::DeAllocate() { 1269 void WebContentsVideoCaptureDevice::DeAllocate() {
1270 impl_->DeAllocate(); 1270 impl_->DeAllocate();
1271 } 1271 }
1272 1272
1273 const media::VideoCaptureDevice::Name& 1273 const media::VideoCaptureDevice::Name&
1274 WebContentsVideoCaptureDevice::device_name() { 1274 WebContentsVideoCaptureDevice::device_name() {
1275 return device_name_; 1275 return device_name_;
1276 } 1276 }
1277 1277
1278 } // namespace content 1278 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698