ExperimentalFrameExtractor.Configuration.Builder


public final class ExperimentalFrameExtractor.Configuration.Builder


A builder for Configuration instances.

Summary

Public constructors

Creates a new instance with default values.

Public methods

ExperimentalFrameExtractor.Configuration

Builds a new Configuration instance.

ExperimentalFrameExtractor.Configuration.Builder
@CanIgnoreReturnValue
@RequiresApi(value = 34)
setExtractHdrFrames(boolean extractHdrFrames)

Sets whether HDR bitmap should be extracted from HDR videos.

ExperimentalFrameExtractor.Configuration.Builder

Sets the selector of MediaCodec instances.

ExperimentalFrameExtractor.Configuration.Builder

Sets the parameters that control how seek operations are performed.

Public constructors

Builder

public Builder()

Creates a new instance with default values.

Public methods

build

public ExperimentalFrameExtractor.Configuration build()

Builds a new Configuration instance.

setExtractHdrFrames

@CanIgnoreReturnValue
@RequiresApi(value = 34)
public ExperimentalFrameExtractor.Configuration.Builder setExtractHdrFrames(boolean extractHdrFrames)

Sets whether HDR bitmap should be extracted from HDR videos.

When set to false, extracted HDR frames will be tone-mapped to BT709.

When set to true, extracted HDR frames will have RGBA_1010102 and BT2020_HLG. Extracting HDR frames is only supported on API 34+.

This flag has no effect when the input is SDR.

Defaults to false.

Parameters
boolean extractHdrFrames

Whether HDR frames should be returned.

setMediaCodecSelector

@CanIgnoreReturnValue
public ExperimentalFrameExtractor.Configuration.Builder setMediaCodecSelector(MediaCodecSelector mediaCodecSelector)

Sets the selector of MediaCodec instances. Defaults to PREFER_SOFTWARE.

Parameters
MediaCodecSelector mediaCodecSelector

The MediaCodecSelector.

setSeekParameters

@CanIgnoreReturnValue
public ExperimentalFrameExtractor.Configuration.Builder setSeekParameters(SeekParameters seekParameters)

Sets the parameters that control how seek operations are performed. Defaults to DEFAULT.

Parameters
SeekParameters seekParameters

The SeekParameters.