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

Unified Diff: media/capture/video/video_capture_device_descriptor.h

Issue 2648973003: Sort camera device list to use front camera first (Closed)
Patch Set: add bug number 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 | « media/capture/video/linux/video_capture_device_factory_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/video_capture_device_descriptor.h
diff --git a/media/capture/video/video_capture_device_descriptor.h b/media/capture/video/video_capture_device_descriptor.h
index 84ff841dbf4347b67cc29e1534f66bd6cf7c1c53..a850cb8fb0f1306245c806c8bc62e043868d5afa 100644
--- a/media/capture/video/video_capture_device_descriptor.h
+++ b/media/capture/video/video_capture_device_descriptor.h
@@ -67,6 +67,9 @@ struct CAPTURE_EXPORT VideoCaptureDeviceDescriptor {
return (other.device_id == device_id) && (other.capture_api == capture_api);
}
bool operator<(const VideoCaptureDeviceDescriptor& other) const {
+ // Front camera first
wuchengli 2017/01/24 04:25:09 We should prefer on-device cameras over external c
henryhsu 2017/01/24 04:55:45 Done.
+ if (facing < other.facing)
+ return true;
if (device_id < other.device_id)
return true;
return capture_api < other.capture_api;
« no previous file with comments | « media/capture/video/linux/video_capture_device_factory_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698