protected void createStsz(Track track, SampleTableBox stbl) { SampleSizeBox stsz = new SampleSizeBox(); stsz.setSampleSizes(track2SampleSizes.get(track)); stbl.addBox(stsz); }
public String toString() { return "SampleSizeBox[sampleSize=" + getSampleSize() + ";sampleCount=" + getSampleCount() + "]"; } }
@Override public String toString() { return "Sample(index: " + index + " size: " + ssb.getSampleSizeAtIndex(index) + ")"; }
audioSamples = stsz.getSampleSizes(); log.debug("Samples: {}", audioSamples.length); audioSampleSize = stsz.getSampleSize(); log.debug("Sample size: {}", audioSampleSize); long audioSampleCount = stsz.getSampleCount(); log.debug("Sample count: {}", audioSampleCount);
for (int i = 1; i <= ssb.getSampleCount(); i++) { while (i == chunkNumsStartSampleNum[currentChunkNo]) { sampleSum = 0; chunkSizes[currentChunkNo - 1] += ssb.getSampleSizeAtIndex(i - 1); long[] sampleOffsetsWithinChunkscurrentChunkNo = sampleOffsetsWithinChunks[currentChunkNo - 1]; int chunkNumsStartSampleNumcurrentChunkNo = chunkNumsStartSampleNum[currentChunkNo - 1]; sampleOffsetsWithinChunkscurrentChunkNo[i - chunkNumsStartSampleNumcurrentChunkNo] = sampleSum; sampleSum += ssb.getSampleSizeAtIndex(i - 1);
stsz.setSampleSizes(Mp4Arrays.copyOfAndAppend(stsz.getSampleSizes(), sampleSizes));
protected ParsableBox createStbl(Movie movie, Track track) { SampleTableBox stbl = new SampleTableBox(); createStsd(track, stbl); stbl.addBox(new TimeToSampleBox()); stbl.addBox(new SampleToChunkBox()); stbl.addBox(new SampleSizeBox()); stbl.addBox(new StaticChunkOffsetBox()); return stbl; }
@Override public Sample get(final int index) { if (index >= ssb.getSampleCount()) { throw new IndexOutOfBoundsException(); } return new SampleImpl(index); }
contentSize += sum(stsz.getSampleSizes());
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); sampleSize = IsoTypeReader.readUInt32(content); sampleCount = CastUtils.l2i(IsoTypeReader.readUInt32(content)); if (sampleSize == 0) { sampleSizes = new long[sampleCount]; for (int i = 0; i < sampleCount; i++) { sampleSizes[i] = IsoTypeReader.readUInt32(content); } } }
@Override protected void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); IsoTypeWriter.writeUInt32(byteBuffer, sampleSize); if (sampleSize == 0) { IsoTypeWriter.writeUInt32(byteBuffer, sampleSizes.length); for (long sampleSize1 : sampleSizes) { IsoTypeWriter.writeUInt32(byteBuffer, sampleSize1); } } else { IsoTypeWriter.writeUInt32(byteBuffer, sampleCount); } }
audioSamples = stsz.getSampleSizes(); log.debug("Samples: {}", audioSamples.length); audioSampleSize = stsz.getSampleSize(); log.debug("Sample size: {}", audioSampleSize); long audioSampleCount = stsz.getSampleCount(); log.debug("Sample count: {}", audioSampleCount);
for (int i = 1; i <= ssb.getSampleCount(); i++) { while (i == chunkNumsStartSampleNum[currentChunkNo]) { sampleSum = 0; chunkSizes[currentChunkNo - 1] += ssb.getSampleSizeAtIndex(i - 1); long[] sampleOffsetsWithinChunkscurrentChunkNo = sampleOffsetsWithinChunks[currentChunkNo - 1]; int chunkNumsStartSampleNumcurrentChunkNo = chunkNumsStartSampleNum[currentChunkNo - 1]; sampleOffsetsWithinChunkscurrentChunkNo[i - chunkNumsStartSampleNumcurrentChunkNo] = sampleSum; sampleSum += ssb.getSampleSizeAtIndex(i - 1);
protected Box createStbl(StreamingTrack streamingTrack) { SampleTableBox stbl = new SampleTableBox(); stbl.addBox(streamingTrack.getSampleDescriptionBox()); stbl.addBox(new TimeToSampleBox()); stbl.addBox(new SampleToChunkBox()); stbl.addBox(new SampleSizeBox()); stbl.addBox(new StaticChunkOffsetBox()); return stbl; }
@Override public int size() { return l2i(trackBox.getSampleTableBox().getSampleSizeBox().getSampleCount()); }
contentSize += sum(stsz.getSampleSizes());
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); sampleSize = IsoTypeReader.readUInt32(content); sampleCount = CastUtils.l2i(IsoTypeReader.readUInt32(content)); if (sampleSize == 0) { sampleSizes = new long[sampleCount]; for (int i = 0; i < sampleCount; i++) { sampleSizes[i] = IsoTypeReader.readUInt32(content); } } }
@Override protected void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); IsoTypeWriter.writeUInt32(byteBuffer, sampleSize); if (sampleSize == 0) { IsoTypeWriter.writeUInt32(byteBuffer, sampleSizes.length); for (long sampleSize1 : sampleSizes) { IsoTypeWriter.writeUInt32(byteBuffer, sampleSize1); } } else { IsoTypeWriter.writeUInt32(byteBuffer, sampleCount); } }
videoSamples = stsz.getSampleSizes(); log.debug("Sample size: {}", stsz.getSampleSize()); videoSampleCount = stsz.getSampleCount(); log.debug("Sample count: {}", videoSampleCount);
protected void createStsz(Track track, SampleTableBox stbl) { SampleSizeBox stsz = new SampleSizeBox(); stsz.setSampleSizes(track2SampleSizes.get(track)); stbl.addBox(stsz); }