1
package org.jaudiotagger.audio.mp4.atom;
3
import org.jaudiotagger.audio.exceptions.CannotReadException;
4
import org.jaudiotagger.audio.generic.Utils;
6
import java.nio.ByteBuffer;
9
* DrmsBox Replaces mp4a box on drm files
11
* Need to skip over data in order to find esds atom
13
* Specification not known, so just look for byte by byte 'esds' and then step back four bytes for size
15
public class Mp4DrmsBox extends AbstractMp4Box
19
* @param header header info
20
* @param dataBuffer data of box (doesnt include header data)
22
public Mp4DrmsBox(Mp4BoxHeader header, ByteBuffer dataBuffer)
25
this.dataBuffer = dataBuffer;
31
* @throws CannotReadException
33
public void processData() throws CannotReadException
35
while(dataBuffer.hasRemaining())
37
byte next = dataBuffer.get();
43
//Have we found esds identifier, if so adjust buffer to start of edds atom
44
ByteBuffer tempBuffer = dataBuffer.slice();
46
(tempBuffer.get()==(byte)'s')&
47
(tempBuffer.get()==(byte)'d')&
48
(tempBuffer.get()==(byte)'s')
51
dataBuffer.position(dataBuffer.position() - 1 - Mp4BoxHeader.OFFSET_LENGTH);