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

Unified Diff: services/video_capture/device_factory_media_to_mojo_adapter.cc

Issue 2867213004: [Mojo Video Capture] Hook up video capture service behind a feature flag (Closed)
Patch Set: 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 | « media/capture/video/video_capture_system.h ('k') | services/video_capture/public/cpp/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/video_capture/device_factory_media_to_mojo_adapter.cc
diff --git a/services/video_capture/device_factory_media_to_mojo_adapter.cc b/services/video_capture/device_factory_media_to_mojo_adapter.cc
index b72412709e164d1ae3d3b557c7d239663534a485..60b2b370aae1dc62159e590c2724963b8ff007c8 100644
--- a/services/video_capture/device_factory_media_to_mojo_adapter.cc
+++ b/services/video_capture/device_factory_media_to_mojo_adapter.cc
@@ -35,17 +35,10 @@ static void TranslateDeviceInfos(
translated_device_info.descriptor = device_info.descriptor;
for (const auto& format : device_info.supported_formats) {
media::VideoCaptureFormat translated_format;
- switch (format.pixel_format) {
- case media::PIXEL_FORMAT_I420:
- case media::PIXEL_FORMAT_MJPEG:
- translated_format.pixel_format = media::PIXEL_FORMAT_I420;
- break;
- case media::PIXEL_FORMAT_Y16:
- translated_format.pixel_format = media::PIXEL_FORMAT_Y16;
- default:
- // Any other format cannot be consumed by VideoCaptureDeviceClient.
- continue;
- }
+ translated_format.pixel_format =
+ (format.pixel_format == media::PIXEL_FORMAT_Y16)
+ ? media::PIXEL_FORMAT_Y16
+ : media::PIXEL_FORMAT_I420;
translated_format.frame_size = format.frame_size;
translated_format.frame_rate = format.frame_rate;
translated_format.pixel_storage = media::PIXEL_STORAGE_CPU;
« no previous file with comments | « media/capture/video/video_capture_system.h ('k') | services/video_capture/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698