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 setAperture(Size sar, Size dar) { removeChildren("tapt"); NodeBox tapt = new NodeBox(new Header("tapt")); tapt.add(ClearApertureBox.createClearApertureBox(dar.getWidth(), dar.getHeight())); tapt.add(ProductionApertureBox.createProductionApertureBox(dar.getWidth(), dar.getHeight())); tapt.add(EncodedPixelBox.createEncodedPixelBox(sar.getWidth(), sar.getHeight())); add(tapt); }
public void setAperture(Size sar, Size dar) { removeChildren("tapt"); NodeBox tapt = new NodeBox(new Header("tapt")); tapt.add(new ClearApertureBox(dar.getWidth(), dar.getHeight())); tapt.add(new ProductionApertureBox(dar.getWidth(), dar.getHeight())); tapt.add(new EncodedPixelBox(sar.getWidth(), sar.getHeight())); add(tapt); }
public void tapt(TrakBox trak) { Size dd = getDisplayDimensions(); if (type == VIDEO) { NodeBox tapt = new NodeBox(new Header("tapt")); tapt.add(new ClearApertureBox(dd.getWidth(), dd.getHeight())); tapt.add(new ProductionApertureBox(dd.getWidth(), dd.getHeight())); tapt.add(new EncodedPixelBox(dd.getWidth(), dd.getHeight())); trak.add(tapt); } }
public void tapt(TrakBox trak) { Size dd = getDisplayDimensions(); if (type == VIDEO) { NodeBox tapt = new NodeBox(new Header("tapt")); tapt.add(new ClearApertureBox(dd.getWidth(), dd.getHeight())); tapt.add(new ProductionApertureBox(dd.getWidth(), dd.getHeight())); tapt.add(new EncodedPixelBox(dd.getWidth(), dd.getHeight())); trak.add(tapt); } }
public void setAperture(Size sar, Size dar) { removeChildren("tapt"); NodeBox tapt = new NodeBox(new Header("tapt")); tapt.add(new ClearApertureBox(dar.getWidth(), dar.getHeight())); tapt.add(new ProductionApertureBox(dar.getWidth(), dar.getHeight())); tapt.add(new EncodedPixelBox(sar.getWidth(), sar.getHeight())); add(tapt); }
public void tapt(TrakBox trak) { Size dd = getDisplayDimensions(); if (type == VIDEO) { NodeBox tapt = new NodeBox(new Header("tapt")); tapt.add(ClearApertureBox.createClearApertureBox(dd.getWidth(), dd.getHeight())); tapt.add(ProductionApertureBox.createProductionApertureBox(dd.getWidth(), dd.getHeight())); tapt.add(EncodedPixelBox.createEncodedPixelBox(dd.getWidth(), dd.getHeight())); trak.add(tapt); } }
protected void putName(TrakBox trak) { if (name != null) { NodeBox udta = new NodeBox(new Header("udta")); udta.add(new NameBox(name)); trak.add(udta); } }
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 putEdits(TrakBox trak) { if (edits != null) { NodeBox edts = new NodeBox(new Header("edts")); edts.add(new EditListBox(edits)); trak.add(edts); } }
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 putName(TrakBox trak) { if (name != null) { NodeBox udta = new NodeBox(new Header("udta")); udta.add(NameBox.createNameBox(name)); trak.add(udta); } }
protected void putEdits(TrakBox trak) { if (edits != null) { NodeBox edts = new NodeBox(new Header("edts")); edts.add(new EditListBox(edits)); trak.add(edts); } }
protected void putEdits(TrakBox trak) { if (edits != null) { NodeBox edts = new NodeBox(new Header("edts")); edts.add(EditListBox.createEditListBox(edits)); trak.add(edts); } }
public void apply() { NodeBox stbl = NodeBox.findFirstPath(trak, NodeBox.class, Box.path("mdia.minf.stbl")); stbl.removeChildren("stco", "co64"); stbl.add(ChunkOffsets64Box.createChunkOffsets64Box(offsets)); cleanDrefs(trak); }
public void setName(String string) { NodeBox udta = findFirst(this, NodeBox.class, "udta"); if (udta == null) { udta = new NodeBox(new Header("udta")); this.add(udta); } udta.removeChildren("name"); udta.add(new NameBox(string)); }
public void setName(String string) { NodeBox udta = NodeBox.findFirst(this, NodeBox.class, "udta"); if (udta == null) { udta = new NodeBox(new Header("udta")); this.add(udta); } udta.removeChildren("name"); udta.add(NameBox.createNameBox(string)); }
public void setEdits(List<Edit> edits) { NodeBox edts = findFirst(this, NodeBox.class, "edts"); if (edts == null) { edts = new NodeBox(new Header("edts")); this.add(edts); } edts.removeChildren("elst"); edts.add(new EditListBox(edits)); getTrackHeader().setDuration(getEditedDuration(this)); }
public void setEdits(List<Edit> edits) { NodeBox edts = NodeBox.findFirst(this, NodeBox.class, "edts"); if (edts == null) { edts = new NodeBox(new Header("edts")); this.add(edts); } edts.removeChildren("elst"); edts.add(EditListBox.createEditListBox(edits)); getTrackHeader().setDuration(getEditedDuration(this)); }
private static void appendChunkOffsets(TrakBox trakBox1, TrakBox trakBox2) { ChunkOffsetsBox stco1 = trakBox1.getStco(); ChunkOffsets64Box co641 = trakBox1.getCo64(); ChunkOffsetsBox stco2 = trakBox2.getStco(); ChunkOffsets64Box co642 = trakBox2.getCo64(); long[] off1 = stco1 == null ? co641.getChunkOffsets() : stco1.getChunkOffsets(); long[] off2 = stco2 == null ? co642.getChunkOffsets() : stco2.getChunkOffsets(); NodeBox stbl1 = NodeBox.findFirstPath(trakBox1, NodeBox.class, Box.path("mdia.minf.stbl")); stbl1.removeChildren("stco", "co64"); stbl1.add(co641 == null && co642 == null ? ChunkOffsetsBox.createChunkOffsetsBox(ArrayUtil.addAllLong(off1, off2)) : ChunkOffsets64Box.createChunkOffsets64Box(ArrayUtil.addAllLong(off1, off2))); }