ExportResult
@UnstableApi
class ExportResult
Information about the result of an export.
Summary
Nested types |
|---|
class ExportResult.BuilderA builder for |
|
An input entirely or partially processed. |
Constants |
|
|---|---|
const Int |
The output file doesn't contain this track type. |
const Int |
The track was transcoded. |
const Int |
The track was transmuxed. |
const Int |
The track was both transcoded and transmuxed. |
const Int |
|
const Int |
The requested optimization would not improve performance for a reason other than the ones specified above, so it was abandoned. |
const Int |
|
const Int |
The optimization failed because mp4 metadata extraction failed (possibly because the file wasn't an mp4 file). |
const Int |
The optimization failed because the format between the two parts of the media to be put together did not match. |
const Int |
No optimizations were applied since none were requested. |
const Int |
The optimization was successfully applied. |
Public properties |
|
|---|---|
Long |
The approximate duration of the file in milliseconds, or |
Int |
Returns the |
String? |
The name of the audio encoder used, or |
String? |
The output audio |
Int |
The average bitrate of the audio track data, or |
Int |
The average bitrate of the video track data, or |
Int |
The channel count of the audio, or |
ColorInfo? |
The |
Long |
This property is deprecated. Use |
ExportException? |
The |
Long |
The size of the file in bytes, or |
Int |
The height of the video, or |
Int |
The result of any requested optimizations. |
Int |
The sample rate of the audio, or |
Int |
Returns the |
String? |
The name of the video encoder used, or |
Int |
The number of video frames. |
String? |
The output video |
Int |
The width of the video, or |
Constants
CONVERSION_PROCESS_NA
const val CONVERSION_PROCESS_NA = 0: Int
The output file doesn't contain this track type.
CONVERSION_PROCESS_TRANSCODED
const val CONVERSION_PROCESS_TRANSCODED = 1: Int
The track was transcoded.
CONVERSION_PROCESS_TRANSMUXED
const val CONVERSION_PROCESS_TRANSMUXED = 2: Int
The track was transmuxed.
CONVERSION_PROCESS_TRANSMUXED_AND_TRANSCODED
const val CONVERSION_PROCESS_TRANSMUXED_AND_TRANSCODED = 3: Int
The track was both transcoded and transmuxed.
OPTIMIZATION_ABANDONED_KEYFRAME_PLACEMENT_OPTIMAL_FOR_TRIM
const val OPTIMIZATION_ABANDONED_KEYFRAME_PLACEMENT_OPTIMAL_FOR_TRIM = 2: Int
Trim optimization was requested, but it would not improve performance because of key frame placement. The optimization was abandoned and normal export proceeded.
The trim optimization does not improve performance when the requested startPositionUs is at a key frame, or when there are no key frames between the requested startPositionUs and endPositionUs
OPTIMIZATION_ABANDONED_OTHER
const val OPTIMIZATION_ABANDONED_OTHER = 4: Int
The requested optimization would not improve performance for a reason other than the ones specified above, so it was abandoned. Normal export proceeded.
OPTIMIZATION_ABANDONED_TRIM_AND_TRANSCODING_TRANSFORMATION_REQUESTED
const val OPTIMIZATION_ABANDONED_TRIM_AND_TRANSCODING_TRANSFORMATION_REQUESTED = 3: Int
Trim optimization was requested, but it would not improve performance because another transformation that requires transcoding was also requested. The optimization was abandoned and normal export proceeded.
OPTIMIZATION_FAILED_EXTRACTION_FAILED
const val OPTIMIZATION_FAILED_EXTRACTION_FAILED = 5: Int
The optimization failed because mp4 metadata extraction failed (possibly because the file wasn't an mp4 file). Normal export proceeded.
OPTIMIZATION_FAILED_FORMAT_MISMATCH
const val OPTIMIZATION_FAILED_FORMAT_MISMATCH = 6: Int
The optimization failed because the format between the two parts of the media to be put together did not match. Normal export proceeded.
OPTIMIZATION_NONE
const val OPTIMIZATION_NONE = 0: Int
No optimizations were applied since none were requested.
OPTIMIZATION_SUCCEEDED
const val OPTIMIZATION_SUCCEEDED = 1: Int
The optimization was successfully applied.
Public functions
Public properties
approximateDurationMs
val approximateDurationMs: Long
The approximate duration of the file in milliseconds, or TIME_UNSET if unset or unknown.
To get the actual duration use
androidx.media3.inspector.MetadataRetriever#retrieveDurationUs.
audioConversionProcess
val audioConversionProcess: Int
Returns the ConversionProcess taken to create the audio track in the output file.
audioEncoderName
val audioEncoderName: String?
The name of the audio encoder used, or null if none were used.
averageAudioBitrate
val averageAudioBitrate: Int
The average bitrate of the audio track data, or RATE_UNSET_INT if unset or unknown.
averageVideoBitrate
val averageVideoBitrate: Int
The average bitrate of the video track data, or RATE_UNSET_INT if unset or unknown.
channelCount
val channelCount: Int
The channel count of the audio, or LENGTH_UNSET if unset or unknown.
exportException
val exportException: ExportException?
The ExportException that caused the export to fail, or null if the export was a success.
fileSizeBytes
val fileSizeBytes: Long
The size of the file in bytes, or LENGTH_UNSET if unset or unknown.
videoConversionProcess
val videoConversionProcess: Int
Returns the ConversionProcess taken to create the video track in the output file.
videoEncoderName
val videoEncoderName: String?
The name of the video encoder used, or null if none were used.