[M120 Migration][MM] Framerate calculation
[platform/framework/web/chromium-efl.git] / media / mojo / mojom / video_transformation_mojom_traits.h
1 // Copyright 2019 The Chromium Authors
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 MEDIA_MOJO_MOJOM_VIDEO_TRANSFORMATION_MOJOM_TRAITS_H_
6 #define MEDIA_MOJO_MOJOM_VIDEO_TRANSFORMATION_MOJOM_TRAITS_H_
7
8 #include "media/base/ipc/media_param_traits.h"
9 #include "media/base/video_transformation.h"
10 #include "media/mojo/mojom/media_types.mojom-shared.h"
11 #include "media/mojo/mojom/media_types_enum_mojom_traits.h"
12
13 namespace mojo {
14
15 template <>
16 struct StructTraits<media::mojom::VideoTransformationDataView,
17                     media::VideoTransformation> {
18   static media::VideoRotation rotation(
19       const media::VideoTransformation& input) {
20     return input.rotation;
21   }
22
23   static bool mirrored(const media::VideoTransformation& input) {
24     return input.mirrored;
25   }
26
27   static bool Read(media::mojom::VideoTransformationDataView input,
28                    media::VideoTransformation* output);
29 };
30
31 }  // namespace mojo
32
33 #endif  // MEDIA_MOJO_MOJOM_VIDEO_TRANSFORMATION_MOJOM_TRAITS_H_