# AviExtractor

# AviExtractor

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/avi/AviExtractor.java+class:androidx.media3.extractor.avi.AviExtractor)

*** ** * ** ***

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

<br />

```
@UnstableApi
class AviExtractor : Extractor
```

<br />

*** ** * ** ***

Extracts data from the AVI container format.

Spec: https://docs.microsoft.com/en-us/windows/win32/directshow/avi-riff-file-reference.

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                ### Nested types                                                                                                                                                                                                                                                                                                                                                                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[Documented](https://developer.android.com/reference/java/lang/annotation/Documented.html) `@`[Retention](https://developer.android.com/reference/java/lang/annotation/Retention.html)`(value = `[RetentionPolicy.SOURCE](https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE)`)` `@`[Target](https://developer.android.com/reference/java/lang/annotation/Target.html)`(value = `[ElementType.TYPE_USE](https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE)`)` `@`[IntDef](https://developer.android.com/reference/kotlin/androidx/annotation/IntDef)`(flag = true, value = )` `annotation `[AviExtractor.Flags](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor.Flags) Flags controlling the behavior of the extractor. |

|                                    ### Constants                                    |
|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FLAG_EMIT_RAW_SUBTITLE_DATA](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FLAG_EMIT_RAW_SUBTITLE_DATA())` = 1` Flag to use the source subtitle formats without modification. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_AVI_](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_AVI_())` = 541677121`                                                                                       |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_JUNK](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_JUNK())` = 1263424842`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_LIST](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_LIST())` = 1414744396`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_RIFF](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_RIFF())` = 1179011410`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_auds](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_auds())` = 1935963489`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_avih](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_avih())` = 1751742049`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_hdrl](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_hdrl())` = 1819436136`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_idx1](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_idx1())` = 829973609`                                                                                       |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_movi](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_movi())` = 1769369453`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_strf](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_strf())` = 1718776947`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_strh](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_strh())` = 1752331379`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_strl](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_strl())` = 1819440243`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_strn](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_strn())` = 1852994675`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_txts](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_txts())` = 1937012852`                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FOURCC_vids](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#FOURCC_vids())` = 1935960438`                                                                                      |

|                                                                                                                                                                                                                                                                                         ### Public constructors                                                                                                                                                                                                                                                                                         |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ~~[AviExtractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#AviExtractor())~~`()` **This function is deprecated.** Use[AviExtractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#AviExtractor(int,androidx.media3.extractor.text.SubtitleParser.Factory))instead. <br />                                                                                                                                                                                                                                   |
| [AviExtractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#AviExtractor(int,androidx.media3.extractor.text.SubtitleParser.Factory))`(` ` @`[AviExtractor.Flags](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor.Flags)` extractorFlags: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` subtitleParserFactory: `[SubtitleParser.Factory](https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory)`!` `)` Constructs an instance. |

|                                ### Public functions                                 |
|-------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [init](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#init(androidx.media3.extractor.ExtractorOutput))`(output: `[ExtractorOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput)`!)` Initializes the extractor with an[ExtractorOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput).                                                                                                                                                                 |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [read](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder))`(input: `[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)`!, seekPosition: `[PositionHolder](https://developer.android.com/reference/kotlin/androidx/media3/extractor/PositionHolder)`!)` Extracts data read from a provided[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput). |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [release](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#release())`()` Releases all kept resources.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [seek](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#seek(long,long))`(position: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`, timeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Notifies the extractor that a seek has occurred.                                                                                                                                                                                                                                  |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [sniff](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#sniff(androidx.media3.extractor.ExtractorInput))`(input: `[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)`!)` Returns whether this extractor can extract samples from the[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput), which must provide data from the start of the stream.                                                                                     |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ### Inherited Constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.media3.extractor.Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor) |-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [RESULT_CONTINUE](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_CONTINUE())` = 0` Returned by[read](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder))if the[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)passed to the next[read](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder))is required to provide data continuing from the position in the stream reached by the returning call. | | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [RESULT_END_OF_INPUT](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_END_OF_INPUT())` = -1` Returned by[read](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder))if the end of the[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)was reached.                                                                                                                                                                                                                                                                          | | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [RESULT_SEEK](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_SEEK())` = 1` Returned by[read](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder))if the[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)passed to the next[read](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder))is required to provide data starting from a specified position in the stream.                                 | |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.media3.extractor.Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor) |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `(`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[SniffFailure](https://developer.android.com/reference/kotlin/androidx/media3/extractor/SniffFailure)`!>!` | [getSniffFailureDetails](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#getSniffFailureDetails())`()` Returns additional details about the last call to[sniff](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#sniff(androidx.media3.extractor.ExtractorInput)).                                                                                                           | | [Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor)`!`                                                                                                                                                                                                               | `@`[SideEffectFree](https://checkerframework.org/api/org/checkerframework/dataflow/qual/SideEffectFree.html) [getUnderlyingImplementation](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#getUnderlyingImplementation())`()` Returns the 'real'`Extractor`implementation if this is a delegating instance, or` this`if this instance does the extraction directly without delegating (the default behaviour). | |

## Constants

### FLAG_EMIT_RAW_SUBTITLE_DATA

```
const val FLAG_EMIT_RAW_SUBTITLE_DATA = 1: Int
```

Flag to use the source subtitle formats without modification. If unset, subtitles will be transcoded to[APPLICATION_MEDIA3_CUES](https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes#APPLICATION_MEDIA3_CUES())during extraction.  

### FOURCC_AVI_

```
const val FOURCC_AVI_ = 541677121: Int
```  

### FOURCC_JUNK

```
const val FOURCC_JUNK = 1263424842: Int
```  

### FOURCC_LIST

```
const val FOURCC_LIST = 1414744396: Int
```  

### FOURCC_RIFF

```
const val FOURCC_RIFF = 1179011410: Int
```  

### FOURCC_auds

```
const val FOURCC_auds = 1935963489: Int
```  

### FOURCC_avih

```
const val FOURCC_avih = 1751742049: Int
```  

### FOURCC_hdrl

```
const val FOURCC_hdrl = 1819436136: Int
```  

### FOURCC_idx1

```
const val FOURCC_idx1 = 829973609: Int
```  

### FOURCC_movi

```
const val FOURCC_movi = 1769369453: Int
```  

### FOURCC_strf

```
const val FOURCC_strf = 1718776947: Int
```  

### FOURCC_strh

```
const val FOURCC_strh = 1752331379: Int
```  

### FOURCC_strl

```
const val FOURCC_strl = 1819440243: Int
```  

### FOURCC_strn

```
const val FOURCC_strn = 1852994675: Int
```  

### FOURCC_txts

```
const val FOURCC_txts = 1937012852: Int
```  

### FOURCC_vids

```
const val FOURCC_vids = 1935960438: Int
```  

## Public constructors

### AviExtractor

```
[AviExtractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#AviExtractor())()
```
| **This function is deprecated.**   
|
Use[AviExtractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor#AviExtractor(int,androidx.media3.extractor.text.SubtitleParser.Factory))instead.  

### AviExtractor

```
AviExtractor(
    @AviExtractor.Flags extractorFlags: Int,
    subtitleParserFactory: SubtitleParser.Factory!
)
```

Constructs an instance.  

|                                                                                                       Parameters                                                                                                       |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[AviExtractor.Flags](https://developer.android.com/reference/kotlin/androidx/media3/extractor/avi/AviExtractor.Flags)` extractorFlags: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | Flags that control the extractor's behavior.                                                                                                                              |
| `subtitleParserFactory: `[SubtitleParser.Factory](https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory)`!`                                                             | The[SubtitleParser.Factory](https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory)for parsing subtitles during extraction. |

## Public functions

### init

```
fun init(output: ExtractorOutput!): Unit
```

Initializes the extractor with an[ExtractorOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput). Called at most once.  

|                                                        Parameters                                                        |
|--------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `output: `[ExtractorOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput)`!` | An[ExtractorOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput)to receive extracted data. |

### read

```
fun read(input: ExtractorInput!, seekPosition: PositionHolder!): Int
```

Extracts data read from a provided[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput). Must not be called before[init](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#init(androidx.media3.extractor.ExtractorOutput)).

A single call to this method will block until some progress has been made, but will not block for longer than this. Hence each call will consume only a small amount of input data.

In the common case,[RESULT_CONTINUE](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_CONTINUE())is returned to indicate that the[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)passed to the next read is required to provide data continuing from the position in the stream reached by the returning call. If the extractor requires data to be provided from a different position, then that position is set in`seekPosition`and[RESULT_SEEK](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_SEEK())is returned. If the extractor reached the end of the data provided by the[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput), then[RESULT_END_OF_INPUT](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_END_OF_INPUT())is returned.

When this method throws an[IOException](https://developer.android.com/reference/java/io/IOException.html), extraction may continue by providing an[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)with an unchanged[read position](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput#getPosition())to a subsequent call to this method.  

|                                                          Parameters                                                          |
|------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `input: `[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)`!`        | The[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)from which data should be read.                                                     |
| `seekPosition: `[PositionHolder](https://developer.android.com/reference/kotlin/androidx/media3/extractor/PositionHolder)`!` | If[RESULT_SEEK](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_SEEK())is returned, this holder is updated to hold the position of the required data. |

|                                   Returns                                   |
|-----------------------------------------------------------------------------|------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | One of the`RESULT_`values defined in this interface. |

|                                         Throws                                          |
|-----------------------------------------------------------------------------------------|---------------------------------------------------------|
| [java.io.IOException](https://developer.android.com/reference/java/io/IOException.html) | If an error occurred reading from or parsing the input. |

### release

```
fun release(): Unit
```

Releases all kept resources.  

### seek

```
fun seek(position: Long, timeUs: Long): Unit
```

Notifies the extractor that a seek has occurred.

Following a call to this method, the[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)passed to the next invocation of[read](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder))is required to provide data starting from`
position`in the stream. Valid random access positions are the start of the stream and positions that can be obtained from any[SeekMap](https://developer.android.com/reference/kotlin/androidx/media3/extractor/SeekMap)passed to the[ExtractorOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput).  

|                                        Parameters                                         |
|-------------------------------------------------------------------------------------------|-----------------------------------------------------------------|
| `position: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | The byte offset in the stream from which data will be provided. |
| `timeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)   | The seek time in microseconds.                                  |

### sniff

```
fun sniff(input: ExtractorInput!): Boolean
```

Returns whether this extractor can extract samples from the[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput), which must provide data from the start of the stream.

If`true`is returned, the`input`'s reading position may have been modified. Otherwise, only its peek position may have been modified.  

|                                                      Parameters                                                       |
|-----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
| `input: `[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)`!` | The[ExtractorInput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput)from which data should be peeked/read. |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Whether this extractor can read the provided input. |

|                                         Throws                                          |
|-----------------------------------------------------------------------------------------|----------------------------------------------|
| [java.io.IOException](https://developer.android.com/reference/java/io/IOException.html) | If an error occurred reading from the input. |