protected void addDref(NodeBox minf) { DataInfoBox dinf = DataInfoBox.createDataInfoBox(); minf.add(dinf); DataRefBox dref = DataRefBox.createDataRefBox(); dinf.add(dref); dref.add(LeafBox.createLeafBox(Header.createHeader("alis", 0), ByteBuffer.wrap(new byte[] { 0, 0, 0, 1 }))); }
public void setDataRef(String url) { MediaInfoBox minf = getMdia().getMinf(); DataInfoBox dinf = minf.getDinf(); if (dinf == null) { dinf = DataInfoBox.createDataInfoBox(); minf.add(dinf); } DataRefBox dref = dinf.getDref(); UrlBox urlBox = UrlBox.createUrlBox(url); if (dref == null) { dref = DataRefBox.createDataRefBox(); dinf.add(dref); dref.add(urlBox); } else { ListIterator<Box> lit = dref.boxes.listIterator(); while (lit.hasNext()) { FullBox box = (FullBox) lit.next(); if ((box.getFlags() & 0x1) != 0) lit.set(urlBox); } } }
protected void addDref(NodeBox minf) { DataInfoBox dinf = new DataInfoBox(); minf.add(dinf); DataRefBox dref = new DataRefBox(); dinf.add(dref); dref.add(new LeafBox(new Header("alis", 0), ByteBuffer.wrap(new byte[] { 0, 0, 0, 1 }))); } }
protected void addDref(NodeBox minf) { DataInfoBox dinf = new DataInfoBox(); minf.add(dinf); DataRefBox dref = new DataRefBox(); dinf.add(dref); dref.add(new LeafBox(new Header("alis", 0), ByteBuffer.wrap(new byte[] { 0, 0, 0, 1 }))); } }
public void setDataRef(String url) { MediaInfoBox minf = getMdia().getMinf(); DataInfoBox dinf = minf.getDinf(); if (dinf == null) { dinf = new DataInfoBox(); minf.add(dinf); } DataRefBox dref = dinf.getDref(); UrlBox urlBox = new UrlBox(url); if (dref == null) { dref = new DataRefBox(); dinf.add(dref); dref.add(urlBox); } else { ListIterator<Box> lit = dref.boxes.listIterator(); while (lit.hasNext()) { FullBox box = (FullBox) lit.next(); if ((box.getFlags() & 0x1) != 0) lit.set(urlBox); } } }
public void setDataRef(String url) { MediaInfoBox minf = getMdia().getMinf(); DataInfoBox dinf = minf.getDinf(); if (dinf == null) { dinf = new DataInfoBox(); minf.add(dinf); } DataRefBox dref = dinf.getDref(); UrlBox urlBox = new UrlBox(url); if (dref == null) { dref = new DataRefBox(); dinf.add(dref); dref.add(urlBox); } else { ListIterator<Box> lit = dref.boxes.listIterator(); while (lit.hasNext()) { FullBox box = (FullBox) lit.next(); if ((box.getFlags() & 0x1) != 0) lit.set(urlBox); } } }
private void cleanDrefs(TrakBox trak) { MediaInfoBox minf = trak.getMdia().getMinf(); DataInfoBox dinf = trak.getMdia().getMinf().getDinf(); if (dinf == null) { dinf = new DataInfoBox(); minf.add(dinf); } DataRefBox dref = dinf.getDref(); if (dref == null) { dref = new DataRefBox(); dinf.add(dref); } dref.getBoxes().clear(); dref.add(AliasBox.createSelfRef()); for (SampleEntry entry : NodeBox.findAll(trak, SampleEntry.class, "mdia", "minf", "stbl", "stsd", null)) { entry.setDrefInd((short) 1); } }
private void cleanDrefs(TrakBox trak) { MediaInfoBox minf = trak.getMdia().getMinf(); DataInfoBox dinf = trak.getMdia().getMinf().getDinf(); if (dinf == null) { dinf = new DataInfoBox(); minf.add(dinf); } DataRefBox dref = dinf.getDref(); if (dref == null) { dref = new DataRefBox(); dinf.add(dref); } dref.getBoxes().clear(); dref.add(AliasBox.createSelfRef()); for (SampleEntry entry : NodeBox.findAll(trak, SampleEntry.class, "mdia", "minf", "stbl", "stsd", null)) { entry.setDrefInd((short) 1); } }
private void cleanDrefs(TrakBox trak) { MediaInfoBox minf = trak.getMdia().getMinf(); DataInfoBox dinf = trak.getMdia().getMinf().getDinf(); if (dinf == null) { dinf = DataInfoBox.createDataInfoBox(); minf.add(dinf); } DataRefBox dref = dinf.getDref(); if (dref == null) { dref = DataRefBox.createDataRefBox(); dinf.add(dref); } dref.getBoxes().clear(); dref.add(AliasBox.createSelfRef()); SampleEntry[] sampleEntries = trak.getSampleEntries(); for (int i = 0; i < sampleEntries.length; i++) { SampleEntry entry = sampleEntries[i]; entry.setDrefInd((short) 1); } }