# BinarySearchSeeker.TimestampSearchResult

Artifact: [androidx.media3:media3-extractor](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/extractor/BinarySearchSeeker.java+class:androidx.media3.extractor.BinarySearchSeeker.TimestampSearchResult)

*** ** * ** ***


```
public final class BinarySearchSeeker.TimestampSearchResult
```

<br />

*** ** * ** ***

Represents possible search results for `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSeeker#searchForTimestamp(androidx.media3.extractor.ExtractorInput,long)`.

## Summary

| ### Constants |
|---|---|
| `static final https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult` | `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#NO_TIMESTAMP_IN_RANGE_RESULT()` |
| `static final int` | `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#TYPE_NO_TIMESTAMP() = -3` The search didn't find any timestamps. |
| `static final int` | `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#TYPE_POSITION_OVERESTIMATED() = -1` The search found only timestamps larger than the target timestamp. |
| `static final int` | `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#TYPE_POSITION_UNDERESTIMATED() = -2` The search found only timestamps smaller than the target timestamp. |
| `static final int` | `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#TYPE_TARGET_TIMESTAMP_FOUND() = 0` The search found a timestamp that it deems close enough to the given target. |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult` | `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#overestimatedResult(long,long)( 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 `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker` should modify its `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.SeekOperationParams`'s ceiling timestamp and byte position using the given values. |
| `static https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult` | `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#targetFoundResult(long)(long resultBytePosition)` Returns a result to signal that the target timestamp has been found at ` resultBytePosition`, and the seek operation can stop. |
| `static https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult` | `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#underestimatedResult(long,long)( 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 `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker` should modify its `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.SeekOperationParams`'s floor timestamp and byte position using the given values. |

## Constants

### NO_TIMESTAMP_IN_RANGE_RESULT

```
public static final BinarySearchSeeker.TimestampSearchResult NO_TIMESTAMP_IN_RANGE_RESULT
```

### TYPE_NO_TIMESTAMP

```
public static final int TYPE_NO_TIMESTAMP = -3
```

The search didn't find any timestamps.

### TYPE_POSITION_OVERESTIMATED

```
public static final int TYPE_POSITION_OVERESTIMATED = -1
```

The search found only timestamps larger than the target timestamp.

### TYPE_POSITION_UNDERESTIMATED

```
public static final int TYPE_POSITION_UNDERESTIMATED = -2
```

The search found only timestamps smaller than the target timestamp.

### TYPE_TARGET_TIMESTAMP_FOUND

```
public static final int TYPE_TARGET_TIMESTAMP_FOUND = 0
```

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

## Public methods

### overestimatedResult

```
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 `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker` should modify its `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.SeekOperationParams`'s ceiling timestamp and byte position using the given values.

### targetFoundResult

```
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.

### underestimatedResult

```
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 `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker` should modify its `https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.SeekOperationParams`'s floor timestamp and byte position using the given values.