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

Side by Side Diff: media/mp4/cenc.h

Issue 10651006: Add Common Encryption support to BMFF, including subsample decryption. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Satisfy mac_rel buildbot 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
« no previous file with comments | « media/mp4/box_definitions.cc ('k') | media/mp4/cenc.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_MP4_CENC_H_ 5 #ifndef MEDIA_MP4_CENC_H_
6 #define MEDIA_MP4_CENC_H_ 6 #define MEDIA_MP4_CENC_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "media/base/decrypt_config.h"
11 12
12 namespace media { 13 namespace media {
13 namespace mp4 { 14 namespace mp4 {
14 15
15 class BufferReader; 16 class BufferReader;
16 17
17 struct SubsampleSizes {
18 uint16 clear_size;
19 uint32 encrypted_size;
20 };
21
22 struct FrameCENCInfo { 18 struct FrameCENCInfo {
23 std::vector<uint8> iv; 19 uint8 iv[16];
24 std::vector<SubsampleSizes> subsamples; 20 std::vector<SubsampleEntry> subsamples;
25 21
26 FrameCENCInfo(); 22 FrameCENCInfo();
27 ~FrameCENCInfo(); 23 ~FrameCENCInfo();
28 bool Parse(int iv_size, BufferReader* r); 24 bool Parse(int iv_size, BufferReader* r);
29 size_t GetTotalSize() const; 25 size_t GetTotalSizeOfSubsamples() const;
30 }; 26 };
31 27
32 28
33 } // namespace mp4 29 } // namespace mp4
34 } // namespace media 30 } // namespace media
35 31
36 #endif // MEDIA_MP4_CENC_H_ 32 #endif // MEDIA_MP4_CENC_H_
OLDNEW
« no previous file with comments | « media/mp4/box_definitions.cc ('k') | media/mp4/cenc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698