summaryrefslogtreecommitdiff
path: root/chromium/media/base/encryption_pattern.cc
blob: ea07abb380d4acef17efb5c81da11d33a5d5b980 (plain)
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
// Copyright 2018 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/base/encryption_pattern.h"

namespace media {

EncryptionPattern::EncryptionPattern() = default;

EncryptionPattern::EncryptionPattern(uint32_t crypt_byte_block,
                                     uint32_t skip_byte_block)
    : crypt_byte_block_(crypt_byte_block), skip_byte_block_(skip_byte_block) {}

EncryptionPattern::EncryptionPattern(const EncryptionPattern& rhs) = default;

EncryptionPattern& EncryptionPattern::operator=(const EncryptionPattern& rhs) =
    default;

EncryptionPattern::~EncryptionPattern() = default;

bool EncryptionPattern::operator==(const EncryptionPattern& other) const {
  return crypt_byte_block_ == other.crypt_byte_block_ &&
         skip_byte_block_ == other.skip_byte_block_;
}

bool EncryptionPattern::operator!=(const EncryptionPattern& other) const {
  return !operator==(other);
}

}  // namespace media