ExperimentalFrameExtractor


@UnstableApi
class ExperimentalFrameExtractor


Summary

Nested types

Configuration for the frame extractor.

A builder for Configuration instances.

Stores an extracted and decoded video frame.

Public constructors

Creates an instance.

Public functions

ListenableFuture<ExperimentalFrameExtractor.Frame!>!
getFrame(positionMs: Long)

Extracts a representative Frame for the specified video position using the SeekParameters specified in the Configuration.

ListenableFuture<ExperimentalFrameExtractor.Frame!>!
getFrame(positionMs: Long, seekParameters: SeekParameters!)

Extracts a representative Frame for the specified video position using the requested SeekParameters.

Unit

Releases the underlying resources.

Unit
setMediaItem(mediaItem: MediaItem!, effects: (Mutable)List<Effect!>!)

Sets a new MediaItem.

Public constructors

ExperimentalFrameExtractor

ExperimentalFrameExtractor(
    context: Context!,
    configuration: ExperimentalFrameExtractor.Configuration!
)

Creates an instance.

Parameters
context: Context!

Context.

configuration: ExperimentalFrameExtractor.Configuration!

The Configuration for this frame extractor.

Public functions

getFrame

fun getFrame(positionMs: Long): ListenableFuture<ExperimentalFrameExtractor.Frame!>!

Extracts a representative Frame for the specified video position using the SeekParameters specified in the Configuration.

Parameters
positionMs: Long

The time position in the MediaItem for which a frame is extracted, in milliseconds.

getFrame

fun getFrame(positionMs: Long, seekParameters: SeekParameters!): ListenableFuture<ExperimentalFrameExtractor.Frame!>!

Extracts a representative Frame for the specified video position using the requested SeekParameters.

Parameters
positionMs: Long

The time position in the MediaItem for which a frame is extracted, in milliseconds.

seekParameters: SeekParameters!

The SeekParameters.

release

fun release(): Unit

Releases the underlying resources. This method must be called when the frame extractor is no longer required. The frame extractor must not be used after calling this method.

setMediaItem

fun setMediaItem(mediaItem: MediaItem!, effects: (Mutable)List<Effect!>!): Unit

Sets a new MediaItem.

Changing between SDR and HDR MediaItems is not supported when extractHdrFrames is true.

Parameters
mediaItem: MediaItem!

The MediaItem from which frames will be extracted.

effects: (Mutable)List<Effect!>!

The List of video effects to apply to the extracted video frames.