summaryrefslogtreecommitdiff
path: root/chromium/media/mojo/mojom/encryption_pattern_mojom_traits.cc
blob: d463132c383cf1aac407f46363b59e384c089cd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/mojo/mojom/encryption_pattern_mojom_traits.h"

namespace mojo {

// static
bool StructTraits<media::mojom::EncryptionPatternDataView,
                  media::EncryptionPattern>::
    Read(media::mojom::EncryptionPatternDataView input,
         media::EncryptionPattern* output) {
  *output = media::EncryptionPattern(input.crypt_byte_block(),
                                     input.skip_byte_block());
  return true;
}

}  // namespace mojo