diff options
author | Andreas Huber <andih@google.com> | 2012-04-12 14:07:06 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-04-12 14:07:06 -0700 |
commit | 1803c3ae573e5fa3f3a1abe24ae802e30e5d5495 (patch) | |
tree | 456c8dab540997e82f751cccff998a13a7e1264a | |
parent | d3030da2ac3c0ebb8b7bdf38418263caf405b863 (diff) | |
parent | 5892e3e173f20e01956f318ae7dce43d46c5fc1d (diff) | |
download | frameworks_av-1803c3ae573e5fa3f3a1abe24ae802e30e5d5495.zip frameworks_av-1803c3ae573e5fa3f3a1abe24ae802e30e5d5495.tar.gz frameworks_av-1803c3ae573e5fa3f3a1abe24ae802e30e5d5495.tar.bz2 |
Merge "Add metadata keys to communicate encrypted fragments and associated info."
-rw-r--r-- | include/media/stagefright/MetaData.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h index 639446e..d0db98e 100644 --- a/include/media/stagefright/MetaData.h +++ b/include/media/stagefright/MetaData.h @@ -134,6 +134,28 @@ enum { kKeyECM = 'ecm ', // raw data kKeyIsADTS = 'adts', // bool (int32_t) + + // If a MediaBuffer's data represents (at least partially) encrypted + // data, the following fields aid in decryption. + // The data can be thought of as pairs of plain and encrypted data + // fragments, i.e. plain and encrypted data alternate. + // The first fragment is by convention plain data (if that's not the + // case, simply specify plain fragment size of 0). + // kKeyEncryptedSizes and kKeyPlainSizes each map to an array of + // size_t values. The sum total of all size_t values of both arrays + // must equal the amount of data (i.e. MediaBuffer's range_length()). + // If both arrays are present, they must be of the same size. + // If only encrypted sizes are present it is assumed that all + // plain sizes are 0, i.e. all fragments are encrypted. + // To programmatically set these array, use the MetaData::setData API, i.e. + // const size_t encSizes[]; + // meta->setData( + // kKeyEncryptedSizes, 0 /* type */, encSizes, sizeof(encSizes)); + // A plain sizes array by itself makes no sense. + kKeyEncryptedSizes = 'encr', // size_t[] + kKeyPlainSizes = 'plai', // size_t[] + kKeyCryptoKey = 'cryK', // uint8_t[16] + kKeyCryptoIV = 'cryI', // uint8_t[16] }; enum { |