@UnstableApi
public final class ExportResult


Information about the result of an export.

Summary

Nested types

public final class ExportResult.Builder

A builder for ExportResult instances.

public final class ExportResult.ProcessedInput

An 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

Trim optimization was requested, but it would not improve performance because of key frame placement.

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

Trim optimization was requested, but it would not improve performance because another transformation that requires transcoding was also requested.

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 int

Returns the ConversionProcess taken to create the audio track in the output file.

final @Nullable String

The name of the audio encoder used, or null if none were used.

final @Nullable String

The output audio mime type, or null if unset or unknown.

final int

The average bitrate of the audio track data, or RATE_UNSET_INT if unset or unknown.

final int

The average bitrate of the video track data, or RATE_UNSET_INT if unset or unknown.

final int

The channel count of the audio, or LENGTH_UNSET if unset or unknown.

final @Nullable ColorInfo

The ColorInfo of the video, or null if unset or unknown.

final long

The duration of the file in milliseconds, or TIME_UNSET if unset or unknown.

final @Nullable ExportException

The ExportException that caused the export to fail, or null if the export was a success.

final long

The size of the file in bytes, or LENGTH_UNSET if unset or unknown.

final int

The height of the video, or LENGTH_UNSET if unset or unknown.

final int

The result of any requested optimizations.

final int

The sample rate of the audio, or RATE_UNSET_INT if unset or unknown.

final int

Returns the ConversionProcess taken to create the video track in the output file.

final @Nullable String

The name of the video encoder used, or null if none were used.

final int

The number of video frames.

final @Nullable String

The output video mime type, or null if unset or unknown.

final int

The width of the video, or LENGTH_UNSET if unset or unknown.

Public methods

ExportResult.Builder
boolean
int

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

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.

durationMs

public final long durationMs

The duration of the file in milliseconds, or TIME_UNSET 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.

height

public final int height

The height of the video, or LENGTH_UNSET if unset or unknown.

optimizationResult

public final int optimizationResult

The result of any requested optimizations.

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.

videoFrameCount

public final int videoFrameCount

The number of video frames.

videoMimeType

public final @Nullable String videoMimeType

The output video mime type, or null if unset or unknown.

width

public final int width

The width of the video, or LENGTH_UNSET if unset or unknown.

Public methods

buildUpon

public ExportResult.Builder buildUpon()

equals

public boolean equals(@Nullable Object o)

hashCode

public int hashCode()