# BinarySearchSeeker.TimestampSearchResult

# 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)

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult "View this page in Java")


```
class BinarySearchSeeker.TimestampSearchResult
```

<br />

*** ** * ** ***

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

## Summary

|                                                                              ### Constants                                                                               |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[BinarySearchSeeker.TimestampSearchResult](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult)`!` | [NO_TIMESTAMP_IN_RANGE_RESULT](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#NO_TIMESTAMP_IN_RANGE_RESULT())                                                                                  |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                      | [TYPE_NO_TIMESTAMP](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#TYPE_NO_TIMESTAMP())` = -3` The search didn't find any timestamps.                                                          |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                      | [TYPE_POSITION_OVERESTIMATED](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#TYPE_POSITION_OVERESTIMATED())` = -1` The search found only timestamps larger than the target timestamp.          |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                      | [TYPE_POSITION_UNDERESTIMATED](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#TYPE_POSITION_UNDERESTIMATED())` = -2` The search found only timestamps smaller than the target timestamp.       |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                      | [TYPE_TARGET_TIMESTAMP_FOUND](https://developer.android.com/reference/kotlin/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 functions                                                                              |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[BinarySearchSeeker.TimestampSearchResult](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult)`!` | [overestimatedResult](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#overestimatedResult(long,long))`(` ` newCeilingTimestamp: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` newCeilingBytePosition: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) `)` Returns a result to signal that the current position in the input stream overestimates the true position of the target frame, and the [BinarySearchSeeker](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker) should modify its [SeekOperationParams](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.SeekOperationParams)'s ceiling timestamp and byte position using the given values. |
| `java-static `[BinarySearchSeeker.TimestampSearchResult](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult)`!` | [targetFoundResult](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#targetFoundResult(long))`(resultBytePosition: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Returns a result to signal that the target timestamp has been found at ` resultBytePosition`, and the seek operation can stop.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `java-static `[BinarySearchSeeker.TimestampSearchResult](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult)`!` | [underestimatedResult](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.TimestampSearchResult#underestimatedResult(long,long))`(` ` newFloorTimestamp: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` newCeilingBytePosition: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) `)` Returns a result to signal that the current position in the input stream underestimates the true position of the target frame, and the [BinarySearchSeeker](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker) should modify its [SeekOperationParams](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.SeekOperationParams)'s floor timestamp and byte position using the given values.  |

## Constants

### NO_TIMESTAMP_IN_RANGE_RESULT

```
const val NO_TIMESTAMP_IN_RANGE_RESULT: BinarySearchSeeker.TimestampSearchResult!
```  

### TYPE_NO_TIMESTAMP

```
const val TYPE_NO_TIMESTAMP = -3: Int
```

The search didn't find any timestamps.  

### TYPE_POSITION_OVERESTIMATED

```
const val TYPE_POSITION_OVERESTIMATED = -1: Int
```

The search found only timestamps larger than the target timestamp.  

### TYPE_POSITION_UNDERESTIMATED

```
const val TYPE_POSITION_UNDERESTIMATED = -2: Int
```

The search found only timestamps smaller than the target timestamp.  

### TYPE_TARGET_TIMESTAMP_FOUND

```
const val TYPE_TARGET_TIMESTAMP_FOUND = 0: Int
```

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

## Public functions

### overestimatedResult

```
java-static fun overestimatedResult(
    newCeilingTimestamp: Long,
    newCeilingBytePosition: Long
): BinarySearchSeeker.TimestampSearchResult!
```

Returns a result to signal that the current position in the input stream overestimates the true position of the target frame, and the [BinarySearchSeeker](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker) should modify its [SeekOperationParams](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.SeekOperationParams)'s ceiling timestamp and byte position using the given values.  

### targetFoundResult

```
java-static fun targetFoundResult(resultBytePosition: Long): BinarySearchSeeker.TimestampSearchResult!
```

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

### underestimatedResult

```
java-static fun underestimatedResult(
    newFloorTimestamp: Long,
    newCeilingBytePosition: Long
): BinarySearchSeeker.TimestampSearchResult!
```

Returns a result to signal that the current position in the input stream underestimates the true position of the target frame, and the [BinarySearchSeeker](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker) should modify its [SeekOperationParams](https://developer.android.com/reference/kotlin/androidx/media3/extractor/BinarySearchSeeker.SeekOperationParams)'s floor timestamp and byte position using the given values.