Add method to disable passthrough.
PiperOrigin-RevId: 432461547
This commit is contained in:
parent
b83c2cb8cb
commit
3f615040c0
@ -104,6 +104,11 @@ public interface Codec {
|
||||
*/
|
||||
Codec createForVideoEncoding(Format format, List<String> allowedMimeTypes)
|
||||
throws TransformationException;
|
||||
|
||||
/** Returns whether the video needs to be encoded because of encoder specific configuration. */
|
||||
default boolean videoNeedsEncoding() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -99,6 +99,9 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
||||
}
|
||||
|
||||
private boolean shouldPassthrough(Format inputFormat) {
|
||||
if (encoderFactory.videoNeedsEncoding()) {
|
||||
return false;
|
||||
}
|
||||
if (transformationRequest.enableHdrEditing) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user