1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
media / mojo / mojom / video_transformation_mojom_traits.h [blame]
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_MOJO_MOJOM_VIDEO_TRANSFORMATION_MOJOM_TRAITS_H_
#define MEDIA_MOJO_MOJOM_VIDEO_TRANSFORMATION_MOJOM_TRAITS_H_
#include "media/base/ipc/media_param_traits.h"
#include "media/base/video_transformation.h"
#include "media/mojo/mojom/media_types.mojom-shared.h"
#include "media/mojo/mojom/media_types_enum_mojom_traits.h"
namespace mojo {
template <>
struct StructTraits<media::mojom::VideoTransformationDataView,
media::VideoTransformation> {
static media::VideoRotation rotation(
const media::VideoTransformation& input) {
return input.rotation;
}
static bool mirrored(const media::VideoTransformation& input) {
return input.mirrored;
}
static bool Read(media::mojom::VideoTransformationDataView input,
media::VideoTransformation* output);
};
} // namespace mojo
#endif // MEDIA_MOJO_MOJOM_VIDEO_TRANSFORMATION_MOJOM_TRAITS_H_