Builder
class Builder
| kotlin.Any | |
| ↳ | android.media.metrics.MediaItemInfo.Builder | 
Builder for MediaItemInfo.
Summary
| Public constructors | |
|---|---|
            Builder()Creates a new builder.  | 
        |
| Public methods | |
|---|---|
| MediaItemInfo.Builder | 
            addCodecName(codecName: String)Adds an media codec name that was used as part of decoding/encoding this media item.  | 
        
| MediaItemInfo.Builder | 
            addDataType(dataType: Long)Adds an additional data type represented as part of the media item.  | 
        
| MediaItemInfo.Builder | 
            addSampleMimeType(mimeType: String)Adds a sample MIME type stored in the media container.  | 
        
| MediaItemInfo | 
            build()Builds an instance.  | 
        
| MediaItemInfo.Builder | 
            setAudioChannelCount(audioChannelCount: Int)Sets the number of audio channels.  | 
        
| MediaItemInfo.Builder | 
            setAudioSampleCount(audioSampleCount: Long)Sets the number of audio frames in the item, after clipping (if applicable).  | 
        
| MediaItemInfo.Builder | 
            setAudioSampleRateHz(audioSampleRateHz: Int)Sets the sample rate of audio, in Hertz.  | 
        
| MediaItemInfo.Builder | 
            setClipDurationMillis(clipDurationMillis: Long)Sets the duration of the clip taken from the media item, in milliseconds.  | 
        
| MediaItemInfo.Builder | 
            setContainerMimeType(containerMimeType: String)Sets the MIME type of the media container.  | 
        
| MediaItemInfo.Builder | 
            setDurationMillis(durationMillis: Long)Sets the duration of the media item, in milliseconds.  | 
        
| MediaItemInfo.Builder | 
            setSourceType(sourceType: Int)Sets where the media item came from.  | 
        
| MediaItemInfo.Builder | 
            setVideoDataSpace(videoDataSpace: Int)Sets the   | 
        
| MediaItemInfo.Builder | 
            setVideoFrameRate(videoFrameRate: Float)Sets the average video frame rate, in frames per second.  | 
        
| MediaItemInfo.Builder | 
            setVideoSampleCount(videoSampleCount: Long)Sets the number of video frames, after clipping (if applicable).  | 
        
| MediaItemInfo.Builder | 
            setVideoSize(videoSize: Size)Sets the video size, in pixels.  | 
        
Public constructors
Public methods
addCodecName
fun addCodecName(codecName: String): MediaItemInfo.Builder
Adds an media codec name that was used as part of decoding/encoding this media item.
| Parameters | |
|---|---|
codecName | 
            String: This value cannot be null. | 
          
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
addDataType
fun addDataType(dataType: Long): MediaItemInfo.Builder
Adds an additional data type represented as part of the media item.
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
addSampleMimeType
fun addSampleMimeType(mimeType: String): MediaItemInfo.Builder
Adds a sample MIME type stored in the media container.
| Parameters | |
|---|---|
mimeType | 
            String: This value cannot be null. | 
          
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
build
fun build(): MediaItemInfo
Builds an instance.
| Return | |
|---|---|
MediaItemInfo | 
            This value cannot be null. | 
          
setAudioChannelCount
fun setAudioChannelCount(audioChannelCount: Int): MediaItemInfo.Builder
Sets the number of audio channels.
| Parameters | |
|---|---|
audioChannelCount | 
            Int: Value is 0 or greater | 
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
setAudioSampleCount
fun setAudioSampleCount(audioSampleCount: Long): MediaItemInfo.Builder
Sets the number of audio frames in the item, after clipping (if applicable).
| Parameters | |
|---|---|
audioSampleCount | 
            Long: Value is 0 or greater | 
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
setAudioSampleRateHz
fun setAudioSampleRateHz(audioSampleRateHz: Int): MediaItemInfo.Builder
Sets the sample rate of audio, in Hertz.
| Parameters | |
|---|---|
audioSampleRateHz | 
            Int: Value is 0 or greater | 
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
setClipDurationMillis
fun setClipDurationMillis(clipDurationMillis: Long): MediaItemInfo.Builder
Sets the duration of the clip taken from the media item, in milliseconds.
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
setContainerMimeType
fun setContainerMimeType(containerMimeType: String): MediaItemInfo.Builder
Sets the MIME type of the media container.
| Parameters | |
|---|---|
containerMimeType | 
            String: This value cannot be null. | 
          
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
setDurationMillis
fun setDurationMillis(durationMillis: Long): MediaItemInfo.Builder
Sets the duration of the media item, in milliseconds.
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
setSourceType
fun setSourceType(sourceType: Int): MediaItemInfo.Builder
Sets where the media item came from.
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
setVideoDataSpace
fun setVideoDataSpace(videoDataSpace: Int): MediaItemInfo.Builder
Sets the DataSpace of video frames.
| Parameters | |
|---|---|
videoDataSpace | 
            Int: The data space, returned by DataSpace.pack(int, int, int). | 
          
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
setVideoFrameRate
fun setVideoFrameRate(videoFrameRate: Float): MediaItemInfo.Builder
Sets the average video frame rate, in frames per second.
| Parameters | |
|---|---|
videoFrameRate | 
            Float: Value is 0.0f or greater | 
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
setVideoSampleCount
fun setVideoSampleCount(videoSampleCount: Long): MediaItemInfo.Builder
Sets the number of video frames, after clipping (if applicable).
| Parameters | |
|---|---|
videoSampleCount | 
            Long: Value is 0 or greater | 
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. | 
          
setVideoSize
fun setVideoSize(videoSize: Size): MediaItemInfo.Builder
Sets the video size, in pixels.
| Parameters | |
|---|---|
videoSize | 
            Size: This value cannot be null. | 
          
| Return | |
|---|---|
MediaItemInfo.Builder | 
            This value cannot be null. |