BinarySearchSeeker.TimestampSeeker


protected interface BinarySearchSeeker.TimestampSeeker


A seeker that looks for a given timestamp from an input.

Summary

Public functions

Unit

Called when a seek operation finishes.

BinarySearchSeeker.TimestampSearchResult!
searchForTimestamp(input: ExtractorInput!, targetTimestamp: Long)

Searches a limited window of the provided input for a target timestamp.

Public functions

onSeekFinished

fun onSeekFinished(): Unit

Called when a seek operation finishes.

searchForTimestamp

fun searchForTimestamp(input: ExtractorInput!, targetTimestamp: Long): BinarySearchSeeker.TimestampSearchResult!

Searches a limited window of the provided input for a target timestamp. The size of the window is implementation specific, but should be small enough such that it's reasonable for multiple such reads to occur during a seek operation.

Parameters
input: ExtractorInput!

The ExtractorInput from which data should be peeked.

targetTimestamp: Long

The target timestamp.

Returns
BinarySearchSeeker.TimestampSearchResult!

A TimestampSearchResult that describes the result of the search.

Throws
java.io.IOException

If an error occurred reading from the input.