ExportResult
@UnstableApi
public final class ExportResult
Information about the result of an export.
Summary
Nested types |
|---|
public final class ExportResult.BuilderA builder for |
public final class ExportResult.ProcessedInputAn input entirely or partially processed. |
Constants |
|
|---|---|
static final int |
The output file doesn't contain this track type. |
static final int |
The track was transcoded. |
static final int |
The track was transmuxed. |
static final int |
The track was both transcoded and transmuxed. |
static final int |
|
static final int |
The requested optimization would not improve performance for a reason other than the ones specified above, so it was abandoned. |
static final int |
|
static final int |
The optimization failed because mp4 metadata extraction failed (possibly because the file wasn't an mp4 file). |
static final int |
The optimization failed because the format between the two parts of the media to be put together did not match. |
static final int |
No optimizations were applied since none were requested. |
static final int |
The optimization was successfully applied. |
Public fields |
|
|---|---|
final long |
The approximate duration of the file in milliseconds, or |
final int |
Returns the |
final @Nullable String |
The name of the audio encoder used, or |
final @Nullable String |
The output audio |
final int |
The average bitrate of the audio track data, or |
final int |
The average bitrate of the video track data, or |
final int |
The channel count of the audio, or |
final @Nullable ColorInfo |
The |
final long |
This field is deprecated. Use |
final @Nullable ExportException |
The |
final long |
The size of the file in bytes, or |
final int |
The height of the video, or |
final int |
The result of any requested optimizations. |
final int |
The sample rate of the audio, or |
final int |
Returns the |
final @Nullable String |
The name of the video encoder used, or |
final int |
The number of video frames. |
final @Nullable String |
The output video |
final int |
The width of the video, or |
Constants
CONVERSION_PROCESS_NA
public static final int CONVERSION_PROCESS_NA = 0
The output file doesn't contain this track type.
CONVERSION_PROCESS_TRANSCODED
public static final int CONVERSION_PROCESS_TRANSCODED = 1
The track was transcoded.
CONVERSION_PROCESS_TRANSMUXED
public static final int CONVERSION_PROCESS_TRANSMUXED = 2
The track was transmuxed.
CONVERSION_PROCESS_TRANSMUXED_AND_TRANSCODED
public static final int CONVERSION_PROCESS_TRANSMUXED_AND_TRANSCODED = 3
The track was both transcoded and transmuxed.
OPTIMIZATION_ABANDONED_KEYFRAME_PLACEMENT_OPTIMAL_FOR_TRIM
public static final int OPTIMIZATION_ABANDONED_KEYFRAME_PLACEMENT_OPTIMAL_FOR_TRIM = 2
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
public static final int OPTIMIZATION_ABANDONED_OTHER = 4
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
public static final int OPTIMIZATION_ABANDONED_TRIM_AND_TRANSCODING_TRANSFORMATION_REQUESTED = 3
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
public static final int OPTIMIZATION_FAILED_EXTRACTION_FAILED = 5
The optimization failed because mp4 metadata extraction failed (possibly because the file wasn't an mp4 file). Normal export proceeded.
OPTIMIZATION_FAILED_FORMAT_MISMATCH
public static final int OPTIMIZATION_FAILED_FORMAT_MISMATCH = 6
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
public static final int OPTIMIZATION_NONE = 0
No optimizations were applied since none were requested.
OPTIMIZATION_SUCCEEDED
public static final int OPTIMIZATION_SUCCEEDED = 1
The optimization was successfully applied.
Public fields
approximateDurationMs
public final long approximateDurationMs
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
public final int audioConversionProcess
Returns the ConversionProcess taken to create the audio track in the output file.
audioEncoderName
public final @Nullable String audioEncoderName
The name of the audio encoder used, or null if none were used.
audioMimeType
public final @Nullable String audioMimeType
The output audio mime type, or null if unset or unknown.
averageAudioBitrate
public final int averageAudioBitrate
The average bitrate of the audio track data, or RATE_UNSET_INT if unset or unknown.
averageVideoBitrate
public final int averageVideoBitrate
The average bitrate of the video track data, or RATE_UNSET_INT if unset or unknown.
channelCount
public final int channelCount
The channel count of the audio, or LENGTH_UNSET if unset or unknown.
colorInfo
public final @Nullable ColorInfo colorInfo
The ColorInfo of the video, or null if unset or unknown.
exportException
public final @Nullable ExportException exportException
The ExportException that caused the export to fail, or null if the export was a success.
fileSizeBytes
public final long fileSizeBytes
The size of the file in bytes, or LENGTH_UNSET if unset or unknown.
sampleRate
public final int sampleRate
The sample rate of the audio, or RATE_UNSET_INT if unset or unknown.
videoConversionProcess
public final int videoConversionProcess
Returns the ConversionProcess taken to create the video track in the output file.
videoEncoderName
public final @Nullable String videoEncoderName
The name of the video encoder used, or null if none were used.
videoMimeType
public final @Nullable String videoMimeType
The output video mime type, or null if unset or unknown.