@UnstableApi
class Effects


Effects to apply to a MediaItem or to a Composition.

Summary

Constants

const Effects!

An empty Effects instance.

Public constructors

Effects(
    audioProcessors: (Mutable)List<AudioProcessor!>!,
    videoEffects: (Mutable)List<Effect!>!
)

Creates an instance.

Public functions

java-static Pair<AudioProcessor!, Effect!>!

Creates an interlinked audio processor and video effect that changes the speed to media samples in segments of the input file specified by the given SpeedProvider.

Public properties

ImmutableList<AudioProcessor!>!

The list of audio processors to apply to audio buffers.

ImmutableList<Effect!>!

The list of video effects to apply to each frame.

Constants

EMPTY

const val EMPTYEffects!

An empty Effects instance.

Public constructors

Effects

Effects(
    audioProcessors: (Mutable)List<AudioProcessor!>!,
    videoEffects: (Mutable)List<Effect!>!
)

Creates an instance.

Parameters
audioProcessors: (Mutable)List<AudioProcessor!>!

The audioProcessors.

videoEffects: (Mutable)List<Effect!>!

The videoEffects.

Public functions

createExperimentalSpeedChangingEffect

java-static fun createExperimentalSpeedChangingEffect(speedProvider: SpeedProvider!): Pair<AudioProcessor!, Effect!>!

Creates an interlinked audio processor and video effect that changes the speed to media samples in segments of the input file specified by the given SpeedProvider.

The audio processor and video effect are interlinked to help maintain A/V sync. When using Transformer, if the input file doesn't have audio, or audio is being removed, you may have to force an audio track for the interlinked effects to function correctly. Alternatively, you can use SpeedChangeEffect when input has no audio.

Parameters
speedProvider: SpeedProvider!

The SpeedProvider determining the speed for the media at specific timestamps.

Public properties

audioProcessors

val audioProcessorsImmutableList<AudioProcessor!>!

The list of audio processors to apply to audio buffers. They are applied in the order of the list, and buffers will only be modified by that if it isActive based on the current configuration.

videoEffects

val videoEffectsImmutableList<Effect!>!

The list of video effects to apply to each frame. They are applied in the order of the list.