public WebVTTSourceLabelBox getSourceLabel() { return Path.getPath(this, "vlab"); } }
public static <T extends Box> List<T> getPaths(Container container, String path) { return getPaths(container, path, false); }
public static boolean isIgnore(Container ref, Box b, String[] ignores) { for (String ignore : ignores) { if (Path.isContained(ref, b, ignore)) { return true; } } return false; }
private static void correctChunkOffsets(IsoFile tempIsoFile, long correction) { List<SampleTableBox> sampleTableBoxes = Path.getPaths(tempIsoFile, "/moov[0]/trak/mdia[0]/minf[0]/stbl[0]"); for (SampleTableBox sampleTableBox : sampleTableBoxes) { List<Box> stblChildren = new ArrayList<Box>(sampleTableBox.getBoxes()); ChunkOffsetBox chunkOffsetBox = Path.getPath(sampleTableBox, "stco"); if (chunkOffsetBox == null) { stblChildren.remove(Path.getPath(sampleTableBox, "co64")); } stblChildren.remove(chunkOffsetBox); assert chunkOffsetBox != null; long[] cOffsets = chunkOffsetBox.getChunkOffsets(); for (int i = 0; i < cOffsets.length; i++) { cOffsets[i] += correction; } StaticChunkOffsetBox cob = new StaticChunkOffsetBox(); cob.setChunkOffsets(cOffsets); stblChildren.add(cob); sampleTableBox.setBoxes(stblChildren); } }
public static void main(String[] args) throws IOException { IsoFile isoFile = new IsoFile("/Users/sannies/dev/common_transcoding-packager-encrypter/dashencrypter/15000_dv5.mp4"); List<TrackBox> trackBoxes = Path.getPaths(isoFile, "moov/trak/"); HevcConfigurationBox hevc = Path.getPath(trackBox, "mdia/minf/stbl/stsd/..../hvcC"); List<HevcDecoderConfigurationRecord.Array> s = hevc.getArrays();
public TrackHeaderBox getTrackHeaderBox() { return Path.getPath(this, "tkhd[0]"); }
public static <T extends Box> List<T> getPaths(Box box, String path) { return getPaths(box, path, false); }
super(trackId, isofile, randomAccess, name); TrackBox trackBox = null; for (TrackBox box : Path.<TrackBox>getPaths(isofile, "moov/trak")) { if (box.getTrackHeaderBox().getTrackId() == trackId) { trackBox = box; SchemeTypeBox schm = Path.getPath(trackBox, "mdia[0]/minf[0]/stbl[0]/stsd[0]/enc.[0]/sinf[0]/schm[0]"); assert schm != null && (schm.getSchemeType().equals("piff")) : "Track must be PIFF encrypted"; final List<MovieExtendsBox> movieExtendsBoxes = Path.getPaths(isofile, "moov/mvex"); if (!movieExtendsBoxes.isEmpty()) { for (TrackFragmentBox traf : trafs) { if (traf.getTrackFragmentHeaderBox().getTrackId() == trackId) { AbstractTrackEncryptionBox tenc = Path.getPath(trackBox, "mdia[0]/minf[0]/stbl[0]/stsd[0]/enc.[0]/sinf[0]/schi[0]/uuid[0]"); assert tenc != null; defaultKeyId = tenc.getDefault_KID();
public static boolean isIgnore(Container ref, Box b, String[] ignores) { for (String ignore : ignores) { if (Path.isContained(ref, b, ignore)) { return true; } } return false; }
public TimeToSampleBox getTimeToSampleBox() { return Path.getPath(this, "stts"); }
public List<TrackFragmentHeaderBox> getTrackFragmentHeaderBoxes() { return Path.getPaths((Container) this, "tfhd"); }
for (TrackBox box : Path.<TrackBox>getPaths(isofile, "moov/trak")) { if (box.getTrackHeaderBox().getTrackId() == trackId) { trackBox = box; List<SchemeTypeBox> schms = Path.getPaths((Container) trackBox, "mdia[0]/minf[0]/stbl[0]/stsd[0]/enc./sinf[0]/schm[0]"); for (SchemeTypeBox schm : schms) { assert schm != null && (schm.getSchemeType().equals("cenc") || schm.getSchemeType().equals("cbc1")) : "Track must be CENC (cenc or cbc1) encrypted"; final List<MovieExtendsBox> movieExtendsBoxes = Path.getPaths(isofile, "moov/mvex"); if (!movieExtendsBoxes.isEmpty()) { TrackEncryptionBox tenc = Path.getPath((Container) sampleEntries.get(l2i(traf.getTrackFragmentHeaderBox().getSampleDescriptionIndex()-1)), "sinf[0]/schi[0]/tenc[0]"); ChunkOffsetBox chunkOffsetBox = Path.getPath(trackBox, "mdia[0]/minf[0]/stbl[0]/stco[0]"); chunkOffsetBox = Path.getPath(trackBox, "mdia[0]/minf[0]/stbl[0]/co64[0]"); FindSaioSaizPair saizSaioPair = new FindSaioSaizPair((Container) Path.getPath(trackBox, "mdia[0]/minf[0]/stbl[0]")).invoke(); SampleAuxiliaryInformationOffsetsBox saio = saizSaioPair.saio; SampleAuxiliaryInformationSizesBox saiz = saizSaioPair.saiz; SampleEntry _se = samples.get(i).getSampleEntry(); if (se != _se) { tenc = Path.getPath((Container) _se, "sinf[0]/schi[0]/tenc[0]"); SampleEntry _se = samples.get(currentSampleNo + j).getSampleEntry(); if (se != _se) { tenc = Path.getPath((Container) _se, "sinf[0]/schi[0]/tenc[0]");
public CompositionTimeToSample getCompositionTimeToSample() { return Path.getPath(this, "ctts"); }
private static <T extends Box> List<T> getPaths(AbstractContainerBox container, String path, boolean singleResult) { return getPaths((Object) container, path, singleResult); }
for (TrackBox box : Path.<TrackBox>getPaths(isofile, "moov/trak")) { if (box.getTrackHeaderBox().getTrackId() == trackId) { trackBox = box; subSampleInformationBox = Path.getPath(stbl, "subs"); final List<MovieExtendsBox> movieExtendsBoxes = Path.getPaths(isofile, "moov/mvex"); if (movieExtendsBoxes.size() > 0) { for (MovieExtendsBox mvex : movieExtendsBoxes) { for (TrackExtendsBox trex : trackExtendsBoxes) { if (trex.getTrackId() == trackId) { List<SubSampleInformationBox> subss = Path.getPaths(isofile, "moof/traf/subs"); if (subss.size() > 0) { subSampleInformationBox = new SubSampleInformationBox(); sampleGroups = getSampleGroups( stbl.getBoxes(SampleGroupDescriptionBox.class), // global descriptions Path.<SampleGroupDescriptionBox>getPaths((Container) traf, "sgpd"), // local description Path.<SampleToGroupBox>getPaths((Container) traf, "sbgp"), sampleGroups, sampleNumber - 1); SubSampleInformationBox subs = Path.getPath(traf, "subs"); if (subs != null) { long difFromLastFragment = sampleNumber - lastSubsSample - 1; sampleGroups = getSampleGroups( stbl.getBoxes(SampleGroupDescriptionBox.class), Path.<SampleGroupDescriptionBox>getPaths((Container) traf, "sgpd"),
public WebVTTConfigurationBox getConfig() { return Path.getPath(this, "vttC"); }
private static <T extends Box> List<T> getPaths(Container container, String path, boolean singleResult) { return getPaths((Object) container, path, singleResult); }
super(trackId, isofile, randomAccess, name); TrackBox trackBox = null; for (TrackBox box : Path.<TrackBox>getPaths(isofile, "moov/trak")) { if (box.getTrackHeaderBox().getTrackId() == trackId) { trackBox = box; SchemeTypeBox schm = Path.getPath(trackBox, "mdia[0]/minf[0]/stbl[0]/stsd[0]/enc.[0]/sinf[0]/schm[0]"); assert schm != null && (schm.getSchemeType().equals("piff")) : "Track must be PIFF encrypted"; final List<MovieExtendsBox> movieExtendsBoxes = Path.getPaths(isofile, "moov/mvex"); if (!movieExtendsBoxes.isEmpty()) { for (TrackFragmentBox traf : trafs) { if (traf.getTrackFragmentHeaderBox().getTrackId() == trackId) { AbstractTrackEncryptionBox tenc = Path.getPath(trackBox, "mdia[0]/minf[0]/stbl[0]/stsd[0]/enc.[0]/sinf[0]/schi[0]/uuid[0]"); assert tenc != null; defaultKeyId = tenc.getDefault_KID();
public SyncSampleBox getSyncSampleBox() { return Path.getPath(this, "stss"); }
private static <T extends Box> List<T> getPaths(ParsableBox parsableBox, String path, boolean singleResult) { return getPaths((Object) parsableBox, path, singleResult); }