public SampleDescriptionBox getSampleDescriptionBox() { return trackBox.getSampleTableBox().getSampleDescriptionBox(); }
public FragmentedMp4SampleList(long track, Container isofile, RandomAccessSource randomAccess) { this.isofile = isofile; this.randomAccess = randomAccess; List<TrackBox> tbs = Path.getPaths(isofile, "moov[0]/trak"); for (TrackBox tb : tbs) { if (tb.getTrackHeaderBox().getTrackId() == track) { trackBox = tb; } } if (trackBox == null) { throw new RuntimeException("This MP4 does not contain track " + track); } List<TrackExtendsBox> trexs = Path.getPaths(isofile, "moov[0]/mvex[0]/trex"); for (TrackExtendsBox box : trexs) { if (box.getTrackId() == trackBox.getTrackHeaderBox().getTrackId()) { trex = box; } } sampleEntries = new ArrayList<>(trackBox.getSampleTableBox().getSampleDescriptionBox().getBoxes(SampleEntry.class)); if (sampleEntries.size() != trackBox.getSampleTableBox().getSampleDescriptionBox().getBoxes().size()) throw new AssertionError("stsd contains not only sample entries. Something's wrong here! Bailing out"); sampleCache = (SoftReference<Sample>[]) Array.newInstance(SoftReference.class, size()); initAllFragments(); }
throw new RuntimeException("This MP4 does not contain track " + track); sampleEntries = new ArrayList<>(trackBox.getSampleTableBox().getSampleDescriptionBox().getBoxes(SampleEntry.class)); if (sampleEntries.size() != trackBox.getSampleTableBox().getSampleDescriptionBox().getBoxes().size()) throw new AssertionError("stsd contains not only sample entries. Something's wrong here! Bailing out");
assert schm != null && (schm.getSchemeType().equals("cenc") || schm.getSchemeType().equals("cbc1")) : "Track must be CENC (cenc or cbc1) encrypted"; List<SampleEntry> sampleEntries = trackBox.getMediaBox().getMediaInformationBox().getSampleTableBox().getSampleDescriptionBox().getBoxes(SampleEntry.class); assert trackBox.getMediaBox().getMediaInformationBox().getSampleTableBox().getSampleDescriptionBox().getBoxes().size() == sampleEntries.size();
movieFragmentBoxes.addAll(isofile.getBoxes(MovieFragmentBox.class)); sampleDescriptionBox = stbl.getSampleDescriptionBox(); int lastSubsSample = 0; final List<MovieExtendsBox> movieExtendsBoxes = Path.getPaths(isofile, "moov/mvex");
public FragmentedMp4SampleList(long track, Container isofile, RandomAccessSource randomAccess) { this.isofile = isofile; this.randomAccess = randomAccess; List<TrackBox> tbs = Path.getPaths(isofile, "moov[0]/trak"); for (TrackBox tb : tbs) { if (tb.getTrackHeaderBox().getTrackId() == track) { trackBox = tb; } } if (trackBox == null) { throw new RuntimeException("This MP4 does not contain track " + track); } List<TrackExtendsBox> trexs = Path.getPaths(isofile, "moov[0]/mvex[0]/trex"); for (TrackExtendsBox box : trexs) { if (box.getTrackId() == trackBox.getTrackHeaderBox().getTrackId()) { trex = box; } } sampleEntries = new ArrayList<>(trackBox.getSampleTableBox().getSampleDescriptionBox().getBoxes(SampleEntry.class)); if (sampleEntries.size() != trackBox.getSampleTableBox().getSampleDescriptionBox().getBoxes().size()) throw new AssertionError("stsd contains not only sample entries. Something's wrong here! Bailing out"); sampleCache = (SoftReference<Sample>[]) Array.newInstance(SoftReference.class, size()); initAllFragments(); }
MP4Reader.dumpBox(stbl); SampleDescriptionBox stsd = stbl.getSampleDescriptionBox(); // stsd if (stsd != null) {
MP4Reader.dumpBox(stbl); SampleDescriptionBox stsd = stbl.getSampleDescriptionBox(); // stsd if (stsd != null) {
dumpBox(stbl); SampleDescriptionBox stsd = stbl.getSampleDescriptionBox(); // stsd if (stsd != null) {
dumpBox(stbl); SampleDescriptionBox stsd = stbl.getSampleDescriptionBox(); // stsd if (stsd != null) {
throw new RuntimeException("This MP4 does not contain track " + track); sampleEntries = new ArrayList<>(trackBox.getSampleTableBox().getSampleDescriptionBox().getBoxes(SampleEntry.class)); if (sampleEntries.size() != trackBox.getSampleTableBox().getSampleDescriptionBox().getBoxes().size()) throw new AssertionError("stsd contains not only sample entries. Something's wrong here! Bailing out");
assert schm != null && (schm.getSchemeType().equals("cenc") || schm.getSchemeType().equals("cbc1")) : "Track must be CENC (cenc or cbc1) encrypted"; List<SampleEntry> sampleEntries = trackBox.getMediaBox().getMediaInformationBox().getSampleTableBox().getSampleDescriptionBox().getBoxes(SampleEntry.class); assert trackBox.getMediaBox().getMediaInformationBox().getSampleTableBox().getSampleDescriptionBox().getBoxes().size() == sampleEntries.size();
movieFragmentBoxes.addAll(isofile.getBoxes(MovieFragmentBox.class)); sampleDescriptionBox = stbl.getSampleDescriptionBox(); int lastSubsSample = 0; final List<MovieExtendsBox> movieExtendsBoxes = Path.getPaths(isofile, "moov/mvex");