MediaProjectionAssetLoader


@UnstableApi
public final class MediaProjectionAssetLoader implements AssetLoader


Asset loader that provides video from MediaProjection.

Summary

Nested types

Factory for MediaProjectionAssetLoader instances.

Public methods

ImmutableMap<IntegerString>

Return the used decoders' names.

int

Returns the current Transformer.ProgressState and updates progressHolder with the current progress if it is available.

void

Stops loading data and releases all resources associated with the asset loader.

void

Starts the asset loader.

Inherited Constants

From androidx.media3.transformer.AssetLoader
static final int

Indicates that the asset loader can output decoded samples.

static final int

Indicates that the asset loader can output encoded samples.

Public methods

getDecoderNames

public ImmutableMap<IntegerStringgetDecoderNames()

Return the used decoders' names.

Returns
ImmutableMap<IntegerString>

The decoders' names keyed by track type.

getProgress

@Transformer.ProgressState
public int getProgress(ProgressHolder progressHolder)

Returns the current Transformer.ProgressState and updates progressHolder with the current progress if it is available.

Parameters
ProgressHolder progressHolder

A ProgressHolder, updated to hold the percentage progress if available.

Returns
int

The Transformer.ProgressState.

release

public void release()

Stops loading data and releases all resources associated with the asset loader.

start

public void start()

Starts the asset loader.