public Avc1ToAvc3TrackImpl(Track parent) throws IOException { super(parent); for (SampleEntry sampleEntry : parent.getSampleEntries()) { if (sampleEntry.getType().equals("avc1")) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { // This creates a copy cause I can't change the original instance sampleEntry.getBox(Channels.newChannel(baos)); VisualSampleEntry avc3SampleEntry = (VisualSampleEntry) new IsoFile(new ByteBufferByteChannel(ByteBuffer.wrap(baos.toByteArray()))).getBoxes().get(0); avc3SampleEntry.setType("avc3"); avc1toavc3.put(sampleEntry, avc3SampleEntry); } catch (IOException e) { throw new RuntimeException("Dumping sample entry to memory failed"); } } else { avc1toavc3.put(sampleEntry, sampleEntry); } } samples = new ReplaceSyncSamplesList(parent.getSamples()); }
((AudioSampleEntry) decSe).setType(frma.getDataFormat()); } else if (decSe instanceof VisualSampleEntry) { ((VisualSampleEntry) decSe).setType(frma.getDataFormat()); } else { throw new RuntimeException("I don't know " + decSe.getType());
((AudioSampleEntry) encSampleEntry).addBox(sinf); } else if (se instanceof VisualSampleEntry) { ((VisualSampleEntry) encSampleEntry).setType("encv"); ((VisualSampleEntry) encSampleEntry).addBox(sinf); } else {
public Avc1ToAvc3TrackImpl(Track parent) throws IOException { super(parent); for (SampleEntry sampleEntry : parent.getSampleEntries()) { if (sampleEntry.getType().equals("avc1")) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { // This creates a copy cause I can't change the original instance sampleEntry.getBox(Channels.newChannel(baos)); VisualSampleEntry avc3SampleEntry = (VisualSampleEntry) new IsoFile(new ByteBufferByteChannel(ByteBuffer.wrap(baos.toByteArray()))).getBoxes().get(0); avc3SampleEntry.setType("avc3"); avc1toavc3.put(sampleEntry, avc3SampleEntry); } catch (IOException e) { throw new RuntimeException("Dumping sample entry to memory failed"); } } else { avc1toavc3.put(sampleEntry, sampleEntry); } } samples = new ReplaceSyncSamplesList(parent.getSamples()); }
((AudioSampleEntry) decSe).setType(frma.getDataFormat()); } else if (decSe instanceof VisualSampleEntry) { ((VisualSampleEntry) decSe).setType(frma.getDataFormat()); } else { throw new RuntimeException("I don't know " + decSe.getType());
((AudioSampleEntry) encSampleEntry).addBox(sinf); } else if (se instanceof VisualSampleEntry) { ((VisualSampleEntry) encSampleEntry).setType("encv"); ((VisualSampleEntry) encSampleEntry).addBox(sinf); } else {