public static DataInfoBox createDataInfoBox() { return new DataInfoBox(new Header(fourcc())); }
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 DataRefBox getDref() { return findFirst(this, DataRefBox.class, "dref"); } }
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 = 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 }))); } }
public boolean hasDataRef() { DataInfoBox dinf = getMdia().getMinf().getDinf(); if (dinf == null) { return false; } DataRefBox dref = dinf.getDref(); if (dref == null) return false; boolean result = false; for (Box box : dref.boxes) { result |= (((FullBox) box).getFlags() & 0x1) != 0x1; } return result; }
public DataInfoBox() { super(new Header(fourcc())); }
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 = 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); } }
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 boolean hasDataRef() { DataInfoBox dinf = getMdia().getMinf().getDinf(); if (dinf == null) { return false; } DataRefBox dref = dinf.getDref(); if (dref == null) return false; boolean result = false; for (Box box : dref.boxes) { result |= (((FullBox) box).getFlags() & 0x1) != 0x1; } return result; }
public DataInfoBox() { super(new Header(fourcc())); }
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); } }
public boolean hasDataRef() { DataInfoBox dinf = getMdia().getMinf().getDinf(); if (dinf == null) { return false; } DataRefBox dref = dinf.getDref(); if (dref == null) return false; boolean result = false; for (Box box : dref.boxes) { result |= (((FullBox) box).getFlags() & 0x1) != 0x1; } return result; }
mappings.put(MediaInfoBox.fourcc(), MediaInfoBox.class); mappings.put(HandlerBox.fourcc(), HandlerBox.class); mappings.put(DataInfoBox.fourcc(), DataInfoBox.class); mappings.put("stbl", NodeBox.class); mappings.put(SampleDescriptionBox.fourcc(), SampleDescriptionBox.class);
public DataRefBox getDref() { return findFirst(this, DataRefBox.class, "dref"); } }
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); } }
public boolean isPureRef() { MediaInfoBox minf = getMdia().getMinf(); DataInfoBox dinf = minf.getDinf(); if (dinf == null) { return false; } DataRefBox dref = dinf.getDref(); if (dref == null) return false; for (Box box : dref.boxes) { if ((((FullBox) box).getFlags() & 0x1) != 0) return false; } return true; }
mappings.put(MediaInfoBox.fourcc(), MediaInfoBox.class); mappings.put(HandlerBox.fourcc(), HandlerBox.class); mappings.put(DataInfoBox.fourcc(), DataInfoBox.class); mappings.put("stbl", NodeBox.class); mappings.put(SampleDescriptionBox.fourcc(), SampleDescriptionBox.class);