MediaParserUtil


@UnstableApi
class MediaParserUtil


Miscellaneous constants and utility methods related to the MediaParser integration.

For documentation on constants, please see the MediaParser documentation.

Summary

Constants

const String!
PARAMETER_EAGERLY_EXPOSE_TRACK_TYPE = "android.media.mediaparser.eagerlyExposeTrackType"
const String!
PARAMETER_EXPOSE_CAPTION_FORMATS = "android.media.mediaParser.exposeCaptionFormats"
const String!
PARAMETER_EXPOSE_CHUNK_INDEX_AS_MEDIA_FORMAT = "android.media.mediaParser.exposeChunkIndexAsMediaFormat"
const String!
PARAMETER_EXPOSE_DUMMY_SEEK_MAP = "android.media.mediaparser.exposeDummySeekMap"
const String!
PARAMETER_IGNORE_TIMESTAMP_OFFSET = "android.media.mediaparser.ignoreTimestampOffset"
const String!
PARAMETER_INCLUDE_SUPPLEMENTAL_DATA = "android.media.mediaparser.includeSupplementalData"
const String!
PARAMETER_IN_BAND_CRYPTO_INFO = "android.media.mediaparser.inBandCryptoInfo"
const String!
PARAMETER_OVERRIDE_IN_BAND_CAPTION_DECLARATIONS = "android.media.mediaParser.overrideInBandCaptionDeclarations"

Public functions

java-static Unit
@RequiresApi(value = 31)
setLogSessionIdOnMediaParser(
    mediaParser: MediaParser!,
    playerId: PlayerId!
)

Calls setLogSessionId.

java-static MediaFormat!

Returns a MediaFormat with equivalent KEY_MIME and KEY_CAPTION_SERVICE_NUMBER to the given Format.

Constants

PARAMETER_EAGERLY_EXPOSE_TRACK_TYPE

const val PARAMETER_EAGERLY_EXPOSE_TRACK_TYPE = "android.media.mediaparser.eagerlyExposeTrackType": String!

PARAMETER_EXPOSE_CAPTION_FORMATS

const val PARAMETER_EXPOSE_CAPTION_FORMATS = "android.media.mediaParser.exposeCaptionFormats": String!

PARAMETER_EXPOSE_CHUNK_INDEX_AS_MEDIA_FORMAT

const val PARAMETER_EXPOSE_CHUNK_INDEX_AS_MEDIA_FORMAT = "android.media.mediaParser.exposeChunkIndexAsMediaFormat": String!

PARAMETER_EXPOSE_DUMMY_SEEK_MAP

const val PARAMETER_EXPOSE_DUMMY_SEEK_MAP = "android.media.mediaparser.exposeDummySeekMap": String!

PARAMETER_IGNORE_TIMESTAMP_OFFSET

const val PARAMETER_IGNORE_TIMESTAMP_OFFSET = "android.media.mediaparser.ignoreTimestampOffset": String!

PARAMETER_INCLUDE_SUPPLEMENTAL_DATA

const val PARAMETER_INCLUDE_SUPPLEMENTAL_DATA = "android.media.mediaparser.includeSupplementalData": String!

PARAMETER_IN_BAND_CRYPTO_INFO

const val PARAMETER_IN_BAND_CRYPTO_INFO = "android.media.mediaparser.inBandCryptoInfo": String!

PARAMETER_OVERRIDE_IN_BAND_CAPTION_DECLARATIONS

const val PARAMETER_OVERRIDE_IN_BAND_CAPTION_DECLARATIONS = "android.media.mediaParser.overrideInBandCaptionDeclarations": String!

Public functions

setLogSessionIdOnMediaParser

@RequiresApi(value = 31)
java-static fun setLogSessionIdOnMediaParser(
    mediaParser: MediaParser!,
    playerId: PlayerId!
): Unit

Calls setLogSessionId.

Parameters
mediaParser: MediaParser!

The MediaParser to call the method on.

playerId: PlayerId!

The PlayerId to obtain the LogSessionId from.

toCaptionsMediaFormat

java-static fun toCaptionsMediaFormat(format: Format!): MediaFormat!

Returns a MediaFormat with equivalent KEY_MIME and KEY_CAPTION_SERVICE_NUMBER to the given Format.