HDR: Add colorinfo to exception logs.

Format.toString unfortunately doesn't log colorInfo, and as Format holds a very
large set of values, it's unclear that it should. ColorInfo is useful for codec
exceptions though, so log this in ExportException.createForCodec.

PiperOrigin-RevId: 510475520
This commit is contained in:
huangdarwin 2023-02-17 19:08:04 +00:00 committed by tonihei
parent 1308e22813
commit f295dd4211

View File

@ -231,6 +231,9 @@ public final class ExportException extends Exception {
boolean isDecoder, boolean isDecoder,
Format format) { Format format) {
String details = "format=" + format; String details = "format=" + format;
if (isVideo) {
details += ", colorInfo=" + format.colorInfo;
}
return createForCodec(cause, errorCode, isVideo, isDecoder, details); return createForCodec(cause, errorCode, isVideo, isDecoder, details);
} }