public final class

BinarySearchSeeker.TimestampSearchResult

extends java.lang.Object

 java.lang.Object

↳androidx.media3.extractor.BinarySearchSeeker.TimestampSearchResult

Overview

Represents possible search results for BinarySearchSeeker.TimestampSeeker.searchForTimestamp(ExtractorInput, long).

Summary

Fields
public static final BinarySearchSeeker.TimestampSearchResultNO_TIMESTAMP_IN_RANGE_RESULT

public static final intTYPE_NO_TIMESTAMP

The search didn't find any timestamps.

public static final intTYPE_POSITION_OVERESTIMATED

The search found only timestamps larger than the target timestamp.

public static final intTYPE_POSITION_UNDERESTIMATED

The search found only timestamps smaller than the target timestamp.

public static final intTYPE_TARGET_TIMESTAMP_FOUND

The search found a timestamp that it deems close enough to the given target.

Methods
public static BinarySearchSeeker.TimestampSearchResultoverestimatedResult(long newCeilingTimestamp, long newCeilingBytePosition)

Returns a result to signal that the current position in the input stream overestimates the true position of the target frame, and the BinarySearchSeeker should modify its BinarySearchSeeker.SeekOperationParams's ceiling timestamp and byte position using the given values.

public static BinarySearchSeeker.TimestampSearchResulttargetFoundResult(long resultBytePosition)

Returns a result to signal that the target timestamp has been found at resultBytePosition, and the seek operation can stop.

public static BinarySearchSeeker.TimestampSearchResultunderestimatedResult(long newFloorTimestamp, long newCeilingBytePosition)

Returns a result to signal that the current position in the input stream underestimates the true position of the target frame, and the BinarySearchSeeker should modify its BinarySearchSeeker.SeekOperationParams's floor timestamp and byte position using the given values.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int TYPE_TARGET_TIMESTAMP_FOUND

The search found a timestamp that it deems close enough to the given target.

public static final int TYPE_POSITION_OVERESTIMATED

The search found only timestamps larger than the target timestamp.

public static final int TYPE_POSITION_UNDERESTIMATED

The search found only timestamps smaller than the target timestamp.

public static final int TYPE_NO_TIMESTAMP

The search didn't find any timestamps.

public static final BinarySearchSeeker.TimestampSearchResult NO_TIMESTAMP_IN_RANGE_RESULT

Methods

public static BinarySearchSeeker.TimestampSearchResult overestimatedResult(long newCeilingTimestamp, long newCeilingBytePosition)

Returns a result to signal that the current position in the input stream overestimates the true position of the target frame, and the BinarySearchSeeker should modify its BinarySearchSeeker.SeekOperationParams's ceiling timestamp and byte position using the given values.

public static BinarySearchSeeker.TimestampSearchResult underestimatedResult(long newFloorTimestamp, long newCeilingBytePosition)

Returns a result to signal that the current position in the input stream underestimates the true position of the target frame, and the BinarySearchSeeker should modify its BinarySearchSeeker.SeekOperationParams's floor timestamp and byte position using the given values.

public static BinarySearchSeeker.TimestampSearchResult targetFoundResult(long resultBytePosition)

Returns a result to signal that the target timestamp has been found at resultBytePosition, and the seek operation can stop.