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

Side by Side Diff: media/base/decrypt_config.h

Issue 1422643002: Pass DecryptConfig parameters over IPC and use it in AVDA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed MediaCodec.CodecException that was added only at level 21 (Android L) Created 5 years, 1 month 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/decoder_buffer.cc ('k') | media/base/decrypt_config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_DECRYPT_CONFIG_H_ 5 #ifndef MEDIA_BASE_DECRYPT_CONFIG_H_
6 #define MEDIA_BASE_DECRYPT_CONFIG_H_ 6 #define MEDIA_BASE_DECRYPT_CONFIG_H_
7 7
8 #include <iosfwd>
8 #include <string> 9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/basictypes.h" 12 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
14 15
15 namespace media { 16 namespace media {
16 17
17 // The Common Encryption spec provides for subsample encryption, where portions 18 // The Common Encryption spec provides for subsample encryption, where portions
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const std::vector<SubsampleEntry>& subsamples); 50 const std::vector<SubsampleEntry>& subsamples);
50 ~DecryptConfig(); 51 ~DecryptConfig();
51 52
52 const std::string& key_id() const { return key_id_; } 53 const std::string& key_id() const { return key_id_; }
53 const std::string& iv() const { return iv_; } 54 const std::string& iv() const { return iv_; }
54 const std::vector<SubsampleEntry>& subsamples() const { return subsamples_; } 55 const std::vector<SubsampleEntry>& subsamples() const { return subsamples_; }
55 56
56 // Returns true if all fields in |config| match this config. 57 // Returns true if all fields in |config| match this config.
57 bool Matches(const DecryptConfig& config) const; 58 bool Matches(const DecryptConfig& config) const;
58 59
60 // Prints to std::ostream.
61 std::ostream& Print(std::ostream& os) const;
62
59 private: 63 private:
60 const std::string key_id_; 64 const std::string key_id_;
61 65
62 // Initialization vector. 66 // Initialization vector.
63 const std::string iv_; 67 const std::string iv_;
64 68
65 // Subsample information. May be empty for some formats, meaning entire frame 69 // Subsample information. May be empty for some formats, meaning entire frame
66 // (less data ignored by data_offset_) is encrypted. 70 // (less data ignored by data_offset_) is encrypted.
67 const std::vector<SubsampleEntry> subsamples_; 71 const std::vector<SubsampleEntry> subsamples_;
68 72
69 DISALLOW_COPY_AND_ASSIGN(DecryptConfig); 73 DISALLOW_COPY_AND_ASSIGN(DecryptConfig);
70 }; 74 };
71 75
72 } // namespace media 76 } // namespace media
73 77
78 inline std::ostream& operator<<(std::ostream& os,
79 const media::DecryptConfig& obj) {
80 return obj.Print(os);
81 }
82
74 #endif // MEDIA_BASE_DECRYPT_CONFIG_H_ 83 #endif // MEDIA_BASE_DECRYPT_CONFIG_H_
OLDNEW
« no previous file with comments | « media/base/decoder_buffer.cc ('k') | media/base/decrypt_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698