| 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 #ifndef CONTENT_COMMON_VIDEO_CAPTURE_STRUCT_TRAITS_H_ | |
| 6 #define CONTENT_COMMON_VIDEO_CAPTURE_STRUCT_TRAITS_H_ | |
| 7 | |
| 8 #include "content/common/video_capture.mojom.h" | |
| 9 #include "media/base/video_capture_types.h" | |
| 10 #include "mojo/common/common_custom_types_struct_traits.h" | |
| 11 #include "services/video_capture/public/interfaces/video_capture_format.mojom.h" | |
| 12 | |
| 13 namespace mojo { | |
| 14 | |
| 15 template <> | |
| 16 struct StructTraits<content::mojom::VideoCaptureParamsDataView, | |
| 17 media::VideoCaptureParams> { | |
| 18 static media::VideoCaptureFormat requested_format( | |
| 19 const media::VideoCaptureParams& params) { | |
| 20 return params.requested_format; | |
| 21 } | |
| 22 | |
| 23 static media::ResolutionChangePolicy resolution_change_policy( | |
| 24 const media::VideoCaptureParams& params) { | |
| 25 return params.resolution_change_policy; | |
| 26 } | |
| 27 | |
| 28 static media::PowerLineFrequency power_line_frequency( | |
| 29 const media::VideoCaptureParams& params) { | |
| 30 return params.power_line_frequency; | |
| 31 } | |
| 32 | |
| 33 static bool Read(content::mojom::VideoCaptureParamsDataView data, | |
| 34 media::VideoCaptureParams* out); | |
| 35 }; | |
| 36 } | |
| 37 | |
| 38 #endif // CONTENT_COMMON_VIDEO_CAPTURE_STRUCT_TRAITS_H_ | |
| OLD | NEW |