public class MetadataBlockDataSeekTable extends Object implements MetadataBlockData
This is an optional block for storing seek points. It is possible to seek to any given sample in a FLAC stream without a seek table, but the delay can be unpredictable since the bitrate may vary widely within a stream. By adding seek points to a stream, this delay can be significantly reduced. Each seek point takes 18 bytes, so 1% resolution within a stream adds less than 2k. There can be only one SEEKTABLE in a stream, but the table can have any number of seek points. There is also a special 'placeholder' seekpoint which will be ignored by decoders but which can be used to reserve space for future seek point insertion. SEEKPOINT <64> Sample number of first sample in the target frame, or 0xFFFFFFFFFFFFFFFF for a placeholder point. <64> Offset (in bytes) from the first byte of the first frame header to the first byte of the target frame's header. <16> Number of samples in the target frame. NOTES For placeholder points, the second and third field values are undefined. Seek points within a table must be sorted in ascending order by sample number. Seek points within a table must be unique by sample number, with the exception of placeholder points. The previous two notes imply that there may be any number of placeholder points, but they must all occur at the end of the table.
Constructor and Description |
---|
MetadataBlockDataSeekTable(MetadataBlockHeader header,
FileChannel fc) |
public MetadataBlockDataSeekTable(MetadataBlockHeader header, FileChannel fc) throws IOException
IOException
public ByteBuffer getBytes()
getBytes
in interface MetadataBlockData
public int getLength()
getLength
in interface MetadataBlockData
Copyright © 2005–2020 jthink.net. All rights reserved.