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