public long getSize() { return clearSample.getSize(); }
/** * Gets the sizes of a sequence of samples. * * @param startSample low endpoint (inclusive) of the sample sequence * @param endSample high endpoint (exclusive) of the sample sequence * @param track source of the samples * @param sequenceNumber the fragment index of the requested list of samples * @return the sample sizes in the given interval */ protected long[] getSampleSizes(long startSample, long endSample, Track track, int sequenceNumber) { List<Sample> samples = getSamples(startSample, endSample, track); long[] sampleSizes = new long[samples.size()]; for (int i = 0; i < sampleSizes.length; i++) { sampleSizes[i] = samples.get(i).getSize(); } return sampleSizes; }
public long getSize() { int spsPpsSize = 0; for (ByteBuffer bytes : avcC.getSequenceParameterSets()) { spsPpsSize += len + bytes.limit(); } for (ByteBuffer bytes : avcC.getSequenceParameterSetExts()) { spsPpsSize += len + bytes.limit(); } for (ByteBuffer bytes : avcC.getPictureParameterSets()) { spsPpsSize += len + bytes.limit(); } return orignalSample.getSize() + spsPpsSize; }
System.err.println("Decrypted sample " + index + " but still data remaining: " + encSample.getSize());
public ByteBuffer asByteBuffer() { int spsPpsSize = 0; for (ByteBuffer bytes : avcC.getSequenceParameterSets()) { spsPpsSize += len + bytes.limit(); } for (ByteBuffer bytes : avcC.getSequenceParameterSetExts()) { spsPpsSize += len + bytes.limit(); } for (ByteBuffer bytes : avcC.getPictureParameterSets()) { spsPpsSize += len + bytes.limit(); } ByteBuffer data = ByteBuffer.allocate(l2i(orignalSample.getSize()) + spsPpsSize); for (ByteBuffer bytes : avcC.getSequenceParameterSets()) { IsoTypeWriterVariable.write(bytes.limit(), data, len); data.put(bytes); } for (ByteBuffer bytes : avcC.getSequenceParameterSetExts()) { IsoTypeWriterVariable.write(bytes.limit(), data, len); data.put(bytes); } for (ByteBuffer bytes : avcC.getPictureParameterSets()) { IsoTypeWriterVariable.write(bytes.limit(), data, len); data.put(bytes); } data.put(orignalSample.asByteBuffer()); return (ByteBuffer) data.rewind(); } };
for (Sample sample : samples) { sample.writeTo(writableByteChannel); writtenBytes += sample.getSize(); if (writtenBytes > 1024 * 1024) { writtenBytes -= 1024 * 1024;
LinkedList<Integer> queue = new LinkedList<Integer>(); for (Sample sample : samples) { int size = (int) sample.getSize(); dataSize += size; queue.add(size);
for (int i = 0; i < sizes.length; i++) { Sample b = samples.get(i); sizes[i] = b.getSize();
LinkedList<Integer> queue = new LinkedList<Integer>(); for (Sample sample : samples) { int size = (int) sample.getSize(); dataSize += size; queue.add(size);
DecoderSpecificInfo decoderSpecificInfo = new DecoderSpecificInfo(); Sample s = createSampleObject(esdsStuff); byte[] data = new byte[l2i(s.getSize())]; s.asByteBuffer().get(data); decoderSpecificInfo.setData(data);
public long getSize() { return clearSample.getSize(); }
/** * Gets the sizes of a sequence of samples. * * @param startSample low endpoint (inclusive) of the sample sequence * @param endSample high endpoint (exclusive) of the sample sequence * @return the sample sizes in the given interval */ protected long[] getSampleSizes(long startSample, long endSample) { List<Sample> samples = getSamples(startSample, endSample); long[] sampleSizes = new long[samples.size()]; for (int i = 0; i < sampleSizes.length; i++) { sampleSizes[i] = samples.get(i).getSize(); } return sampleSizes; }
/** * Gets the sizes of a sequence of samples. * * @param startSample low endpoint (inclusive) of the sample sequence * @param endSample high endpoint (exclusive) of the sample sequence * @param track source of the samples * @param sequenceNumber the fragment index of the requested list of samples * @return the sample sizes in the given interval */ protected long[] getSampleSizes(long startSample, long endSample, Track track, int sequenceNumber) { List<Sample> samples = getSamples(startSample, endSample, track); long[] sampleSizes = new long[samples.size()]; for (int i = 0; i < sampleSizes.length; i++) { sampleSizes[i] = samples.get(i).getSize(); } return sampleSizes; }
public long getSize() { int spsPpsSize = 0; for (ByteBuffer bytes : avcC.getSequenceParameterSets()) { spsPpsSize += len + bytes.limit(); } for (ByteBuffer bytes : avcC.getSequenceParameterSetExts()) { spsPpsSize += len + bytes.limit(); } for (ByteBuffer bytes : avcC.getPictureParameterSets()) { spsPpsSize += len + bytes.limit(); } return orignalSample.getSize() + spsPpsSize; }
public static long getBandwidth(Track track) { long size = 0; List<Sample> samples = track.getSamples(); int increment = samples.size() / Math.min(samples.size(), 10000); int sampleSize = 1; // start with one so that we never get into a divided by zero situation for (int i = 0; i < (samples.size() - increment); i += increment) { size += samples.get(i).getSize(); sampleSize++; } size = (size / sampleSize) * track.getSamples().size(); double duration = (double) track.getDuration() / track.getTrackMetaData().getTimescale(); return (long) ((size * 8 / duration / 100)) * 100; }
System.err.println("Decrypted sample " + index + " but still data remaining: " + encSample.getSize());
public ByteBuffer asByteBuffer() { int spsPpsSize = 0; for (ByteBuffer bytes : avcC.getSequenceParameterSets()) { spsPpsSize += len + bytes.limit(); } for (ByteBuffer bytes : avcC.getSequenceParameterSetExts()) { spsPpsSize += len + bytes.limit(); } for (ByteBuffer bytes : avcC.getPictureParameterSets()) { spsPpsSize += len + bytes.limit(); } ByteBuffer data = ByteBuffer.allocate(l2i(orignalSample.getSize()) + spsPpsSize); for (ByteBuffer bytes : avcC.getSequenceParameterSets()) { IsoTypeWriterVariable.write(bytes.limit(), data, len); data.put(bytes); } for (ByteBuffer bytes : avcC.getSequenceParameterSetExts()) { IsoTypeWriterVariable.write(bytes.limit(), data, len); data.put(bytes); } for (ByteBuffer bytes : avcC.getPictureParameterSets()) { IsoTypeWriterVariable.write(bytes.limit(), data, len); data.put(bytes); } data.put(orignalSample.asByteBuffer()); return (ByteBuffer) data.rewind(); } };
for (Sample sample : samples) { sample.writeTo(writableByteChannel); writtenBytes += sample.getSize(); if (writtenBytes > 1024 * 1024) { writtenBytes -= 1024 * 1024;
LinkedList<Integer> queue = new LinkedList<Integer>(); for (Sample sample : samples) { int size = (int) sample.getSize(); dataSize += size; queue.add(size);
for (int i = 0; i < sizes.length; i++) { Sample b = samples.get(i); sizes[i] = b.getSize();