Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: media/base/encryption_scheme.cc

Issue 1786733004: Revert of media config: expand is_encrypted to a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/encryption_scheme.h ('k') | media/base/fake_demuxer_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/base/encryption_scheme.h"
6
7 namespace media {
8
9 EncryptionScheme::Pattern::Pattern() {}
10
11 EncryptionScheme::Pattern::Pattern(uint32_t encrypt_blocks,
12 uint32_t skip_blocks)
13 : encrypt_blocks_(encrypt_blocks), skip_blocks_(skip_blocks) {}
14
15 EncryptionScheme::Pattern::~Pattern() {}
16
17 bool EncryptionScheme::Pattern::Matches(const Pattern& other) const {
18 return encrypt_blocks_ == other.encrypt_blocks() &&
19 skip_blocks_ == other.skip_blocks();
20 }
21
22 bool EncryptionScheme::Pattern::IsInEffect() const {
23 return encrypt_blocks_ != 0 && skip_blocks_ != 0;
24 }
25
26 EncryptionScheme::EncryptionScheme() {}
27
28 EncryptionScheme::EncryptionScheme(CipherMode mode, const Pattern& pattern)
29 : mode_(mode), pattern_(pattern) {}
30
31 EncryptionScheme::~EncryptionScheme() {}
32
33 bool EncryptionScheme::Matches(const EncryptionScheme& other) const {
34 return mode_ == other.mode_ && pattern_.Matches(other.pattern_);
35 }
36
37 } // namespace media
OLDNEW
« no previous file with comments | « media/base/encryption_scheme.h ('k') | media/base/fake_demuxer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698