Commit 46cd92ac by hschlueter Committed by Rohit Singh

Set ColorInfo in decoder configuration format.

Pass the color info and HDR static metadata when configuring the decoder
using MediaFormatUtil.maybeSetColorInfo.

PiperOrigin-RevId: 460424985
parent 413016f7
...@@ -79,6 +79,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; ...@@ -79,6 +79,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
MediaFormatUtil.maybeSetInteger( MediaFormatUtil.maybeSetInteger(
mediaFormat, MediaFormat.KEY_MAX_INPUT_SIZE, format.maxInputSize); mediaFormat, MediaFormat.KEY_MAX_INPUT_SIZE, format.maxInputSize);
MediaFormatUtil.setCsdBuffers(mediaFormat, format.initializationData); MediaFormatUtil.setCsdBuffers(mediaFormat, format.initializationData);
MediaFormatUtil.maybeSetColorInfo(mediaFormat, format.colorInfo);
if (decoderSupportsKeyAllowFrameDrop) { if (decoderSupportsKeyAllowFrameDrop) {
// This key ensures no frame dropping when the decoder's output surface is full. This allows // This key ensures no frame dropping when the decoder's output surface is full. This allows
// transformer to decode as many frames as possible in one render cycle. // transformer to decode as many frames as possible in one render cycle.
......
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