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(); }
List<TrackExtendsBox> trexs = Path.getPaths(isoFile, "moov/mvex/trex"); for (TrackExtendsBox innerTrex : trexs) { if (innerTrex.getTrackId() == track.getTrackMetaData().getTrackId()) { trex = innerTrex;
final List<TrackExtendsBox> trackExtendsBoxes = mvex.getBoxes(TrackExtendsBox.class); for (TrackExtendsBox trex : trackExtendsBoxes) { if (trex.getTrackId() == trackId) { List<SubSampleInformationBox> subss = Path.getPaths(isofile, "moof/traf/subs"); if (subss.size() > 0) {
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(); }
log.debug("trex - track id: {} duration: {} sample size: {}", trex.getTrackId(), trex.getDefaultSampleDuration(), trex.getDefaultSampleSize()); List<TrackExtendsBox> trexs = mvex.getBoxes(TrackExtendsBox.class); for (TrackExtendsBox trex : trexs) { log.debug("trex - track id: {} duration: {} sample size: {}", trex.getTrackId(), trex.getDefaultSampleDuration(), trex.getDefaultSampleSize());
log.debug("trex - track id: {} duration: {} sample size: {}", trex.getTrackId(), trex.getDefaultSampleDuration(), trex.getDefaultSampleSize()); List<TrackExtendsBox> trexs = mvex.getBoxes(TrackExtendsBox.class); for (TrackExtendsBox trex : trexs) { log.debug("trex - track id: {} duration: {} sample size: {}", trex.getTrackId(), trex.getDefaultSampleDuration(), trex.getDefaultSampleSize());
List<TrackExtendsBox> trexs = Path.getPaths(isoFile, "moov/mvex/trex"); for (TrackExtendsBox innerTrex : trexs) { if (innerTrex.getTrackId() == track.getTrackMetaData().getTrackId()) { trex = innerTrex;
final List<TrackExtendsBox> trackExtendsBoxes = mvex.getBoxes(TrackExtendsBox.class); for (TrackExtendsBox trex : trackExtendsBoxes) { if (trex.getTrackId() == trackId) { List<SubSampleInformationBox> subss = Path.getPaths(isofile, "moof/traf/subs"); if (subss.size() > 0) {