Back to Exoplayer

ExportResult.Builder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/transformer/ExportResult.Builder.html

latest8.2 KB
Original Source

Package com.google.android.exoplayer2.transformer

Class ExportResult.Builder


public static final classExportResult.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

A builder for ExportResult instances.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Builder() | Creates a builder. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | ExportResult | build() | Builds an ExportResult instance. | | ExportResult.Builder | setAudioEncoderName​(String audioEncoderName) | Sets the name of the audio encoder used. | | ExportResult.Builder | setAverageAudioBitrate​(int averageAudioBitrate) | Sets the average audio bitrate. | | ExportResult.Builder | setAverageVideoBitrate​(int averageVideoBitrate) | Sets the average video bitrate. | | ExportResult.Builder | setChannelCount​(int channelCount) | Sets the channel count. | | ExportResult.Builder | setColorInfo​(ColorInfo colorInfo) | Sets the ColorInfo. | | ExportResult.Builder | setDurationMs​(long durationMs) | Sets the duration of the output in milliseconds. | | ExportResult.Builder | setExportException​(ExportException exportException) | Sets the ExportException that caused the export to fail. | | ExportResult.Builder | setFileSizeBytes​(long fileSizeBytes) | Sets the file size in bytes. | | ExportResult.Builder | setHeight​(int height) | Sets the height. | | ExportResult.Builder | setProcessedInputs​(ImmutableList<ExportResult.ProcessedInput> processedInputs) | Sets the processed inputs. | | ExportResult.Builder | setSampleRate​(int sampleRate) | Sets the sample rate. | | ExportResult.Builder | setVideoEncoderName​(String videoEncoderName) | Sets the name of the video encoder used. | | ExportResult.Builder | setVideoFrameCount​(int videoFrameCount) | Sets the number of video frames. | | ExportResult.Builder | setWidth​(int width) | Sets the width. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

Builder

public Builder()

Creates a builder.

Method Detail

- 

setProcessedInputs

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setProcessedInputs​([ImmutableList](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true "class or interface in com.google.common.collect")<[ExportResult.ProcessedInput](ExportResult.ProcessedInput.html "class in com.google.android.exoplayer2.transformer")> processedInputs)

Sets the processed inputs.

- 

setDurationMs

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setDurationMs​(long durationMs)

Sets the duration of the output in milliseconds.

Must be positive or C.TIME_UNSET.

- 

setFileSizeBytes

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setFileSizeBytes​(long fileSizeBytes)

Sets the file size in bytes.

Must be positive or C.LENGTH_UNSET.

- 

setAverageAudioBitrate

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setAverageAudioBitrate​(int averageAudioBitrate)

Sets the average audio bitrate.

Must be positive or C.RATE_UNSET_INT.

- 

setChannelCount

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setChannelCount​(int channelCount)

Sets the channel count.

Must be positive or C.LENGTH_UNSET.

- 

setSampleRate

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setSampleRate​(int sampleRate)

Sets the sample rate.

Must be positive or C.RATE_UNSET_INT.

- 

setAudioEncoderName

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setAudioEncoderName​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")audioEncoderName)

Sets the name of the audio encoder used.

- 

setAverageVideoBitrate

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setAverageVideoBitrate​(int averageVideoBitrate)

Sets the average video bitrate.

Must be positive or C.RATE_UNSET_INT.

- 

setColorInfo

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setColorInfo​(@Nullable[ColorInfo](../video/ColorInfo.html "class in com.google.android.exoplayer2.video")colorInfo)

Sets the ColorInfo.

- 

setHeight

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setHeight​(int height)

Sets the height.

Must be positive or C.LENGTH_UNSET.

- 

setWidth

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setWidth​(int width)

Sets the width.

Must be positive or C.LENGTH_UNSET.

- 

setVideoFrameCount

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setVideoFrameCount​(int videoFrameCount)

Sets the number of video frames.

Must be positive or 0.

- 

setVideoEncoderName

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setVideoEncoderName​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")videoEncoderName)

Sets the name of the video encoder used.

- 

setExportException

@CanIgnoreReturnValue
public[ExportResult.Builder](ExportResult.Builder.html "class in com.google.android.exoplayer2.transformer")setExportException​(@Nullable[ExportException](ExportException.html "class in com.google.android.exoplayer2.transformer")exportException)

Sets the ExportException that caused the export to fail.

- 

build

public[ExportResult](ExportResult.html "class in com.google.android.exoplayer2.transformer")build()

Builds an ExportResult instance.