Remove 7 deprecated Transformer.Builder methods

PiperOrigin-RevId: 690617093
This commit is contained in:
shahddaghash 2024-10-28 08:16:36 -07:00 committed by Copybara-Service
parent 5bb9e1a932
commit 9e088ac2b8
2 changed files with 20 additions and 85 deletions

View File

@ -68,6 +68,26 @@
* Remove deprecated symbols:
* Remove deprecated `AudioMixer.create()` method. Use
`DefaultAudioMixer.Factory().create()` instead.
* Remove the following deprecated `Transformer.Builder` methods:
* `setTransformationRequest()`, use `setAudioMimeType()`,
`setVideoMimeType()`, and `setHdrMode()` instead.
* `setAudioProcessors()`, set the audio processor in an
`EditedMediaItem.Builder.setEffects()`, and pass it to
`Transformer.start()` instead.
* `setVideoEffects()`, set video effect in an
`EditedMediaItem.Builder.setEffects()`, and pass it to
`Transformer.start()` instead.
* `setRemoveAudio()`, use `EditedMediaItem.Builder.setRemoveAudio()`
to remove the audio from the `EditedMediaItem` passed to
`Transformer.start()` instead.
* `setRemoveVideo()`, use `EditedMediaItem.Builder.setRemoveVideo()`
to remove the video from the `EditedMediaItem` passed to
`Transformer.start()` instead.
* `setFlattenForSlowMotion()`, use
`EditedMediaItem.Builder.setFlattenForSlowMotion()` to flatten the
`EditedMediaItem` passed to `Transformer.start()` instead.
* `setListener()`, use `addListener()`, `removeListener()` or
`removeAllListeners()` instead.
## 1.5

View File

@ -71,7 +71,6 @@ import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.List;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
/**
@ -235,78 +234,6 @@ public final class Transformer {
return this;
}
/**
* @deprecated Use {@link #setAudioMimeType(String)}, {@link #setVideoMimeType(String)} and
* {@link Composition.Builder#setHdrMode(int)} instead.
*/
@Deprecated
@CanIgnoreReturnValue
public Builder setTransformationRequest(TransformationRequest transformationRequest) {
// TODO(b/289872787): Make TransformationRequest.Builder package private once this method is
// removed.
this.transformationRequest = transformationRequest;
return this;
}
/**
* @deprecated Set the {@linkplain AudioProcessor audio processors} in an {@link
* EditedMediaItem.Builder#setEffects(Effects)}, and pass it to {@link
* #start(EditedMediaItem, String)} instead.
*/
@CanIgnoreReturnValue
@Deprecated
public Builder setAudioProcessors(List<AudioProcessor> audioProcessors) {
this.audioProcessors = ImmutableList.copyOf(audioProcessors);
return this;
}
/**
* @deprecated Set the {@linkplain Effect video effects} in an {@link
* EditedMediaItem.Builder#setEffects(Effects)}, and pass it to {@link
* #start(EditedMediaItem, String)} instead.
*/
@CanIgnoreReturnValue
@Deprecated
public Builder setVideoEffects(List<Effect> effects) {
this.videoEffects = ImmutableList.copyOf(effects);
return this;
}
/**
* @deprecated Use {@link EditedMediaItem.Builder#setRemoveAudio(boolean)} to remove the audio
* from the {@link EditedMediaItem} passed to {@link #start(EditedMediaItem, String)}
* instead.
*/
@CanIgnoreReturnValue
@Deprecated
public Builder setRemoveAudio(boolean removeAudio) {
this.removeAudio = removeAudio;
return this;
}
/**
* @deprecated Use {@link EditedMediaItem.Builder#setRemoveVideo(boolean)} to remove the video
* from the {@link EditedMediaItem} passed to {@link #start(EditedMediaItem, String)}
* instead.
*/
@CanIgnoreReturnValue
@Deprecated
public Builder setRemoveVideo(boolean removeVideo) {
this.removeVideo = removeVideo;
return this;
}
/**
* @deprecated Use {@link EditedMediaItem.Builder#setFlattenForSlowMotion(boolean)} to flatten
* the {@link EditedMediaItem} passed to {@link #start(EditedMediaItem, String)} instead.
*/
@CanIgnoreReturnValue
@Deprecated
public Builder setFlattenForSlowMotion(boolean flattenForSlowMotion) {
this.flattenForSlowMotion = flattenForSlowMotion;
return this;
}
/**
* Sets whether to attempt to optimize trims from the start of the {@link EditedMediaItem} by
* transcoding as little of the file as possible and transmuxing the rest.
@ -415,18 +342,6 @@ public final class Transformer {
return this;
}
/**
* @deprecated Use {@link #addListener(Listener)}, {@link #removeListener(Listener)} or {@link
* #removeAllListeners()} instead.
*/
@CanIgnoreReturnValue
@Deprecated
public Builder setListener(Transformer.Listener listener) {
this.listeners.clear();
this.listeners.add(listener);
return this;
}
/**
* Adds a {@link Transformer.Listener} to listen to the export events.
*