Commit 1edec287 by rohks Committed by Tofunmi Adigun-Hameed

Remove deprecated methods `Format.copyWithXXX`

Use `Format.buildUpon()` and `setXXX` instead.

#minor-release

PiperOrigin-RevId: 532840625
(cherry picked from commit 19b6ce501456cc1f04b36b72d073803fc1a5080e)
parent a300a509
...@@ -903,38 +903,6 @@ public final class Format implements Bundleable { ...@@ -903,38 +903,6 @@ public final class Format implements Bundleable {
return new Builder(this); return new Builder(this);
} }
/**
* @deprecated Use {@link #buildUpon()} and {@link Builder#setMaxInputSize(int)}.
*/
@Deprecated
public Format copyWithMaxInputSize(int maxInputSize) {
return buildUpon().setMaxInputSize(maxInputSize).build();
}
/**
* @deprecated Use {@link #buildUpon()} and {@link Builder#setSubsampleOffsetUs(long)}.
*/
@Deprecated
public Format copyWithSubsampleOffsetUs(long subsampleOffsetUs) {
return buildUpon().setSubsampleOffsetUs(subsampleOffsetUs).build();
}
/**
* @deprecated Use {@link #buildUpon()} and {@link Builder#setLabel(String)} .
*/
@Deprecated
public Format copyWithLabel(@Nullable String label) {
return buildUpon().setLabel(label).build();
}
/**
* @deprecated Use {@link #withManifestFormatInfo(Format)}.
*/
@Deprecated
public Format copyWithManifestFormatInfo(Format manifestFormat) {
return withManifestFormatInfo(manifestFormat);
}
@SuppressWarnings("ReferenceEquality") @SuppressWarnings("ReferenceEquality")
public Format withManifestFormatInfo(Format manifestFormat) { public Format withManifestFormatInfo(Format manifestFormat) {
if (this == manifestFormat) { if (this == manifestFormat) {
...@@ -1002,57 +970,6 @@ public final class Format implements Bundleable { ...@@ -1002,57 +970,6 @@ public final class Format implements Bundleable {
.build(); .build();
} }
/**
* @deprecated Use {@link #buildUpon()}, {@link Builder#setEncoderDelay(int)} and {@link
* Builder#setEncoderPadding(int)}.
*/
@Deprecated
public Format copyWithGaplessInfo(int encoderDelay, int encoderPadding) {
return buildUpon().setEncoderDelay(encoderDelay).setEncoderPadding(encoderPadding).build();
}
/**
* @deprecated Use {@link #buildUpon()} and {@link Builder#setFrameRate(float)}.
*/
@Deprecated
public Format copyWithFrameRate(float frameRate) {
return buildUpon().setFrameRate(frameRate).build();
}
/**
* @deprecated Use {@link #buildUpon()} and {@link Builder#setDrmInitData(DrmInitData)}.
*/
@Deprecated
public Format copyWithDrmInitData(@Nullable DrmInitData drmInitData) {
return buildUpon().setDrmInitData(drmInitData).build();
}
/**
* @deprecated Use {@link #buildUpon()} and {@link Builder#setMetadata(Metadata)}.
*/
@Deprecated
public Format copyWithMetadata(@Nullable Metadata metadata) {
return buildUpon().setMetadata(metadata).build();
}
/**
* @deprecated Use {@link #buildUpon()} and {@link Builder#setAverageBitrate(int)} and {@link
* Builder#setPeakBitrate(int)}.
*/
@Deprecated
public Format copyWithBitrate(int bitrate) {
return buildUpon().setAverageBitrate(bitrate).setPeakBitrate(bitrate).build();
}
/**
* @deprecated Use {@link #buildUpon()}, {@link Builder#setWidth(int)} and {@link
* Builder#setHeight(int)}.
*/
@Deprecated
public Format copyWithVideoSize(int width, int height) {
return buildUpon().setWidth(width).setHeight(height).build();
}
/** Returns a copy of this format with the specified {@link #cryptoType}. */ /** Returns a copy of this format with the specified {@link #cryptoType}. */
public Format copyWithCryptoType(@C.CryptoType int cryptoType) { public Format copyWithCryptoType(@C.CryptoType int cryptoType) {
return buildUpon().setCryptoType(cryptoType).build(); return buildUpon().setCryptoType(cryptoType).build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment