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 // 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 Loading... |
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(content::MediaStreamType type, |
| 226 bool is_secure) { |
| 227 DCHECK(io_task_runner_->BelongsToCurrentThread()); |
| 228 Send(new VideoCaptureHostMsg_SetCapturingLinkSecured(type, session_id_, |
| 229 is_secure)); |
| 230 } |
| 231 |
225 void VideoCaptureImpl::GetDeviceSupportedFormats( | 232 void VideoCaptureImpl::GetDeviceSupportedFormats( |
226 const VideoCaptureDeviceFormatsCB& callback) { | 233 const VideoCaptureDeviceFormatsCB& callback) { |
227 DCHECK(io_task_runner_->BelongsToCurrentThread()); | 234 DCHECK(io_task_runner_->BelongsToCurrentThread()); |
228 device_formats_cb_queue_.push_back(callback); | 235 device_formats_cb_queue_.push_back(callback); |
229 if (device_formats_cb_queue_.size() == 1) | 236 if (device_formats_cb_queue_.size() == 1) |
230 Send(new VideoCaptureHostMsg_GetDeviceSupportedFormats(device_id_, | 237 Send(new VideoCaptureHostMsg_GetDeviceSupportedFormats(device_id_, |
231 session_id_)); | 238 session_id_)); |
232 } | 239 } |
233 | 240 |
234 void VideoCaptureImpl::GetDeviceFormatsInUse( | 241 void VideoCaptureImpl::GetDeviceFormatsInUse( |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 double consumer_resource_utilization = -1.0; | 565 double consumer_resource_utilization = -1.0; |
559 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION, | 566 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION, |
560 &consumer_resource_utilization)) { | 567 &consumer_resource_utilization)) { |
561 consumer_resource_utilization = -1.0; | 568 consumer_resource_utilization = -1.0; |
562 } | 569 } |
563 | 570 |
564 callback_to_io_thread.Run(*release_sync_token, consumer_resource_utilization); | 571 callback_to_io_thread.Run(*release_sync_token, consumer_resource_utilization); |
565 } | 572 } |
566 | 573 |
567 } // namespace content | 574 } // namespace content |
OLD | NEW |