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

Side by Side Diff: services/video_capture/public/interfaces/capture_settings_traits.cc

Issue 2502483003: [Mojo Video Capture] Cleanup naming of classes/files in services/video_capture (Closed)
Patch Set: Rebase Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/video_capture/public/interfaces/video_capture_settings_traits .h" 5 #include "services/video_capture/public/interfaces/capture_settings_traits.h"
6 6
7 #include "media/capture/mojo/video_capture_types_typemap_traits.h" 7 #include "media/capture/mojo/video_capture_types_typemap_traits.h"
8 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" 8 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 11
12 // static 12 // static
13 bool StructTraits<video_capture::mojom::VideoCaptureFormatDataView, 13 bool StructTraits<video_capture::mojom::I420CaptureFormatDataView,
14 video_capture::VideoCaptureFormat>:: 14 video_capture::I420CaptureFormat>::
15 Read(video_capture::mojom::VideoCaptureFormatDataView data, 15 Read(video_capture::mojom::I420CaptureFormatDataView data,
16 video_capture::VideoCaptureFormat* out) { 16 video_capture::I420CaptureFormat* out) {
17 if (!data.ReadFrameSize(&out->frame_size)) 17 if (!data.ReadFrameSize(&out->frame_size))
18 return false; 18 return false;
19 out->frame_rate = data.frame_rate(); 19 out->frame_rate = data.frame_rate();
20 return true; 20 return true;
21 } 21 }
22 22
23 // static 23 // static
24 bool StructTraits<video_capture::mojom::VideoCaptureSettingsDataView, 24 bool StructTraits<video_capture::mojom::CaptureSettingsDataView,
25 video_capture::VideoCaptureSettings>:: 25 video_capture::CaptureSettings>::
26 Read(video_capture::mojom::VideoCaptureSettingsDataView data, 26 Read(video_capture::mojom::CaptureSettingsDataView data,
27 video_capture::VideoCaptureSettings* out) { 27 video_capture::CaptureSettings* out) {
28 if (!data.ReadFormat(&out->format)) 28 if (!data.ReadFormat(&out->format))
29 return false; 29 return false;
30 if (!data.ReadResolutionChangePolicy(&out->resolution_change_policy)) 30 if (!data.ReadResolutionChangePolicy(&out->resolution_change_policy))
31 return false; 31 return false;
32 if (!data.ReadPowerLineFrequency(&out->power_line_frequency)) 32 if (!data.ReadPowerLineFrequency(&out->power_line_frequency))
33 return false; 33 return false;
34 return true; 34 return true;
35 } 35 }
36 36
37
38 } // namespace mojo 37 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698