| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "services/video_capture/public/interfaces/capture_settings_traits.h" | |
| 6 | |
| 7 #include "media/capture/mojo/video_capture_types_typemap_traits.h" | |
| 8 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" | |
| 9 | |
| 10 namespace mojo { | |
| 11 | |
| 12 // static | |
| 13 bool StructTraits<video_capture::mojom::I420CaptureFormatDataView, | |
| 14 video_capture::I420CaptureFormat>:: | |
| 15 Read(video_capture::mojom::I420CaptureFormatDataView data, | |
| 16 video_capture::I420CaptureFormat* out) { | |
| 17 if (!data.ReadFrameSize(&out->frame_size)) | |
| 18 return false; | |
| 19 out->frame_rate = data.frame_rate(); | |
| 20 return true; | |
| 21 } | |
| 22 | |
| 23 // static | |
| 24 bool StructTraits<video_capture::mojom::CaptureSettingsDataView, | |
| 25 video_capture::CaptureSettings>:: | |
| 26 Read(video_capture::mojom::CaptureSettingsDataView data, | |
| 27 video_capture::CaptureSettings* out) { | |
| 28 if (!data.ReadFormat(&out->format)) | |
| 29 return false; | |
| 30 if (!data.ReadResolutionChangePolicy(&out->resolution_change_policy)) | |
| 31 return false; | |
| 32 if (!data.ReadPowerLineFrequency(&out->power_line_frequency)) | |
| 33 return false; | |
| 34 return true; | |
| 35 } | |
| 36 | |
| 37 } // namespace mojo | |
| OLD | NEW |