Commit e4695048 by samrobinson Committed by Tianyi Feng

Make clear video encoder HighQualityTargeting is experimental.

PiperOrigin-RevId: 495860300
parent a1c0b104
...@@ -59,7 +59,7 @@ public final class TranscodeQualityTest { ...@@ -59,7 +59,7 @@ public final class TranscodeQualityTest {
new DefaultEncoderFactory.Builder(context) new DefaultEncoderFactory.Builder(context)
.setRequestedVideoEncoderSettings( .setRequestedVideoEncoderSettings(
new VideoEncoderSettings.Builder() new VideoEncoderSettings.Builder()
.setEnableHighQualityTargeting(true) .experimentalSetEnableHighQualityTargeting(true)
.build()) .build())
.build()) .build())
.setRemoveAudio(true) .setRemoveAudio(true)
......
...@@ -425,7 +425,7 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory { ...@@ -425,7 +425,7 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
requestedFormat.frameRate); requestedFormat.frameRate);
// Resets the flag after getting a targeted bitrate, so that supportedEncodingSetting can have // Resets the flag after getting a targeted bitrate, so that supportedEncodingSetting can have
// bitrate set. // bitrate set.
supportedEncodingSettingBuilder.setEnableHighQualityTargeting(false); supportedEncodingSettingBuilder.experimentalSetEnableHighQualityTargeting(false);
} }
int closestSupportedBitrate = int closestSupportedBitrate =
EncoderUtil.getSupportedBitrateRange(pickedEncoderInfo, mimeType).clamp(requestedBitrate); EncoderUtil.getSupportedBitrateRange(pickedEncoderInfo, mimeType).clamp(requestedBitrate);
......
...@@ -100,7 +100,7 @@ public final class VideoEncoderSettings { ...@@ -100,7 +100,7 @@ public final class VideoEncoderSettings {
/** /**
* Sets {@link VideoEncoderSettings#bitrate}. The default value is {@link #NO_VALUE}. * Sets {@link VideoEncoderSettings#bitrate}. The default value is {@link #NO_VALUE}.
* *
* <p>Can not be set if enabling {@link #setEnableHighQualityTargeting(boolean)}. * <p>Can not be set if enabling {@link #experimentalSetEnableHighQualityTargeting(boolean)}.
* *
* @param bitrate The {@link VideoEncoderSettings#bitrate}. * @param bitrate The {@link VideoEncoderSettings#bitrate}.
* @return This builder. * @return This builder.
...@@ -180,6 +180,8 @@ public final class VideoEncoderSettings { ...@@ -180,6 +180,8 @@ public final class VideoEncoderSettings {
/** /**
* Sets whether to enable automatic adjustment of the bitrate to target a high quality encoding. * Sets whether to enable automatic adjustment of the bitrate to target a high quality encoding.
* *
* <p>This method is experimental and may be removed or changed without warning.
*
* <p>Default value is {@code false}. * <p>Default value is {@code false}.
* *
* <p>Requires {@link android.media.MediaCodecInfo.EncoderCapabilities#BITRATE_MODE_VBR}. * <p>Requires {@link android.media.MediaCodecInfo.EncoderCapabilities#BITRATE_MODE_VBR}.
...@@ -187,7 +189,7 @@ public final class VideoEncoderSettings { ...@@ -187,7 +189,7 @@ public final class VideoEncoderSettings {
* <p>Can not be enabled alongside setting a custom bitrate with {@link #setBitrate(int)}. * <p>Can not be enabled alongside setting a custom bitrate with {@link #setBitrate(int)}.
*/ */
@CanIgnoreReturnValue @CanIgnoreReturnValue
public Builder setEnableHighQualityTargeting(boolean enableHighQualityTargeting) { public Builder experimentalSetEnableHighQualityTargeting(boolean enableHighQualityTargeting) {
this.enableHighQualityTargeting = enableHighQualityTargeting; this.enableHighQualityTargeting = enableHighQualityTargeting;
return this; return this;
} }
......
...@@ -178,7 +178,9 @@ public class DefaultEncoderFactoryTest { ...@@ -178,7 +178,9 @@ public class DefaultEncoderFactoryTest {
Format actualVideoFormat = Format actualVideoFormat =
new DefaultEncoderFactory.Builder(context) new DefaultEncoderFactory.Builder(context)
.setRequestedVideoEncoderSettings( .setRequestedVideoEncoderSettings(
new VideoEncoderSettings.Builder().setEnableHighQualityTargeting(true).build()) new VideoEncoderSettings.Builder()
.experimentalSetEnableHighQualityTargeting(true)
.build())
.build() .build()
.createForVideoEncoding(requestedVideoFormat) .createForVideoEncoding(requestedVideoFormat)
.getConfigurationFormat(); .getConfigurationFormat();
......
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