OLD | NEW |
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_ |
OLD | NEW |