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.
5 #ifndef MEDIA_MOJO_MOJOM_ENCRYPTION_PATTERN_MOJOM_TRAITS_H_
6 #define MEDIA_MOJO_MOJOM_ENCRYPTION_PATTERN_MOJOM_TRAITS_H_
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"
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();
21 static uint32_t skip_byte_block(const media::EncryptionPattern& input) {
22 return input.skip_byte_block();
25 static bool Read(media::mojom::EncryptionPatternDataView input,
26 media::EncryptionPattern* output);
31 #endif // MEDIA_MOJO_MOJOM_ENCRYPTION_PATTERN_MOJOM_TRAITS_H_