FileDocCategorySizeDatePackage
Mp4DrmsBox.javaAPI DocJaudiotagger 2.0.41481Wed Mar 30 16:11:44 BST 2011org.jaudiotagger.audio.mp4.atom

Mp4DrmsBox

public class Mp4DrmsBox extends AbstractMp4Box
DrmsBox Replaces mp4a box on drm files

Need to skip over data in order to find esds atom

Specification not known, so just look for byte by byte 'esds' and then step back four bytes for size

Fields Summary
Constructors Summary
public Mp4DrmsBox(Mp4BoxHeader header, ByteBuffer dataBuffer)

param
header header info
param
dataBuffer data of box (doesnt include header data)

        this.header = header;
        this.dataBuffer = dataBuffer;
    
Methods Summary
public voidprocessData()
Process direct data

throws
CannotReadException

        while (dataBuffer.hasRemaining())
        {
            byte next = dataBuffer.get();
            if (next != (byte) 'e")
            {
                continue;
            }

            //Have we found esds identifier, if so adjust buffer to start of esds atom
            ByteBuffer tempBuffer = dataBuffer.slice();
            if ((tempBuffer.get() == (byte) 's") & (tempBuffer.get() == (byte) 'd") & (tempBuffer.get() == (byte) 's"))
            {
                dataBuffer.position(dataBuffer.position() - 1 - Mp4BoxHeader.OFFSET_LENGTH);
                return;
            }
        }