Back to Exoplayer

BinarySearchSeeker.TimestampSeeker (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/extractor/BinarySearchSeeker.TimestampSeeker.html

latest2.2 KB
Original Source

Package com.google.android.exoplayer2.extractor

Interface BinarySearchSeeker.TimestampSeeker


protected static interfaceBinarySearchSeeker.TimestampSeeker

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

Method Summary

All Methods Instance Methods Abstract Methods Default Methods | Modifier and Type | Method | Description | | --- | --- | --- | | default void | onSeekFinished() | Called when a seek operation finishes. | | BinarySearchSeeker.TimestampSearchResult | searchForTimestamp​(ExtractorInput input, long targetTimestamp) | Searches a limited window of the provided input for a target timestamp. |

Method Detail

- 

searchForTimestamp

[BinarySearchSeeker.TimestampSearchResult](BinarySearchSeeker.TimestampSearchResult.html "class in com.google.android.exoplayer2.extractor")searchForTimestamp​([ExtractorInput](ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input,
                                                            long targetTimestamp)
                                                     throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")

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 - The ExtractorInput from which data should be peeked.targetTimestamp - The target timestamp.Returns:A BinarySearchSeeker.TimestampSearchResult that describes the result of the search.Throws:IOException - If an error occurred reading from the input.

- 

onSeekFinished

default void onSeekFinished()

Called when a seek operation finishes.