Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 214f18d7 authored by Lajos Molnar's avatar Lajos Molnar Committed by Automerger Merge Worker
Browse files

Merge "media: clarify that MediaFormat.KEY_LEVEL is required when specifying a...

Merge "media: clarify that MediaFormat.KEY_LEVEL is required when specifying a profile" into tm-dev am: 894dabfb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18605849



Change-Id: I6088d369559f33b407b414d24ba33c5db3f35157
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 8e6ba16c 894dabfb
Loading
Loading
Loading
Loading
+21 −2
Original line number Diff line number Diff line
@@ -1079,11 +1079,20 @@ public final class MediaFormat {

    /**
     * A key describing the desired profile to be used by an encoder.
     * <p>
     * The associated value is an integer.
     * Constants are declared in {@link MediaCodecInfo.CodecProfileLevel}.
     * This key is used as a hint, and is only supported for codecs
     * that specify a profile. Note: Codecs are free to use all the available
     * coding tools at the specified profile.
     * that specify a profile. When configuring profile, encoder configuration
     * may fail if other parameters are not compatible with the desired
     * profile or if the desired profile is not supported, but it may also
     * fail silently (where the encoder ends up using a different, compatible profile.)
     * <p class="note">
     * <strong>Note:</strong> Codecs are free to use all the available
     * coding tools at the specified profile, but may ultimately choose to not do so.
     * <p class="note">
     * <strong>Note:</strong> When configuring video encoders, profile must be
     * set together with {@link #KEY_LEVEL level}.
     *
     * @see MediaCodecInfo.CodecCapabilities#profileLevels
     */
@@ -1091,12 +1100,22 @@ public final class MediaFormat {

    /**
     * A key describing the desired profile to be used by an encoder.
     * <p>
     * The associated value is an integer.
     * Constants are declared in {@link MediaCodecInfo.CodecProfileLevel}.
     * This key is used as a further hint when specifying a desired profile,
     * and is only supported for codecs that specify a level.
     * <p>
     * This key is ignored if the {@link #KEY_PROFILE profile} is not specified.
     * Otherwise, the value should be a level compatible with the configured encoding
     * parameters.
     * <p class="note">
     * <strong>Note:</strong> This key cannot be used to constrain the encoder's
     * output to a maximum encoding level. Encoders are free to target a different
     * level if the configured encoding parameters dictate it. Nevertheless,
     * encoders shall use (and encode) a level sufficient to decode the generated
     * bitstream, though they may exceed the (Video) Buffering Verifier limits for
     * that encoded level.
     *
     * @see MediaCodecInfo.CodecCapabilities#profileLevels
     */