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

Unified Diff: content/browser/renderer_host/media/video_capture_manager.cc

Issue 68503005: Reorganize media::VideoCapture* types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: a7375761 Rebase. Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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());

Powered by Google App Engine
This is Rietveld 408576698