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.
5 #ifndef MEDIA_MOJO_MOJOM_VIDEO_TRANSFORMATION_MOJOM_TRAITS_H_
6 #define MEDIA_MOJO_MOJOM_VIDEO_TRANSFORMATION_MOJOM_TRAITS_H_
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"
16 struct StructTraits<media::mojom::VideoTransformationDataView,
17 media::VideoTransformation> {
18 static media::VideoRotation rotation(
19 const media::VideoTransformation& input) {
20 return input.rotation;
23 static bool mirrored(const media::VideoTransformation& input) {
24 return input.mirrored;
27 static bool Read(media::mojom::VideoTransformationDataView input,
28 media::VideoTransformation* output);
33 #endif // MEDIA_MOJO_MOJOM_VIDEO_TRANSFORMATION_MOJOM_TRAITS_H_