BinarySearchSeeker.SeekOperationParams


protected class BinarySearchSeeker.SeekOperationParams


Contains parameters for a pending seek operation by BinarySearchSeeker.

This class holds parameters for a binary-search for the targetTimePosition in the range [floorPosition, ceilingPosition).

Summary

Protected constructors

SeekOperationParams(
    long seekTimeUs,
    long targetTimePosition,
    long floorTimePosition,
    long ceilingTimePosition,
    long floorBytePosition,
    long ceilingBytePosition,
    long approxBytesPerFrame
)

Protected methods

static long
calculateNextSearchBytePosition(
    long targetTimePosition,
    long floorTimePosition,
    long ceilingTimePosition,
    long floorBytePosition,
    long ceilingBytePosition,
    long approxBytesPerFrame
)

Returns the next position in the stream to search for target frame, given [floorBytePosition, ceilingBytePosition), with corresponding [floorTimePosition, ceilingTimePosition).

Protected constructors

SeekOperationParams

protected SeekOperationParams(
    long seekTimeUs,
    long targetTimePosition,
    long floorTimePosition,
    long ceilingTimePosition,
    long floorBytePosition,
    long ceilingBytePosition,
    long approxBytesPerFrame
)

Protected methods

calculateNextSearchBytePosition

protected static long calculateNextSearchBytePosition(
    long targetTimePosition,
    long floorTimePosition,
    long ceilingTimePosition,
    long floorBytePosition,
    long ceilingBytePosition,
    long approxBytesPerFrame
)

Returns the next position in the stream to search for target frame, given [floorBytePosition, ceilingBytePosition), with corresponding [floorTimePosition, ceilingTimePosition).