1 package com.googlecode.mp4parser.boxes.piff; 2 3 import com.googlecode.mp4parser.boxes.AbstractSampleEncryptionBox; 4 5 /** 6 * <pre> 7 * aligned(8) class SampleEncryptionBox extends FullBox(‘uuid’, extended_type= 0xA2394F52-5A9B-4f14-A244-6C427C648DF4, version=0, flags=0) 8 * { 9 * if (flags & 0x000001) 10 * { 11 * unsigned int(24) AlgorithmID; 12 * unsigned int(8) IV_size; 13 * unsigned int(8)[16] KID; 14 * } 15 * unsigned int (32) sample_count; 16 * { 17 * unsigned int(IV_size) InitializationVector; 18 * if (flags & 0x000002) 19 * { 20 * unsigned int(16) NumberOfEntries; 21 * { 22 * unsigned int(16) BytesOfClearData; 23 * unsigned int(32) BytesOfEncryptedData; 24 * } [ NumberOfEntries] 25 * } 26 * }[ sample_count ] 27 * } 28 * </pre> 29 */ 30 public class PiffSampleEncryptionBox extends AbstractSampleEncryptionBox { 31 32 /** 33 * Creates a AbstractSampleEncryptionBox for non-h264 tracks. 34 */ PiffSampleEncryptionBox()35 public PiffSampleEncryptionBox() { 36 super("uuid"); 37 38 } 39 40 @Override getUserType()41 public byte[] getUserType() { 42 return new byte[]{(byte) 0xA2, 0x39, 0x4F, 0x52, 0x5A, (byte) 0x9B, 0x4f, 0x14, (byte) 0xA2, 0x44, 0x6C, 0x42, 0x7C, 0x64, (byte) 0x8D, (byte) 0xF4}; 43 } 44 45 } 46