ExperimentalFrameExtractor
@UnstableApi
public final class ExperimentalFrameExtractor
Summary
Nested types |
|---|
public final class ExperimentalFrameExtractor.ConfigurationConfiguration for the frame extractor. |
public final class ExperimentalFrameExtractor.Configuration.BuilderA builder for |
public final class ExperimentalFrameExtractor.FrameStores an extracted and decoded video frame. |
Public constructors |
|---|
Creates an instance. |
Public methods |
|
|---|---|
ListenableFuture<ExperimentalFrameExtractor.Frame> |
Extracts a representative |
ListenableFuture<ExperimentalFrameExtractor.Frame> |
Extracts a representative |
void |
Releases the underlying resources. |
void |
Sets a new |
Public constructors
ExperimentalFrameExtractor
publicExperimentalFrameExtractor(
Context context,
ExperimentalFrameExtractor.Configuration configuration
)
Creates an instance.
| Parameters | |
|---|---|
Context context |
|
ExperimentalFrameExtractor.Configuration configuration |
The |
Public methods
getFrame
public ListenableFuture<ExperimentalFrameExtractor.Frame>getFrame(long positionMs)
Extracts a representative Frame for the specified video position using the SeekParameters specified in the Configuration.
| Parameters | |
|---|---|
long positionMs |
The time position in the |
| Returns | |
|---|---|
ListenableFuture<ExperimentalFrameExtractor.Frame> |
A |
getFrame
public ListenableFuture<ExperimentalFrameExtractor.Frame>getFrame(long positionMs, SeekParameters seekParameters)
Extracts a representative Frame for the specified video position using the requested SeekParameters.
| Parameters | |
|---|---|
long positionMs |
The time position in the |
SeekParameters seekParameters |
The |
| Returns | |
|---|---|
ListenableFuture<ExperimentalFrameExtractor.Frame> |
A |
release
public void release()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
public voidsetMediaItem(MediaItem mediaItem, List<Effect> effects)
Sets a new MediaItem.
Changing between SDR and HDR MediaItems is not supported when extractHdrFrames is true.