Methods Summary |
---|
public java.util.List | getCompositionTimeEntries()
return null;
|
public java.util.List | getDecodingTimeEntries()
List<TimeToSampleBox.Entry> stts = new LinkedList<TimeToSampleBox.Entry>();
long lastEnd = 0;
for (Line sub : subs) {
long silentTime = sub.from - lastEnd;
if (silentTime > 0) {
stts.add(new TimeToSampleBox.Entry(1, silentTime));
} else if (silentTime < 0) {
throw new Error("Subtitle display times may not intersect");
}
stts.add(new TimeToSampleBox.Entry(1, sub.to - sub.from));
lastEnd = sub.to;
}
return stts;
|
public java.lang.String | getHandler()
return "sbtl";
|
public AbstractMediaHeaderBox | getMediaHeaderBox()
return new NullMediaHeaderBox();
|
public java.util.List | getSampleDependencies()
return null;
|
public SampleDescriptionBox | getSampleDescriptionBox()
return sampleDescriptionBox;
|
public java.util.List | getSamples()
List<ByteBuffer> samples = new LinkedList<ByteBuffer>();
long lastEnd = 0;
for (Line sub : subs) {
long silentTime = sub.from - lastEnd;
if (silentTime > 0) {
samples.add(ByteBuffer.wrap(new byte[]{0, 0}));
} else if (silentTime < 0) {
throw new Error("Subtitle display times may not intersect");
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
try {
dos.writeShort(sub.text.getBytes("UTF-8").length);
dos.write(sub.text.getBytes("UTF-8"));
dos.close();
} catch (IOException e) {
throw new Error("VM is broken. Does not support UTF-8");
}
samples.add(ByteBuffer.wrap(baos.toByteArray()));
lastEnd = sub.to;
}
return samples;
|
public java.util.List | getSubs()
return subs;
|
public SubSampleInformationBox | getSubsampleInformationBox()
return null;
|
public long[] | getSyncSamples()
return null;
|
public com.googlecode.mp4parser.authoring.TrackMetaData | getTrackMetaData()
return trackMetaData;
|