Index: content/browser/renderer_host/media/video_capture_manager.cc |
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc |
index a1fcad7b6a6071a1b8b23349ffee9ce728dcde02..87507ec1595b23ac156124fbc943013a733e7bab 100644 |
--- a/content/browser/renderer_host/media/video_capture_manager.cc |
+++ b/content/browser/renderer_host/media/video_capture_manager.cc |
@@ -133,7 +133,7 @@ void VideoCaptureManager::UseFakeDevice() { |
void VideoCaptureManager::DoStartDeviceOnDeviceThread( |
DeviceEntry* entry, |
- const media::VideoCaptureCapability& capture_params, |
+ const media::VideoCaptureParams& params, |
scoped_ptr<media::VideoCaptureDevice::Client> device_client) { |
SCOPED_UMA_HISTOGRAM_TIMER("Media.VideoCaptureManager.StartDeviceTime"); |
DCHECK(IsOnDeviceThread()); |
@@ -178,7 +178,7 @@ void VideoCaptureManager::DoStartDeviceOnDeviceThread( |
return; |
} |
- video_capture_device->AllocateAndStart(capture_params, device_client.Pass()); |
+ video_capture_device->AllocateAndStart(params, device_client.Pass()); |
entry->video_capture_device = video_capture_device.Pass(); |
} |
@@ -189,12 +189,10 @@ void VideoCaptureManager::StartCaptureForClient( |
VideoCaptureControllerEventHandler* client_handler, |
const DoneCB& done_cb) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
- DVLOG(1) << "VideoCaptureManager::StartCaptureForClient, (" |
- << params.requested_format.width |
- << ", " << params.requested_format.height |
- << ", " << params.requested_format.frame_rate |
- << ", #" << params.session_id |
- << ")"; |
+ DVLOG(1) << "VideoCaptureManager::StartCaptureForClient, " |
+ << params.requested_format.frame_size.ToString() << ", " |
+ << params.requested_format.frame_rate << ", #" << params.session_id |
+ << ")"; |
DeviceEntry* entry = GetOrCreateDeviceEntry(params.session_id); |
if (!entry) { |
@@ -209,17 +207,14 @@ void VideoCaptureManager::StartCaptureForClient( |
DVLOG(1) << "VideoCaptureManager starting device (type = " |
<< entry->stream_type << ", id = " << entry->id << ")"; |
- media::VideoCaptureCapability params_as_capability; |
- params_as_capability.width = params.requested_format.width; |
- params_as_capability.height = params.requested_format.height; |
- params_as_capability.frame_rate = params.requested_format.frame_rate; |
- params_as_capability.frame_size_type = |
- params.requested_format.frame_size_type; |
- |
- device_loop_->PostTask(FROM_HERE, base::Bind( |
- &VideoCaptureManager::DoStartDeviceOnDeviceThread, this, |
- entry, params_as_capability, |
- base::Passed(entry->video_capture_controller->NewDeviceClient()))); |
+ device_loop_->PostTask( |
+ FROM_HERE, |
+ base::Bind( |
+ &VideoCaptureManager::DoStartDeviceOnDeviceThread, |
+ this, |
+ entry, |
+ params, |
+ base::Passed(entry->video_capture_controller->NewDeviceClient()))); |
} |
// Run the callback first, as AddClient() may trigger OnFrameInfo(). |
done_cb.Run(entry->video_capture_controller->GetWeakPtr()); |