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