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

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

Issue 2885653002: [Mojo Video Capture] Do not instantiate in-process VideoCaptureSystem when using service (Closed)
Patch Set: Use SEQUENCE_CHECKER macros and Rebase to May 19th Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/media/in_process_video_capture_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/media_stream_manager.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 71546d64146d1b6b718552e62955c6127000e3ca..53fc48b370d3f1d9adae5326b7913c1e2bd9e640 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -422,15 +422,17 @@ MediaStreamManager::MediaStreamManager(
CHECK(video_capture_thread_.Start());
device_task_runner = video_capture_thread_.task_runner();
#endif
- video_capture_provider = base::MakeUnique<InProcessVideoCaptureProvider>(
- base::MakeUnique<media::VideoCaptureSystemImpl>(
- media::VideoCaptureDeviceFactory::CreateFactory(
- BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))),
- std::move(device_task_runner));
if (base::FeatureList::IsEnabled(video_capture::kMojoVideoCapture)) {
video_capture_provider = base::MakeUnique<VideoCaptureProviderSwitcher>(
base::MakeUnique<ServiceVideoCaptureProvider>(),
- std::move(video_capture_provider));
+ InProcessVideoCaptureProvider::CreateInstanceForNonDeviceCapture(
+ std::move(device_task_runner)));
+ } else {
+ video_capture_provider = InProcessVideoCaptureProvider::CreateInstance(
+ base::MakeUnique<media::VideoCaptureSystemImpl>(
+ media::VideoCaptureDeviceFactory::CreateFactory(
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))),
+ std::move(device_task_runner));
}
}
InitializeMaybeAsync(std::move(video_capture_provider));
« no previous file with comments | « content/browser/renderer_host/media/in_process_video_capture_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698