com.googlecode.mp4parser.authoring.tracks.webvtt.sampleboxes.VTTEmptyCueBox Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isoparser Show documentation
Show all versions of isoparser Show documentation
A generic parser and writer for all ISO 14496 based files (MP4, Quicktime, DCF, PDCF, ...)
package com.googlecode.mp4parser.authoring.tracks.webvtt.sampleboxes;
import com.coremedia.iso.IsoFile;
import com.coremedia.iso.IsoTypeWriter;
import com.mp4parser.streaming.WriteOnlyBox;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.WritableByteChannel;
public class VTTEmptyCueBox extends WriteOnlyBox {
public VTTEmptyCueBox() {
super("vtte");
}
public long getSize() {
return 8;
}
public void getBox(WritableByteChannel writableByteChannel) throws IOException {
ByteBuffer header = ByteBuffer.allocate(8);
IsoTypeWriter.writeUInt32(header, getSize());
header.put(IsoFile.fourCCtoBytes(getType()));
writableByteChannel.write((ByteBuffer) header.rewind());
}
}