Sniffer
@UnstableApi
class Sniffer
Provides methods that peek data from an ExtractorInput and return whether the input appears to be in MP4 format.
Summary
Constants |
|
|---|---|
const Int |
BRAND_HEIC = 1751476579Brand stored in the ftyp atom for HEIC media. |
const Int |
BRAND_QUICKTIME = 1903435808Brand stored in the ftyp atom for QuickTime media. |
Public functions |
|
|---|---|
java-static SniffFailure? |
sniffFragmented(input: ExtractorInput!)Returns |
java-static SniffFailure? |
sniffUnfragmented(input: ExtractorInput!, acceptHeic: Boolean)Returns |
Constants
BRAND_QUICKTIME
const val BRAND_QUICKTIME = 1903435808: Int
Brand stored in the ftyp atom for QuickTime media.
Public functions
sniffFragmented
java-static fun sniffFragmented(input: ExtractorInput!): SniffFailure?
Returns null if data peeked from the current position in input is consistent with the input being a fragmented MP4 file, otherwise returns a SniffFailure describing the first detected inconsistency..
| Parameters | |
|---|---|
input: ExtractorInput! |
The extractor input from which to peek data. The peek position will be modified. |
| Returns | |
|---|---|
SniffFailure? |
|
| Throws | |
|---|---|
java.io.IOException |
If an error occurs reading from the input. |
sniffUnfragmented
java-static fun sniffUnfragmented(input: ExtractorInput!, acceptHeic: Boolean): SniffFailure?
Returns null if data peeked from the current position in input is consistent with the input being an unfragmented MP4 file, otherwise returns a SniffFailure describing the first detected inconsistency.
| Parameters | |
|---|---|
input: ExtractorInput! |
The extractor input from which to peek data. The peek position will be modified. |
acceptHeic: Boolean |
Whether |
| Returns | |
|---|---|
SniffFailure? |
|
| Throws | |
|---|---|
java.io.IOException |
If an error occurs reading from the input. |