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

Unified Diff: media/capture/video/linux/video_capture_device_factory_linux.cc

Issue 2668633002: Sort camera device list to use front camera first (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | media/capture/video/video_capture_device_descriptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/linux/video_capture_device_factory_linux.cc
diff --git a/media/capture/video/linux/video_capture_device_factory_linux.cc b/media/capture/video/linux/video_capture_device_factory_linux.cc
index e1190478410a6c6321c0502a7dbd48e08b079774..8753a4acf7a522a386b8721e8ef0fe6ce6999cfc 100644
--- a/media/capture/video/linux/video_capture_device_factory_linux.cc
+++ b/media/capture/video/linux/video_capture_device_factory_linux.cc
@@ -228,6 +228,10 @@ void VideoCaptureDeviceFactoryLinux::GetDeviceDescriptors(
#endif
}
}
+ // Since JS doesn't have API to get camera facing, we sort the list to make
+ // sure apps use the front camera by default.
+ // TODO(henryhsu): remove this after JS API completed (crbug.com/543997).
+ std::sort(device_descriptors->begin(), device_descriptors->end());
}
void VideoCaptureDeviceFactoryLinux::GetSupportedFormats(
« no previous file with comments | « no previous file | media/capture/video/video_capture_device_descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698