Skip to content

Commit

Permalink
Remove deprecated methods Format.copyWithXXX
Browse files Browse the repository at this point in the history
Use `Format.buildUpon()` and `setXXX` instead.

#minor-release

PiperOrigin-RevId: 532840625
(cherry picked from commit 19b6ce5)
  • Loading branch information
rohitjoins authored and tof-tof committed May 18, 2023
1 parent a300a50 commit 1edec28
Showing 1 changed file with 0 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -903,38 +903,6 @@ public Builder buildUpon() {
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")
public Format withManifestFormatInfo(Format manifestFormat) {
if (this == manifestFormat) {
Expand Down Expand Up @@ -1002,57 +970,6 @@ public Format withManifestFormatInfo(Format manifestFormat) {
.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}. */
public Format copyWithCryptoType(@C.CryptoType int cryptoType) {
return buildUpon().setCryptoType(cryptoType).build();
Expand Down

0 comments on commit 1edec28

Please sign in to comment.