Methods Summary |
---|
public java.util.List | getCompositionTimeEntries()
return getCompositionTimeEntries(origTrack.getCompositionTimeEntries(), fromSample, toSample);
|
static java.util.List | getCompositionTimeEntries(java.util.List origSamples, long fromSample, long toSample)
if (origSamples != null && !origSamples.isEmpty()) {
long current = 0;
ListIterator<CompositionTimeToSample.Entry> e = origSamples.listIterator();
ArrayList<CompositionTimeToSample.Entry> nuList = new ArrayList<CompositionTimeToSample.Entry>();
// Skip while not yet reached:
CompositionTimeToSample.Entry currentEntry;
while ((currentEntry = e.next()).getCount() + current <= fromSample) {
current += currentEntry.getCount();
}
// Take just a bit from the next
if (currentEntry.getCount() + current >= toSample) {
nuList.add(new CompositionTimeToSample.Entry((int) (toSample - fromSample), currentEntry.getOffset()));
return nuList; // done in one step
} else {
nuList.add(new CompositionTimeToSample.Entry((int) (currentEntry.getCount() + current - fromSample), currentEntry.getOffset()));
}
current += currentEntry.getCount();
while (e.hasNext() && (currentEntry = e.next()).getCount() + current < toSample) {
nuList.add(currentEntry);
current += currentEntry.getCount();
}
nuList.add(new CompositionTimeToSample.Entry((int) (toSample - current), currentEntry.getOffset()));
return nuList;
} else {
return null;
}
|
public java.util.List | getDecodingTimeEntries()
return getDecodingTimeEntries(origTrack.getDecodingTimeEntries(), fromSample, toSample);
|
static java.util.List | getDecodingTimeEntries(java.util.List origSamples, long fromSample, long toSample)
if (origSamples != null && !origSamples.isEmpty()) {
long current = 0;
ListIterator<TimeToSampleBox.Entry> e = origSamples.listIterator();
LinkedList<TimeToSampleBox.Entry> nuList = new LinkedList<TimeToSampleBox.Entry>();
// Skip while not yet reached:
TimeToSampleBox.Entry currentEntry;
while ((currentEntry = e.next()).getCount() + current <= fromSample) {
current += currentEntry.getCount();
}
// Take just a bit from the next
if (currentEntry.getCount() + current >= toSample) {
nuList.add(new TimeToSampleBox.Entry(toSample - fromSample, currentEntry.getDelta()));
return nuList; // done in one step
} else {
nuList.add(new TimeToSampleBox.Entry(currentEntry.getCount() + current - fromSample, currentEntry.getDelta()));
}
current += currentEntry.getCount();
while (e.hasNext() && (currentEntry = e.next()).getCount() + current < toSample) {
nuList.add(currentEntry);
current += currentEntry.getCount();
}
nuList.add(new TimeToSampleBox.Entry(toSample - current, currentEntry.getDelta()));
return nuList;
} else {
return null;
}
|
public java.lang.String | getHandler()
return origTrack.getHandler();
|
public Box | getMediaHeaderBox()
return origTrack.getMediaHeaderBox();
|
public java.util.List | getSampleDependencies()
if (origTrack.getSampleDependencies() != null && !origTrack.getSampleDependencies().isEmpty()) {
return origTrack.getSampleDependencies().subList(fromSample, toSample);
} else {
return null;
}
|
public SampleDescriptionBox | getSampleDescriptionBox()
return origTrack.getSampleDescriptionBox();
|
public java.util.List | getSamples()
return origTrack.getSamples().subList(fromSample, toSample);
|
public SubSampleInformationBox | getSubsampleInformationBox()
return origTrack.getSubsampleInformationBox();
|
public synchronized long[] | getSyncSamples()
if (origTrack.getSyncSamples() != null) {
long[] origSyncSamples = origTrack.getSyncSamples();
int i = 0, j = origSyncSamples.length;
while (i < origSyncSamples.length && origSyncSamples[i] < fromSample) {
i++;
}
while (j > 0 && toSample < origSyncSamples[j - 1]) {
j--;
}
syncSampleArray = Arrays.copyOfRange(origTrack.getSyncSamples(), i, j);
for (int k = 0; k < syncSampleArray.length; k++) {
syncSampleArray[k] -= fromSample;
}
return syncSampleArray;
}
return null;
|
public com.googlecode.mp4parser.authoring.TrackMetaData | getTrackMetaData()
return origTrack.getTrackMetaData();
|