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

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

Issue 1873293002: Report if video capturing meets output protection requirement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 // Notes about usage of this object by VideoCaptureImplManager. 5 // Notes about usage of this object by VideoCaptureImplManager.
6 // 6 //
7 // VideoCaptureImplManager access this object by using a Unretained() 7 // VideoCaptureImplManager access this object by using a Unretained()
8 // binding and tasks on the IO thread. It is then important that 8 // binding and tasks on the IO thread. It is then important that
9 // VideoCaptureImpl never post task to itself. All operations must be 9 // VideoCaptureImpl never post task to itself. All operations must be
10 // synchronous. 10 // synchronous.
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 client_buffer2s_.clear(); 215 client_buffer2s_.clear();
216 weak_factory_.InvalidateWeakPtrs(); 216 weak_factory_.InvalidateWeakPtrs();
217 } 217 }
218 } 218 }
219 219
220 void VideoCaptureImpl::RequestRefreshFrame() { 220 void VideoCaptureImpl::RequestRefreshFrame() {
221 DCHECK(io_task_runner_->BelongsToCurrentThread()); 221 DCHECK(io_task_runner_->BelongsToCurrentThread());
222 Send(new VideoCaptureHostMsg_RequestRefreshFrame(device_id_)); 222 Send(new VideoCaptureHostMsg_RequestRefreshFrame(device_id_));
223 } 223 }
224 224
225 void VideoCaptureImpl::SetCapturingLinkSecured(bool is_secure) {
226 DCHECK(io_task_runner_->BelongsToCurrentThread());
227 Send(new VideoCaptureHostMsg_SetCapturingLinkSecured(device_id_, is_secure));
228 }
229
225 void VideoCaptureImpl::GetDeviceSupportedFormats( 230 void VideoCaptureImpl::GetDeviceSupportedFormats(
226 const VideoCaptureDeviceFormatsCB& callback) { 231 const VideoCaptureDeviceFormatsCB& callback) {
227 DCHECK(io_task_runner_->BelongsToCurrentThread()); 232 DCHECK(io_task_runner_->BelongsToCurrentThread());
228 device_formats_cb_queue_.push_back(callback); 233 device_formats_cb_queue_.push_back(callback);
229 if (device_formats_cb_queue_.size() == 1) 234 if (device_formats_cb_queue_.size() == 1)
230 Send(new VideoCaptureHostMsg_GetDeviceSupportedFormats(device_id_, 235 Send(new VideoCaptureHostMsg_GetDeviceSupportedFormats(device_id_,
231 session_id_)); 236 session_id_));
232 } 237 }
233 238
234 void VideoCaptureImpl::GetDeviceFormatsInUse( 239 void VideoCaptureImpl::GetDeviceFormatsInUse(
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 double consumer_resource_utilization = -1.0; 563 double consumer_resource_utilization = -1.0;
559 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION, 564 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION,
560 &consumer_resource_utilization)) { 565 &consumer_resource_utilization)) {
561 consumer_resource_utilization = -1.0; 566 consumer_resource_utilization = -1.0;
562 } 567 }
563 568
564 callback_to_io_thread.Run(*release_sync_token, consumer_resource_utilization); 569 callback_to_io_thread.Run(*release_sync_token, consumer_resource_utilization);
565 } 570 }
566 571
567 } // namespace content 572 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698