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

Side by Side Diff: content/common/video_capture_struct_traits.h

Issue 2405423002: [Video Capture Service] Move Mojo structs and enums to media/capture/mojo (Closed)
Patch Set: mcasas' comments Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698