@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

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 @Nullable String

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

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 ImmutableList<ExportResult.ProcessedInput>

The list of processed inputs.

final int

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

final @Nullable String

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

final int

The number of video frames.

final int

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

Public methods

ExportResult.Builder
boolean
int

Constants

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

audioEncoderName

public final @Nullable String audioEncoderName

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

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.

processedInputs

public final ImmutableList<ExportResult.ProcessedInputprocessedInputs

The list of processed inputs.

sampleRate

public final int sampleRate

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

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.

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()