[M120 Migration][MM] Framerate calculation
[platform/framework/web/chromium-efl.git] / media / mojo / mojom / encryption_pattern_mojom_traits.h
1 // Copyright 2017 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_ENCRYPTION_PATTERN_MOJOM_TRAITS_H_
6 #define MEDIA_MOJO_MOJOM_ENCRYPTION_PATTERN_MOJOM_TRAITS_H_
7
8 #include "media/base/encryption_pattern.h"
9 #include "media/base/ipc/media_param_traits.h"
10 #include "media/mojo/mojom/encryption_pattern.mojom.h"
11
12 namespace mojo {
13
14 template <>
15 struct StructTraits<media::mojom::EncryptionPatternDataView,
16                     media::EncryptionPattern> {
17   static uint32_t crypt_byte_block(const media::EncryptionPattern& input) {
18     return input.crypt_byte_block();
19   }
20
21   static uint32_t skip_byte_block(const media::EncryptionPattern& input) {
22     return input.skip_byte_block();
23   }
24
25   static bool Read(media::mojom::EncryptionPatternDataView input,
26                    media::EncryptionPattern* output);
27 };
28
29 }  // namespace mojo
30
31 #endif  // MEDIA_MOJO_MOJOM_ENCRYPTION_PATTERN_MOJOM_TRAITS_H_