ExportResult.Builder
public final class ExportResult.Builder
A builder for ExportResult instances.
Summary
Public constructors |
|---|
Builder()Creates a builder. |
Public constructors
Public methods
addProcessedInputs
@CanIgnoreReturnValue
public ExportResult.Builder addProcessedInputs(List<ExportResult.ProcessedInput> processedInputs)
Adds processed inputs to the ProcessedInput list.
setApproximateDurationMs
@CanIgnoreReturnValue
public ExportResult.Builder setApproximateDurationMs(long approximateDurationMs)
Sets the approximate duration of the output in milliseconds.
Must be positive or TIME_UNSET.
setAudioEncoderName
@CanIgnoreReturnValue
public ExportResult.Builder setAudioEncoderName(@Nullable String audioEncoderName)
Sets the name of the audio encoder used.
setAudioMimeType
@CanIgnoreReturnValue
public ExportResult.Builder setAudioMimeType(@Nullable String audioMimeType)
Sets the output audio mime type.
setAverageAudioBitrate
@CanIgnoreReturnValue
public ExportResult.Builder setAverageAudioBitrate(int averageAudioBitrate)
Sets the average audio bitrate.
Must be positive or RATE_UNSET_INT.
setAverageVideoBitrate
@CanIgnoreReturnValue
public ExportResult.Builder setAverageVideoBitrate(int averageVideoBitrate)
Sets the average video bitrate.
Must be positive or RATE_UNSET_INT.
setChannelCount
@CanIgnoreReturnValue
public ExportResult.Builder setChannelCount(int channelCount)
Sets the channel count.
Must be positive or LENGTH_UNSET.
setColorInfo
@CanIgnoreReturnValue
public ExportResult.Builder setColorInfo(@Nullable ColorInfo colorInfo)
Sets the ColorInfo.
setDurationMs
@InlineMe(replacement = "this.setApproximateDurationMs(durationMs)")
@CanIgnoreReturnValue
public ExportResult.BuildersetDurationMs(long durationMs)
setExportException
@CanIgnoreReturnValue
public ExportResult.Builder setExportException(@Nullable ExportException exportException)
Sets the ExportException that caused the export to fail.
setFileSizeBytes
@CanIgnoreReturnValue
public ExportResult.Builder setFileSizeBytes(long fileSizeBytes)
Sets the file size in bytes.
Must be positive or LENGTH_UNSET.
setHeight
@CanIgnoreReturnValue
public ExportResult.Builder setHeight(int height)
Sets the height.
Must be positive or LENGTH_UNSET.
setOptimizationResult
@CanIgnoreReturnValue
public ExportResult.Builder setOptimizationResult(int optimizationResult)
Sets OptimizationResult to indicate an optimization as been successful, or has failed and normal export proceeded instead.
The default value is OPTIMIZATION_NONE.
| Parameters | |
|---|---|
int optimizationResult |
The |
| Returns | |
|---|---|
ExportResult.Builder |
This |
setSampleRate
@CanIgnoreReturnValue
public ExportResult.Builder setSampleRate(int sampleRate)
Sets the sample rate.
Must be positive or RATE_UNSET_INT.
setVideoEncoderName
@CanIgnoreReturnValue
public ExportResult.Builder setVideoEncoderName(@Nullable String videoEncoderName)
Sets the name of the video encoder used.
setVideoFrameCount
@CanIgnoreReturnValue
public ExportResult.Builder setVideoFrameCount(int videoFrameCount)
Sets the number of video frames.
Must be positive or 0.
setVideoMimeType
@CanIgnoreReturnValue
public ExportResult.Builder setVideoMimeType(@Nullable String videoMimeType)
Sets the output video mime type.
setWidth
@CanIgnoreReturnValue
public ExportResult.Builder setWidth(int width)
Sets the width.
Must be positive or LENGTH_UNSET.