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

Side by Side Diff: content/renderer/media/video_capture_impl_manager.cc

Issue 1873293002: Report if video capturing meets output protection requirement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed oshima and nasko's comments, and rebased. Created 4 years, 7 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 // Implementation notes about interactions with VideoCaptureImpl. 5 // Implementation notes about interactions with VideoCaptureImpl.
6 // 6 //
7 // How is VideoCaptureImpl used: 7 // How is VideoCaptureImpl used:
8 // 8 //
9 // VideoCaptureImpl is an IO thread object while VideoCaptureImplManager 9 // VideoCaptureImpl is an IO thread object while VideoCaptureImplManager
10 // lives only on the render thread. It is only possible to access an 10 // lives only on the render thread. It is only possible to access an
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 DCHECK(render_main_task_runner_->BelongsToCurrentThread()); 101 DCHECK(render_main_task_runner_->BelongsToCurrentThread());
102 const VideoCaptureDeviceMap::const_iterator it = devices_.find(id); 102 const VideoCaptureDeviceMap::const_iterator it = devices_.find(id);
103 DCHECK(it != devices_.end()); 103 DCHECK(it != devices_.end());
104 VideoCaptureImpl* const impl = it->second.second; 104 VideoCaptureImpl* const impl = it->second.second;
105 ChildProcess::current()->io_task_runner()->PostTask( 105 ChildProcess::current()->io_task_runner()->PostTask(
106 FROM_HERE, 106 FROM_HERE,
107 base::Bind(&VideoCaptureImpl::RequestRefreshFrame, 107 base::Bind(&VideoCaptureImpl::RequestRefreshFrame,
108 base::Unretained(impl))); 108 base::Unretained(impl)));
109 } 109 }
110 110
111
112 void VideoCaptureImplManager::GetDeviceSupportedFormats( 111 void VideoCaptureImplManager::GetDeviceSupportedFormats(
113 media::VideoCaptureSessionId id, 112 media::VideoCaptureSessionId id,
114 const VideoCaptureDeviceFormatsCB& callback) { 113 const VideoCaptureDeviceFormatsCB& callback) {
115 DCHECK(render_main_task_runner_->BelongsToCurrentThread()); 114 DCHECK(render_main_task_runner_->BelongsToCurrentThread());
116 const VideoCaptureDeviceMap::const_iterator it = devices_.find(id); 115 const VideoCaptureDeviceMap::const_iterator it = devices_.find(id);
117 DCHECK(it != devices_.end()); 116 DCHECK(it != devices_.end());
118 VideoCaptureImpl* const impl = it->second.second; 117 VideoCaptureImpl* const impl = it->second.second;
119 ChildProcess::current()->io_task_runner()->PostTask( 118 ChildProcess::current()->io_task_runner()->PostTask(
120 FROM_HERE, base::Bind(&VideoCaptureImpl::GetDeviceSupportedFormats, 119 FROM_HERE, base::Bind(&VideoCaptureImpl::GetDeviceSupportedFormats,
121 base::Unretained(impl), callback)); 120 base::Unretained(impl), callback));
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 DCHECK(render_main_task_runner_->BelongsToCurrentThread()); 173 DCHECK(render_main_task_runner_->BelongsToCurrentThread());
175 for (const auto& device : devices_) { 174 for (const auto& device : devices_) {
176 VideoCaptureImpl* const impl = device.second.second; 175 VideoCaptureImpl* const impl = device.second.second;
177 ChildProcess::current()->io_task_runner()->PostTask( 176 ChildProcess::current()->io_task_runner()->PostTask(
178 FROM_HERE, base::Bind(&VideoCaptureImpl::SuspendCapture, 177 FROM_HERE, base::Bind(&VideoCaptureImpl::SuspendCapture,
179 base::Unretained(impl), suspend)); 178 base::Unretained(impl), suspend));
180 } 179 }
181 } 180 }
182 181
183 } // namespace content 182 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/user_media_client_impl.cc ('k') | content/renderer/media/video_track_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698