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

Side by Side Diff: media/webm/webm_content_encodings.h

Issue 10807003: Revert 147169 - Add support for encrypted WebM files as defined in the RFC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « media/webm/webm_constants.h ('k') | media/webm/webm_content_encodings.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_WEBM_WEBM_CONTENT_ENCODINGS_H_ 5 #ifndef MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_
6 #define MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ 6 #define MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
(...skipping 24 matching lines...) Expand all
35 enum EncryptionAlgo { 35 enum EncryptionAlgo {
36 kEncAlgoInvalid = -1, 36 kEncAlgoInvalid = -1,
37 kEncAlgoNotEncrypted = 0, 37 kEncAlgoNotEncrypted = 0,
38 kEncAlgoDes = 1, 38 kEncAlgoDes = 1,
39 kEncAlgo3des = 2, 39 kEncAlgo3des = 2,
40 kEncAlgoTwofish = 3, 40 kEncAlgoTwofish = 3,
41 kEncAlgoBlowfish = 4, 41 kEncAlgoBlowfish = 4,
42 kEncAlgoAes = 5, 42 kEncAlgoAes = 5,
43 }; 43 };
44 44
45 enum CipherMode {
46 kCipherModeInvalid = 0,
47 kCipherModeCtr = 1,
48 };
49
50 ContentEncoding(); 45 ContentEncoding();
51 ~ContentEncoding(); 46 ~ContentEncoding();
52 47
53 int64 order() const { return order_; } 48 int64 order() const { return order_; }
54 void set_order(int64 order) { order_ = order; } 49 void set_order(int64 order) { order_ = order; }
55 50
56 Scope scope() const { return scope_; } 51 Scope scope() const { return scope_; }
57 void set_scope(Scope scope) { scope_ = scope; } 52 void set_scope(Scope scope) { scope_ = scope; }
58 53
59 Type type() const { return type_; } 54 Type type() const { return type_; }
60 void set_type(Type type) { type_ = type; } 55 void set_type(Type type) { type_ = type; }
61 56
62 EncryptionAlgo encryption_algo() const { return encryption_algo_; } 57 EncryptionAlgo encryption_algo() const { return encryption_algo_; }
63 void set_encryption_algo(EncryptionAlgo encryption_algo) { 58 void set_encryption_algo(EncryptionAlgo encryption_algo) {
64 encryption_algo_ = encryption_algo; 59 encryption_algo_ = encryption_algo;
65 } 60 }
66 61
67 const uint8* encryption_key_id() const { return encryption_key_id_.get(); } 62 const uint8* encryption_key_id() const { return encryption_key_id_.get(); }
68 int encryption_key_id_size() const { return encryption_key_id_size_; } 63 int encryption_key_id_size() const { return encryption_key_id_size_; }
69 64
70 void SetEncryptionKeyId(const uint8* encryption_key_id, int size); 65 void SetEncryptionKeyId(const uint8* encryption_key_id, int size);
71 66
72 CipherMode cipher_mode() const { return cipher_mode_; }
73 void set_cipher_mode(CipherMode mode) { cipher_mode_ = mode; }
74
75 private: 67 private:
76 int64 order_; 68 int64 order_;
77 Scope scope_; 69 Scope scope_;
78 Type type_; 70 Type type_;
79 EncryptionAlgo encryption_algo_; 71 EncryptionAlgo encryption_algo_;
80 scoped_array<uint8> encryption_key_id_; 72 scoped_array<uint8> encryption_key_id_;
81 int encryption_key_id_size_; 73 int encryption_key_id_size_;
82 CipherMode cipher_mode_;
83 74
84 DISALLOW_COPY_AND_ASSIGN(ContentEncoding); 75 DISALLOW_COPY_AND_ASSIGN(ContentEncoding);
85 }; 76 };
86 77
87 } // namespace media 78 } // namespace media
88 79
89 #endif // MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ 80 #endif // MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_
OLDNEW
« no previous file with comments | « media/webm/webm_constants.h ('k') | media/webm/webm_content_encodings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698