FileDocCategorySizeDatePackage
TimeCodeBoxTest.javaAPI Docmp4parser 1.0-RC-171392Wed Dec 19 20:10:21 GMT 2012com.googlecode.mp4parser.boxes.apple

TimeCodeBoxTest

public class TimeCodeBoxTest extends Object
Created with IntelliJ IDEA. User: sannies Date: 3/28/12 Time: 10:29 AM To change this template use File | Settings | File Templates.

Fields Summary
byte[]
box
Constructors Summary
public TimeCodeBoxTest()

        box = Hex.decodeHex((
                "00000031746d63640000000000000001" +
                "000000000000000000000bb50000007d" +
                "188c0000000f6e616d65000300003030" +
                "31").toCharArray());
    
Methods Summary
public voidtestParse()

        IsoFile isoFile = new IsoFile(new ByteBufferByteChannel(ByteBuffer.wrap(box)));
        TimeCodeBox tmcd = (TimeCodeBox) isoFile.getBoxes().get(0);
        ByteBuffer byteBuffer = ByteBuffer.allocate(l2i(tmcd.getSize()));
        tmcd.getDataReferenceIndex();
        Assert.assertTrue(tmcd.isParsed());
        tmcd.getBox(new ByteBufferByteChannel(byteBuffer));
        Assert.assertArrayEquals(box, byteBuffer.array());