Commit 181564e0 by huangdarwin Committed by christosts

Transformer: Make it clear that getExpectedColorInfo is input.

Otherwise, it's not clear if it's the expected output.

Renaming-only change. No functional change intended.

PiperOrigin-RevId: 505103740
parent 00436a04
......@@ -209,8 +209,8 @@ import java.util.concurrent.atomic.AtomicLong;
}
@Override
public ColorInfo getExpectedColorInfo() {
return sampleConsumer.getExpectedColorInfo();
public ColorInfo getExpectedInputColorInfo() {
return sampleConsumer.getExpectedInputColorInfo();
}
@Override
......
......@@ -68,7 +68,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
protected void initDecoder(Format inputFormat) throws TransformationException {
boolean isDecoderToneMappingRequired =
ColorInfo.isTransferHdr(inputFormat.colorInfo)
&& !ColorInfo.isTransferHdr(sampleConsumer.getExpectedColorInfo());
&& !ColorInfo.isTransferHdr(sampleConsumer.getExpectedInputColorInfo());
decoder =
decoderFactory.createForVideoDecoding(
inputFormat,
......
......@@ -81,7 +81,7 @@ public interface SampleConsumer {
*
* <p>Should only be used for raw video data.
*/
default ColorInfo getExpectedColorInfo() {
default ColorInfo getExpectedInputColorInfo() {
throw new UnsupportedOperationException();
}
......
......@@ -218,7 +218,7 @@ import org.checkerframework.dataflow.qual.Pure;
}
@Override
public ColorInfo getExpectedColorInfo() {
public ColorInfo getExpectedInputColorInfo() {
return frameProcessorInputColor;
}
......
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