MediaFormat
class MediaFormat
An immutable Parcelable object that can be used describe the format of media stream.
This is a derivative of the media format class in ExoPlayer 1 SDK.
Author
rsubramaniam
Properties
Link copied to clipboard
The number of audio channels, or NO_VALUE if unknown or not applicable.
Link copied to clipboard
The duration in microseconds, or UNKNOWN_TIME_US if the duration is unknown, or MATCH_LONGEST_US if the duration should match the duration of the longest track whose duration is known.
Link copied to clipboard
The number of samples to trim from the start of the decoded audio stream.
Link copied to clipboard
The number of samples to trim from the end of the decoded audio stream.
Link copied to clipboard
Initialization data that must be provided to the decoder.
Link copied to clipboard
The maximum size of a buffer of data (typically one sample) in the format, or NO_VALUE if unknown or not applicable.
Link copied to clipboard
Empty initialization data.
Link copied to clipboard
A value for subSampleOffsetUs to indicate that sub-sample timestamps are relative to the timestamps of their parent samples.
Link copied to clipboard
The encoding for PCM audio streams.
Link copied to clipboard
The width to height ratio of pixels in the video, or NO_VALUE if unknown or not applicable.
Link copied to clipboard
The projection data for 360/VR video, or null if not applicable.
Link copied to clipboard
The clockwise rotation that should be applied to the video for it to be rendered in the correct orientation, or NO_VALUE if unknown or not applicable.
Link copied to clipboard
The audio sampling rate in Hz, or NO_VALUE if unknown or not applicable.
Link copied to clipboard
The stereo layout for 360/3D/VR video, or NO_VALUE if not applicable.
Link copied to clipboard
For samples that contain sub-samples, this is an offset that should be added to sub-sample timestamps.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun copyWithFixedTrackInfo(trackId: String, bitrate: Int, width: Int, height: Int, language: String): MediaFormat
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun createFormatForMimeType(trackId: String, mimeType: String, bitrate: Int, durationUs: Long): MediaFormat
Link copied to clipboard
Link copied to clipboard
open fun createImageFormat(trackId: String, mimeType: String, bitrate: Int, durationUs: Long, initializationData: List<Array<Byte>>, language: String): MediaFormat
Link copied to clipboard
open fun createTextFormat(trackId: String, mimeType: String, bitrate: Int, durationUs: Long, language: String): MediaFormat
open fun createTextFormat(trackId: String, mimeType: String, bitrate: Int, durationUs: Long, language: String, subSampleOffsetUs: Long): MediaFormat
Link copied to clipboard
open fun createVideoFormat(trackId: String, mimeType: String, bitrate: Int, maxInputSize: Int, durationUs: Long, width: Int, height: Int, initializationData: List<Array<Byte>>): MediaFormat
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard