FileDocCategorySizeDatePackage
SampleAuxiliaryInformationSizesBoxTest.javaAPI Docmp4parser 1.0-RC-172618Wed Dec 19 20:10:22 GMT 2012com.coremedia.iso.boxes

SampleAuxiliaryInformationSizesBoxTest

public class SampleAuxiliaryInformationSizesBoxTest extends Object

Fields Summary
Constructors Summary
Methods Summary
public voidroundTripFlags0()

        SampleAuxiliaryInformationSizesBox saiz1 = new SampleAuxiliaryInformationSizesBox();
        List<Short> ss = new LinkedList<Short>();
        ss.add((short)1);
        ss.add((short)11);
        ss.add((short)10);
        ss.add((short)100);
        saiz1.setSampleInfoSizes(ss);
        ByteBuffer bb = ByteBuffer.allocate(l2i(saiz1.getSize()));
        saiz1.getBox(new ByteBufferByteChannel(bb));
        Assert.assertTrue(bb.remaining() == 0);
        bb.rewind();

        IsoFile isoFile = new IsoFile(new ByteBufferByteChannel(bb));
        SampleAuxiliaryInformationSizesBox saiz2 = (SampleAuxiliaryInformationSizesBox) isoFile.getBoxes().get(0);

        Assert.assertEquals(saiz1.getDefaultSampleInfoSize(), saiz2.getDefaultSampleInfoSize());
        Assert.assertEquals(saiz1.getSampleInfoSizes(), saiz2.getSampleInfoSizes());


    
public voidroundTripFlags1()

        SampleAuxiliaryInformationSizesBox saiz1 = new SampleAuxiliaryInformationSizesBox();
        saiz1.setFlags(1);
        saiz1.setAuxInfoType("piff");
        saiz1.setAuxInfoTypeParameter("trak");
        List<Short> ss = new LinkedList<Short>();
        ss.add((short)1);
        ss.add((short)11);
        ss.add((short)10);
        ss.add((short)100);
        saiz1.setSampleInfoSizes(ss);
        ByteBuffer bb = ByteBuffer.allocate(l2i(saiz1.getSize()));
        saiz1.getBox(new ByteBufferByteChannel(bb));
        Assert.assertTrue(bb.remaining() == 0);
        bb.rewind();

        IsoFile isoFile = new IsoFile(new ByteBufferByteChannel(bb));
        SampleAuxiliaryInformationSizesBox saiz2 = (SampleAuxiliaryInformationSizesBox) isoFile.getBoxes().get(0);

        Assert.assertEquals(saiz1.getDefaultSampleInfoSize(), saiz2.getDefaultSampleInfoSize());
        Assert.assertEquals(saiz1.getSampleInfoSizes(), saiz2.getSampleInfoSizes());
        Assert.assertEquals(saiz1.getAuxInfoType(), saiz2.getAuxInfoType());
        Assert.assertEquals(saiz1.getAuxInfoTypeParameter(), saiz2.getAuxInfoTypeParameter());
        Assert.assertEquals(saiz1.getSampleInfoSizes(), saiz2.getSampleInfoSizes());